# Agents Rules ## Project Overview TrainUs is a fitness tracking progressive web application built with: - **Frontend**: Vue 3 (Composition API) + Vue Router - **Database**: SQLite WASM (client-side, in-browser) - **Build tool**: Vite 7 - **Styling**: Custom CSS + Bootstrap Icons - **i18n**: i18next + i18next-vue (English, French & Danish) - **Tests**: Playwright (Python) with pytest - **Formatting**: Prettier ## Project Structure ``` src/ # All application source code components/ # Reusable Vue components composables/ # Vue composables (shared logic) db/ # SQLite WASM database layer i18n/ # Internationalization config and translations router/ # Vue Router configuration styles/ # CSS styles utils/ # Utility functions views/ # Page-level Vue components App.vue # Root component main.js # Application entry point public/ # Static assets served as-is tests/ # Playwright (Python) test suite conftest.py # Pytest fixtures (Vite dev server, browser config) test_step*.py # Test files per feature step docs/ # Non-website documentation tutorials/ # Step tutorials (EN & FR) tutorials/codelabs/ # Google Codelabs format (EN & FR) decisions-log.md # Decision log plan.md # Feature plan and progress tracking specification.md # Project specification website/ # Hugo project site (docs + blog), two separate sections # by audience, each with its own nav entry content/docs/ # User docs ("Documentation" in nav). Diataxis split, # both languages: demarrage-rapide/ (tutorial), # guides-pratiques.{en,fr}.md (how-to), user-guide/ # (reference), comprendre.{en,fr}.md (explanation). content/developers/ # Contributor docs ("Developers"/"Développeurs" in nav): # technical.en.md, technical.fr.md content/blog/ # Blog posts (news, release announcements) ``` ## Build & Run Commands - `npm run dev` -- Start Vite dev server - `npm run build` -- Production build to `dist/` - `npm run preview` -- Preview production build - `npm run format` -- Format code with Prettier - `npm run format:check` -- Check formatting ## Plan - Prepare a step-by-step plan to implement one feature at a time (do not rush the full application in one shot) - Validate the plan with me before doing anything - Validation is required between each step ## Code Respect these principles: - KISS (Keep It Simple, Stupid) - SOLID (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) - DRY (Don't Repeat Yourself) - Minimal impact: prefer small, focused changes over large refactors - All application source code goes in `src/` - All new Vue components use Composition API with `