How abhishek-verse/campus-connect works
CampusHub is a college event and attendance platform. Students create accounts, discover events, register, and use a permanent QR pass; club organizers manage events and registrations, scan attendees, and export attendance. The graph shows the documented portals and API route-to-controller flow, plus the sampled business-service and persistence layers. Several frontend screens and the QR scanner implementation are not present in the supplied tree, so those capabilities are represented at the frontend directory level; their internal calls are not inferred.
Main entry points: app.js Express app · database.js Prisma client · auth.middleware.js Authentication and roles · js Student and club portal
Components 28
Portals
- Student and club portal
frontend/js - API client
frontend/js/api/client.js - PWA support
frontend/js/utils/pwa.js
API and access
- Express app
backend/src/app.js - Authentication routes
backend/src/routes/auth.routes.js - Student routes
backend/src/routes/student.routes.js - Event routes
backend/src/routes/event.routes.js - Registration routes
backend/src/routes/registration.routes.js - Attendance routes
backend/src/routes/attendance.routes.js - Notice routes
backend/src/routes/notice.routes.js - Authentication and roles
backend/src/middleware/auth.middleware.js
Event operations
- Event management
backend/src/controllers/event.controller.js - Registration management
backend/src/controllers/registration.controller.js - Attendance and export
backend/src/controllers/attendance.controller.js - Notices
backend/src/controllers/notice.controller.js - Event rules
backend/src/services/event.service.js - Registration rules
backend/src/services/registration.service.js - Check-in rules
backend/src/services/attendance.service.js - Attendance exports
backend/src/services/export.service.js - Notice rules
backend/src/services/notice.service.js
Student identity
- Student profile and history
backend/src/controllers/student.controller.js - Account access
backend/src/controllers/auth.controller.js - Identity and QR pass
backend/src/services/auth.service.js - QR token generation
backend/src/services/qr.service.js
Persistence and reporting
- Prisma client
backend/src/config/database.js - PostgreSQL
Other components
- Student
- Club organizer
Connections 39
- Student → Student and club portal: uses
README.md - Club organizer → Student and club portal: uses
README.md - Student and club portal → API client: requests API
- Student and club portal → PWA support: uses PWA
frontend/js/utils/navigation.js - API client → Express app: calls API
- Express app → Authentication routes: mounts
backend/src/app.js - Express app → Student routes: mounts
backend/src/app.js - Express app → Event routes: mounts
backend/src/app.js - Express app → Registration routes: mounts
backend/src/app.js - Express app → Attendance routes: mounts
backend/src/app.js - Express app → Notice routes: mounts
backend/src/app.js - Authentication routes → Account access: routes to
backend/src/routes/auth.routes.js - Student routes → Student profile and history: routes to
backend/src/routes/student.routes.js - Event routes → Event management: routes to
backend/src/routes/event.routes.js - Registration routes → Registration management: routes to
backend/src/routes/registration.routes.js - Attendance routes → Attendance and export: routes to
backend/src/routes/attendance.routes.js - Notice routes → Notices: routes to
backend/src/routes/notice.routes.js - Authentication routes → Authentication and roles: authenticates
backend/src/routes/auth.routes.js - Event routes → Authentication and roles: checks access
backend/src/routes/event.routes.js - Registration routes → Authentication and roles: checks access
backend/src/routes/registration.routes.js - Attendance routes → Authentication and roles: checks access
backend/src/routes/attendance.routes.js - Notice routes → Authentication and roles: checks access
backend/src/routes/notice.routes.js - Event management → Event rules: delegates
backend/src/controllers/event.controller.js - Registration management → Registration rules: delegates
backend/src/controllers/registration.controller.js - Attendance and export → Check-in rules: delegates
backend/src/controllers/attendance.controller.js - Attendance and export → Attendance exports: exports records
backend/src/controllers/attendance.controller.js - Notices → Notice rules: delegates
backend/src/controllers/notice.controller.js - Student profile and history → Identity and QR pass: gets profile
backend/src/controllers/student.controller.js - Student profile and history → Registration rules: gets registrations
backend/src/controllers/student.controller.js - Account access → Identity and QR pass: delegates
backend/src/controllers/auth.controller.js - Identity and QR pass → QR token generation: generates token
backend/src/services/auth.service.js - Authentication and roles → Prisma client: loads user
backend/src/middleware/auth.middleware.js - Identity and QR pass → Prisma client: reads and writes
backend/src/services/auth.service.js - Event rules → Prisma client: reads and writes
backend/src/services/event.service.js - Registration rules → Prisma client: reads and writes
backend/src/services/registration.service.js - Check-in rules → Prisma client: reads and writes
backend/src/services/attendance.service.js - Attendance exports → Prisma client: reads records
backend/src/services/export.service.js - Notice rules → Prisma client: reads and writes
backend/src/services/notice.service.js - Prisma client → PostgreSQL: queries