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