Administrative console for managing DraftDream operational data and catalogs.
The backoffice targets admin and internal management workflows:
- Identity: User administration and coach-athlete link management
- Catalog: Global template management (programs, sessions, exercises, meals, types)
- Tracking: Athlete wellbeing monitoring and wellness report analysis
- Support: Public contact message workspace
- Content: Legal document management and signature tracking
- Framework: React 19
- Build Tool: Vite 7
- Language: TypeScript 5
- UI Components: Material UI 7 + DataGrid
- Routing: React Router 7
- Internationalization: i18next (English/French)
- State Management: Zustand
- API Transport: GraphQL over shared fetch service
- Declarative Views: Components and pages focus on rendering.
- Hook-Based Logic: Workflows and side effects are encapsulated in custom hooks.
- Centralized API: All GraphQL calls use
src/services/graphql/graphql.service.fetch.ts. - Async Safety: Every async task is routed via
useAsyncTaskfor global loader synchronization. - Governance: Data-loading rules are defined in
docs/data-loading-governance.md.
src/
commons/ # Shared Inversify container and utilities
components/ # Reusable UI widgets (forms, tables, dialogs)
config/ # Runtime environment configuration
hooks/ # Business hooks and CRUD logic
layouts/ # Page shells and navigation
locales/ # i18n translation dictionaries (en, fr)
pages/ # Route-level feature screens
routes/ # Router configuration and loaders
services/ # API adapters and GraphQL documents
stores/ # Zustand global state (session, loader, flash)
theme/ # Material UI theme customizationcd backoffice
npm install
npm run devDefault local URL: http://localhost:5173
Create backoffice/.env.local for local overrides:
VITE_GRAPHQL_ENDPOINT=http://localhost:3000/graphql
VITE_APP_ENV=development| Script | Description |
|---|---|
npm run dev |
Start Vite development server |
npm run build |
Type-check (tsc) + production build |
npm run lint |
Run ESLint check on src/ |
npm run test |
Run Vitest unit tests |
npm run test:typecheck |
Run TypeScript compiler on tests only |
npm run preview |
Local preview of the dist/ output |
npm run lint- Clean code standardsnpm run build- Successful compilation and type-checkingnpm run test- Verify logic integrity- Update translations in both
enandfrlocales - Maintain the
{/* General information */}marker in component templates
To run the backoffice alongside the API and database:
cd ..
make up-dev