How student-jss/campusresolve works
This is a college complaint-management application: students submit and track complaints, staff handle assigned work, and administrators manage users, categories, assignments, and analytics. The client routes role-specific workflows to an Express API; server controllers enforce domain operations and persist records in MongoDB. Notifications can be delivered in real time, while image storage and password-reset email are integrations. The graph follows documented capabilities and indexed imports; several page-to-service and route-to-controller links are documented only at the API level, so those links are marked unverified.
Main entry points: routes Express API routes · adminController.js Admin and analytics · api.js HTTP API client · User.js User records
Components 24
Web application
- Role-based routes
client/src/App.jsx - Complaint workflows
client/src/pages - Admin console
client/src/pages/admin - Authentication state
client/src/context/AuthContext.jsx - HTTP API client
client/src/services/api.js - Complaint API service
client/src/services/complaintService.js - Notification client
client/src/hooks/useNotifications.js
API and workflows
- Express API routes
server/routes - Account and recovery
server/controllers/authController.js - Complaint lifecycle
server/controllers/complaintController.js - Admin and analytics
server/controllers/adminController.js - Image upload handling
server/controllers/uploadController.js - JWT and role checks
server/middlewares/auth.js
Domain data
- User records
server/models/User.js - Complaint records
server/models/Complaint.js - Complaint categories
server/models/Category.js - Complaint comments
server/models/Comment.js - Notification records
server/models/Notification.js
Live and external services
- Authenticated socket rooms
server/sockets/socket.js - Notification dispatch
server/services/notificationService.js - Cloudinary image storage
server/utils/uploadToCloudinary.js - SMTP email service
server/services/emailService.js
Other components
- Students, staff, admins
- MongoDB
Connections 35
- Students, staff, admins → Role-based routes: use role routes
client/src/App.jsx - Role-based routes → Complaint workflows: routes to
client/src/App.jsx - Role-based routes → Admin console: routes to
client/src/App.jsx - Complaint workflows → Complaint API service: requests complaints
- Admin console → HTTP API client: requests admin data
- Authentication state → HTTP API client: uses auth service
client/src/context/AuthContext.jsx - Complaint API service → HTTP API client: sends HTTP calls
client/src/services/complaintService.js - Notification client → HTTP API client: fetches notifications
- Notification client → Authenticated socket rooms: receives live events
- HTTP API client → Express API routes: calls API
- Express API routes → JWT and role checks: protects endpoints
server/routes/auth.js - Express API routes → Account and recovery: dispatches auth
server/routes/auth.js - Express API routes → Complaint lifecycle: dispatches complaints
server/routes/complaints.js - Express API routes → Image upload handling: dispatches uploads
server/routes/complaints.js - Express API routes → Admin and analytics: dispatches admin
- JWT and role checks → User records: loads account
server/middlewares/auth.js - Account and recovery → User records: reads and writes
server/controllers/authController.js - Account and recovery → SMTP email service: sends reset email
server/controllers/authController.js - Complaint lifecycle → Complaint records: reads and updates
server/controllers/complaintController.js - Complaint lifecycle → Complaint comments: creates comments
server/controllers/complaintController.js - Complaint lifecycle → Notification dispatch: creates notifications
server/controllers/complaintController.js - Admin and analytics → User records: manages users
server/controllers/adminController.js - Admin and analytics → Complaint records: assigns and aggregates
server/controllers/adminController.js - Admin and analytics → Complaint categories: joins category data
server/controllers/adminController.js - Admin and analytics → Notification dispatch: notifies assignment
server/controllers/adminController.js - Image upload handling → Complaint records: updates complaint images
server/controllers/uploadController.js - Image upload handling → User records: updates profile image
server/controllers/uploadController.js - Image upload handling → Cloudinary image storage: uploads images
server/controllers/uploadController.js - Notification dispatch → Notification records: persists notification
server/services/notificationService.js - Notification dispatch → Authenticated socket rooms: emits event
server/services/notificationService.js - User records → MongoDB: persists records
- Complaint records → MongoDB: persists records
- Complaint categories → MongoDB: persists records
- Complaint comments → MongoDB: persists records
- Notification records → MongoDB: persists records