Aller au contenu principal

Unified Project Structure

Last updated: February 2026

emtb-monorepo/
β”œβ”€β”€ .github/ # CI workflows (GitHub Actions)
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ api/ # NestJS backend application
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”‚ β”œβ”€β”€ auth/ # Authentication (JWT, Passport, login/register)
β”‚ β”‚ β”‚ β”œβ”€β”€ casl/ # CASL ability factory & policies guard
β”‚ β”‚ β”‚ β”œβ”€β”€ client/ # Client management module
β”‚ β”‚ β”‚ β”œβ”€β”€ site/ # Site management module
β”‚ β”‚ β”‚ β”œβ”€β”€ cadastre/ # Cadastre management module
β”‚ β”‚ β”‚ β”œβ”€β”€ reclamation/ # Tax claim (reclamation) module
β”‚ β”‚ β”‚ β”œβ”€β”€ invoice/ # Client invoice module
β”‚ β”‚ β”‚ β”œβ”€β”€ partner/ # Partner management module
β”‚ β”‚ β”‚ β”œβ”€β”€ partner-invoice/ # Partner billing module
β”‚ β”‚ β”‚ β”œβ”€β”€ user/ # User management module
β”‚ β”‚ β”‚ β”œβ”€β”€ email/ # Email campaigns (Brevo integration)
β”‚ β”‚ β”‚ β”œβ”€β”€ document/ # Document management
β”‚ β”‚ β”‚ β”œβ”€β”€ storage/ # S3/R2 object storage service
β”‚ β”‚ β”‚ β”œβ”€β”€ dashboard/ # Dashboard KPI endpoints
β”‚ β”‚ β”‚ β”œβ”€β”€ reports/ # PDF report generation
β”‚ β”‚ β”‚ β”œβ”€β”€ exports/ # Excel export generation
β”‚ β”‚ β”‚ β”œβ”€β”€ import/ # Data import CLI commands
β”‚ β”‚ β”‚ β”œβ”€β”€ health/ # Health check endpoint
β”‚ β”‚ β”‚ β”œβ”€β”€ common/ # Shared decorators, pipes, filters, guards
β”‚ β”‚ β”‚ β”œβ”€β”€ database/
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ entities/ # TypeORM entity definitions
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ migrations/ # TypeORM migrations
β”‚ β”‚ β”‚ β”‚ └── data-source.ts # TypeORM data source config
β”‚ β”‚ β”‚ β”œβ”€β”€ cli/ # CLI command modules (nest-commander)
β”‚ β”‚ β”‚ β”œβ”€β”€ types/ # Backend-specific type definitions
β”‚ β”‚ β”‚ └── scripts/ # Utility scripts (seed, import, migrate)
β”‚ β”‚ β”œβ”€β”€ test/ # E2E test config
β”‚ β”‚ β”œβ”€β”€ Dockerfile # Multi-stage Docker build
β”‚ β”‚ └── package.json
β”‚ β”‚
β”‚ β”œβ”€β”€ frontend/ # React + Vite frontend application
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”‚ β”œβ”€β”€ main.tsx # App entry point
β”‚ β”‚ β”‚ └── globals.css # Global styles
β”‚ β”‚ β”œβ”€β”€ app.tsx # Root App component with router
β”‚ β”‚ β”œβ”€β”€ components/ # Shared UI components
β”‚ β”‚ β”‚ β”œβ”€β”€ data-grid-pro/ # MUI DataGrid Pro wrappers
β”‚ β”‚ β”‚ β”œβ”€β”€ feedback/ # Dialogs, snackbars, confirmations
β”‚ β”‚ β”‚ β”œβ”€β”€ ui/ # Base UI primitives (Shadcn/MUI)
β”‚ β”‚ β”‚ └── ...
β”‚ β”‚ β”œβ”€β”€ features/ # Feature modules (domain-driven)
β”‚ β”‚ β”‚ β”œβ”€β”€ auth/ # Login, auth context, guards
β”‚ β”‚ β”‚ β”œβ”€β”€ clients/ # Client list, detail, forms
β”‚ β”‚ β”‚ β”œβ”€β”€ sites/ # Site management
β”‚ β”‚ β”‚ β”œβ”€β”€ cadastres/ # Cadastre management
β”‚ β”‚ β”‚ β”œβ”€β”€ reclamations/ # Tax claim management
β”‚ β”‚ β”‚ β”œβ”€β”€ factures/ # Client invoices
β”‚ β”‚ β”‚ β”œβ”€β”€ factures-partenaire/ # Partner invoices
β”‚ β”‚ β”‚ β”œβ”€β”€ partners/ # Partner management
β”‚ β”‚ β”‚ β”œβ”€β”€ emails/ # Email campaign management
β”‚ β”‚ β”‚ β”œβ”€β”€ users/ # User management
β”‚ β”‚ β”‚ β”œβ”€β”€ dashboard/ # Dashboard & KPIs
β”‚ β”‚ β”‚ └── reports/ # Report generation
β”‚ β”‚ β”œβ”€β”€ hooks/ # Shared React hooks
β”‚ β”‚ β”œβ”€β”€ lib/ # Utilities, API client, auth helpers
β”‚ β”‚ β”œβ”€β”€ pages/ # Page-level route components
β”‚ β”‚ β”œβ”€β”€ providers/ # Context providers (Auth, MUI, Query)
β”‚ β”‚ β”œβ”€β”€ menu-items/ # Sidebar navigation config
β”‚ β”‚ β”œβ”€β”€ Dockerfile # Multi-stage Docker build (Nginx)
β”‚ β”‚ └── package.json
β”‚ β”‚
β”‚ └── e2e/ # Playwright E2E tests
β”‚ β”œβ”€β”€ tests/ # Test specs
β”‚ β”œβ”€β”€ playwright.config.ts
β”‚ └── package.json
β”‚
β”œβ”€β”€ shared/
β”‚ └── types/ # Shared TypeScript types (@emtb/shared-types)
β”‚ β”œβ”€β”€ src/
β”‚ └── package.json
β”‚
β”œβ”€β”€ docs/ # Project documentation (served by Docusaurus)
β”‚ β”œβ”€β”€ architecture/ # Architecture docs
β”‚ β”œβ”€β”€ prd/ # Product requirements
β”‚ β”œβ”€β”€ stories/ # User stories
β”‚ β”œβ”€β”€ epics/ # Epic definitions
β”‚ └── index.md # Documentation homepage
β”‚
β”œβ”€β”€ docs-site/ # Docusaurus documentation site
β”‚ β”œβ”€β”€ docusaurus.config.js
β”‚ β”œβ”€β”€ sidebars.js
β”‚ └── package.json
β”‚
β”œβ”€β”€ scripts/ # Root-level utility scripts
β”œβ”€β”€ turbo.json # Turborepo pipeline config
β”œβ”€β”€ package.json # Root workspace config
β”œβ”€β”€ .yarnrc.yml # Yarn 4 configuration
└── README.md # Project introduction