How trivikramrajurkar/campuscomplaint works
The Campus Complaint and Feedback Portal moves student reports through coordinator verification, automatic department routing, department resolution, and student feedback, with admin oversight. The graph separates role-facing screens, API transport, server workflow, and persistence/security. README documentation supports the product capabilities and frontend-to-API boundary; sampled server and controller excerpts show route dispatch and key workflow calls. Several frontend and backend modules are indexed but unsampled, so their internal wiring is not inferred.
Main entry points: auth.js Authentication and roles · prisma.js Prisma client · server.js REST server · index.js Role API services
Components 28
Role-based portal
- Student complaints
frontend/src/pages/student - Coordinator review
frontend/src/pages/coordinator - Department resolution
frontend/src/pages/department - Admin oversight
frontend/src/pages/admin - Sign in and register
frontend/src/pages/auth - Session and route guards
frontend/src/context/AuthContext.jsx - API client
frontend/src/services/api.js - Role API services
frontend/src/services/index.js
API and workflow
- REST server
backend/server.js - Authentication routes
backend/routes/authRoutes.js - Complaint routes
backend/routes/complaintRoutes.js - Coordinator routes
backend/routes/coordinatorRoutes.js - Department routes
backend/routes/departmentRoutes.js - Admin routes
backend/routes/adminRoutes.js - Complaint submission and feedback
backend/controllers/complaintController.js - Verification and rejection
backend/controllers/coordinatorController.js - Category routing
backend/services/complaintRoutingService.js - Progress and resolution
backend/controllers/departmentController.js - Assignment and oversight
backend/controllers/adminController.js
Identity and persistence
- Authentication logic
backend/controllers/authController.js - Authentication and roles
backend/middleware/auth.js - JWT utilities
backend/utils/jwt.js - Prisma client
backend/config/prisma.js - PostgreSQL
Other components
- Students
- Coordinators
- Department staff
- Admins
Connections 36
- Students → Student complaints: submit and track
README.md - Coordinators → Coordinator review: review reports
README.md - Department staff → Department resolution: resolve reports
README.md - Admins → Admin oversight: oversee reports
README.md - Students → Sign in and register: register and sign in
README.md - Sign in and register → Session and route guards: establish session
- Student complaints → Role API services: request operations
- Coordinator review → Role API services: request operations
- Department resolution → Role API services: request operations
- Admin oversight → Role API services: request operations
- Role API services → API client: use client
- API client → REST server: REST requests
README.md - REST server → Authentication routes: mounts routes
backend/server.js - REST server → Complaint routes: mounts routes
backend/server.js - REST server → Coordinator routes: mounts routes
backend/server.js - REST server → Department routes: mounts routes
backend/server.js - REST server → Admin routes: mounts routes
backend/server.js - Authentication routes → Authentication logic: dispatches
backend/routes/authRoutes.js - Complaint routes → Complaint submission and feedback: dispatches
backend/routes/complaintRoutes.js - Coordinator routes → Verification and rejection: dispatches
backend/routes/coordinatorRoutes.js - Department routes → Progress and resolution: dispatches
backend/routes/departmentRoutes.js - Admin routes → Assignment and oversight: dispatches
backend/routes/adminRoutes.js - Verification and rejection → Category routing: routes verified report
backend/controllers/coordinatorController.js - Authentication routes → Authentication and roles: authenticates requests
backend/routes/authRoutes.js - Complaint routes → Authentication and roles: authenticates requests
backend/routes/complaintRoutes.js - Coordinator routes → Authentication and roles: authorizes role
backend/routes/coordinatorRoutes.js - Department routes → Authentication and roles: authorizes role
backend/routes/departmentRoutes.js - Admin routes → Authentication and roles: authorizes role
backend/routes/adminRoutes.js - Authentication and roles → JWT utilities: verifies token
backend/middleware/auth.js - Authentication and roles → Prisma client: loads user
backend/middleware/auth.js - Authentication logic → Prisma client: queries records
backend/controllers/authController.js - Complaint submission and feedback → Prisma client: reads and writes
backend/controllers/complaintController.js - Verification and rejection → Prisma client: reads and writes
backend/controllers/coordinatorController.js - Progress and resolution → Prisma client: reads and writes
backend/controllers/departmentController.js - Assignment and oversight → Prisma client: reads and writes
backend/controllers/adminController.js - Prisma client → PostgreSQL: persists data
README.md