How melaldrinr-star/fiinal-v5 works
BMDC is a multi-tenant trainee management and attendance system. A user enters through the React application, authenticates, then uses role-protected screens to manage programs, enrollments, trainee records, and attendance; the frontend communicates with Next.js API routes backed by Supabase. Separate product capabilities include inventory lending, certificates, reporting, notifications, and tenant administration. The README documents these workflows and integrations; source excerpts additionally confirm frontend routing and the requirement-definition statistics helper. Most individual routes and services were not sampled, so their internal call relationships are not asserted.
Main entry points: services Business services · App.tsx React application · AuthContext.tsx Auth context · ProtectedRoute.tsx Role-protected routes
Components 19
Web application
- React application
Frontend/src/App.tsx
Identity and access
- Auth context
Frontend/src/contexts/AuthContext.tsx - Role-protected routes
Frontend/src/components/ProtectedRoute.tsx - Authentication service
Frontend/src/services/authService.ts - Registration and accounts
Backend/src/app/api/registrations/route.ts
Training operations
- Trainee management
Backend/src/app/api/trainees - Programs and enrollment
Backend/src/app/api/programs - Enrollment service
Backend/src/services/enrollmentRequirementService.ts - Attendance tracking
Backend/src/app/api/attendance - Training requirements
Backend/src/app/api/requirement-definitions/route.ts - Certificates
Backend/src/app/api/certificates
Platform operations
- Inventory and lending
Backend/src/app/api/items - Reports and activity
Backend/src/app/api/reports - Notifications and email
Backend/src/services/notificationService.ts - Tenant administration
Backend/src/app/api/admin/tenants
Backend infrastructure
- Next.js API routes
Backend/src/app/api - Business services
Backend/src/services - Supabase PostgreSQL
Other components
- Trainee or staff
Connections 21
- Trainee or staff → React application: uses
README.md - React application → Auth context: provides context
Frontend/src/App.tsx - React application → Role-protected routes: routes through
Frontend/src/App.tsx - Role-protected routes → Auth context: checks access
Frontend/src/components/ProtectedRoute.tsx - Auth context → Authentication service: authenticates with
Frontend/src/contexts/AuthContext.tsx - Authentication service → Next.js API routes: calls API
- Trainee or staff → Registration and accounts: registers
README.md - Registration and accounts → Business services: processes account
- Next.js API routes → Business services: delegates business logic
- Business services → Supabase PostgreSQL: reads and writes
README.md - Trainee or staff → Programs and enrollment: browses and enrolls
README.md - Programs and enrollment → Enrollment service: manages enrollment
- Trainee or staff → Attendance tracking: marks attendance
README.md - Trainee or staff → Training requirements: submits requirements
- Training requirements → Business services: calculates statistics
Backend/src/app/api/requirement-definitions/route.ts - Trainee or staff → Trainee management: manages profile
README.md - Trainee management → Certificates: tracks certification
README.md - Trainee or staff → Inventory and lending: uses lending
- Trainee or staff → Reports and activity: views reports
- Business services → Notifications and email: sends notifications
- Tenant administration → Supabase PostgreSQL: administers tenant data