How regulanikhitha/rcts-c4gt-team-4 works
C4GT Hub Attendance is a role-based attendance and member-management application, extended with permission requests, notifications, and reporting. A user enters through the React application; sign-in is handled by the auth context and API, then the role-specific dashboard presents operational views. The backend mounts REST modules whose controllers read and update MongoDB-backed records. Sampled attendance code also builds reports and exports PDFs; permission code handles reviews and downloads. Some frontend pages and backend modules are represented from the tree and app mounts only; their internal API wiring was not sampled.
Main entry points: App.jsx App routing · app.js Express app · attendanceController.js Attendance reports · authController.js Authentication
Components 30
Web application
- App routing
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - Role dashboards
frontend/src/pages - Member views
frontend/src/pages/Members.jsx - Attendance views
frontend/src/pages/AttendanceDashboard.jsx - Permission views
frontend/src/pages/PermissionPortal.jsx - Reports and calendar
frontend/src/pages/Reports.jsx - Notifications view
frontend/src/pages/Notifications.jsx - HTTP client
frontend/src/api/axios.js
Backend API
- Express app
backend/src/app.js - Auth routes
backend/src/routes/auth.js - Member routes
backend/src/routes/members.js - Attendance routes
backend/src/routes/attendance.js - Permission routes
backend/src/routes/permissions.js - Notification routes
backend/src/routes/notifications.js - Authentication
backend/src/controllers/authController.js
Attendance and members
- Member operations
backend/src/controllers/memberController.js - Attendance reports
backend/src/controllers/attendanceController.js - Attendance PDF
backend/src/utils/pdfGenerator.js
Permissions and communication
- Permission workflow
backend/src/controllers/permissionController.js - Notification management
backend/src/controllers/notificationController.js - Email delivery
backend/src/utils/mailer.js
Persistent data
- MongoDB
backend/src/config/db.js - User records
backend/src/models/User.js - Member records
backend/src/models/Member.js - Attendance records
backend/src/models/Attendance.js - Audit records
backend/src/models/AuditLog.js - Permission records
backend/src/models/Permission.js - Notification records
backend/src/models/Notification.js
Other components
- Hub user
Connections 26
- Hub user → App routing: uses
- App routing → Auth context: provides auth
- App routing → Role dashboards: routes by role
- App routing → Member views: routes to
- App routing → Attendance views: routes to
- App routing → Permission views: routes to
- App routing → Reports and calendar: routes to
- App routing → Notifications view: routes to
- Auth context → HTTP client: posts login
- HTTP client → Express app: sends requests
- Express app → Auth routes: mounts
- Express app → Member routes: mounts
- Express app → Attendance routes: mounts
- Express app → Permission routes: mounts
- Express app → Notification routes: mounts
- Auth routes → Authentication: dispatches
- Authentication → User records: reads and writes
- Authentication → Email delivery: sends email
- Member operations → Member records: reads and writes
- Attendance reports → Member records: reads
- Attendance reports → Attendance records: reads and writes
- Attendance reports → Audit records: writes
- Attendance reports → Attendance PDF: generates export
- Permission workflow → Permission records: reads and writes
- Notification management → Notification records: reads and writes
- Express app → MongoDB: connects