How mamoud427/gestion_stagiaires works
This is an internship-management application: staff sign in, manage supervisors and interns, view placement statistics, and upload or download internship reports. The React frontend calls an Express API; controllers delegate domain operations to services and MongoDB models, with JWT and audit middleware protecting selected routes. The README is empty, so product scope comes from the source tree and sampled code. Some feature-to-route and deployment wiring is not shown; edges below are limited to indexed references or explicit calls and API paths.
Main entry points: App.tsx React app and routes · index.ts Express API · api.ts HTTP client · Rapport.service.ts Report service
Components 29
Web application
- React app and routes
frontend/src/App.tsx - Sign-in page
frontend/src/pages/Login.tsx - Supervisor management
frontend/src/pages/Encadreurs.tsx - Intern management
frontend/src/pages/Stagiaires.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Reports page
frontend/src/pages/Rapports.tsx - Report upload UI
frontend/src/components/uploadRapport.tsx - HTTP client
frontend/src/services/api.ts - Authentication client
frontend/src/services/authService.ts - Supervisor client
frontend/src/services/encadreurService.ts - Intern client
frontend/src/services/stagiaireService.ts - Dashboard client
frontend/src/services/dashboardService.ts
API and access
- Express API
backend/src/index.ts - JWT role guard
backend/src/Middleware/auth.middleware.ts - Audit middleware
backend/src/Middleware/audit.middleware.ts - Supervisor controller
backend/src/controllers/Encadrant.controller.ts - Intern controller
backend/src/controllers/Stagiaire.controller.ts - Report controller
backend/src/controllers/Rapport.controller.ts - Audit controller
backend/src/controllers/Audit.controller.ts
Management services
- Supervisor service
backend/src/services/Encadrant.service.ts - Intern service
backend/src/services/Stagiaire.sevice.ts - Report service
backend/src/services/Rapport.service.ts - Audit log service
backend/src/services/AuditLog.service.ts
Persistence and files
- Supervisor model
backend/src/models/Encadrant.model.ts - Intern model
backend/src/models/Stagiaire.model.ts - Audit log model
backend/src/models/AuditLog.model.ts - Report file storage
backend/src/services/Pdf.service.ts
Other components
- Staff user
- MongoDB
Connections 34
- Staff user → React app and routes: uses
frontend/src/App.tsx - React app and routes → Sign-in page: routes to
frontend/src/App.tsx - React app and routes → Supervisor management: routes to
frontend/src/App.tsx - React app and routes → Intern management: routes to
frontend/src/App.tsx - React app and routes → Dashboard: routes to
frontend/src/App.tsx - React app and routes → Reports page: routes to
frontend/src/App.tsx - Sign-in page → Authentication client: signs in via
frontend/src/services/authService.ts - Supervisor management → Supervisor client: manages supervisors
frontend/src/pages/Encadreurs.tsx - Intern management → Intern client: manages interns
frontend/src/services/stagiaireService.ts - Reports page → Report upload UI: renders
frontend/src/pages/Rapports.tsx - Authentication client → HTTP client: posts login
frontend/src/services/authService.ts - Supervisor client → HTTP client: sends requests
frontend/src/services/encadreurService.ts - Intern client → HTTP client: sends requests
frontend/src/services/stagiaireService.ts - Dashboard → Dashboard client: loads statistics
frontend/src/pages/Dashboard.tsx - Dashboard client → HTTP client: sends requests
frontend/src/services/dashboardService.ts - HTTP client → Express API: calls API
- Express API → Supervisor controller: routes requests
- Express API → Intern controller: routes requests
- Express API → Report controller: routes requests
- Supervisor controller → Supervisor service: delegates
backend/src/controllers/Encadrant.controller.ts - Intern controller → Intern service: delegates
backend/src/controllers/Stagiaire.controller.ts - Report controller → Report service: delegates
backend/src/controllers/Rapport.controller.ts - Supervisor service → Supervisor model: queries
backend/src/services/Encadrant.service.ts - Intern service → Intern model: queries
backend/src/services/Stagiaire.sevice.ts - Report service → Intern model: reads intern data
backend/src/services/Rapport.service.ts - Supervisor model → MongoDB: persists
- Intern model → MongoDB: persists
- Report service → Report file storage: stores and retrieves
- JWT role guard → Express API: guards routes
- Audit middleware → Audit log service: records activity
backend/src/Middleware/audit.middleware.ts - Audit log service → Audit log model: writes logs
backend/src/services/AuditLog.service.ts - Audit controller → Audit log service: reads logs
backend/src/controllers/Audit.controller.ts - Express API → Audit controller: routes audit query
- Audit log model → MongoDB: persists