How mohit-gaur75/campusfix works
CampusFix lets students report and track campus issues while campus authorities prioritize, assign, and resolve them. The student workflow runs from report entry through upload and issue processing to a trackable issue; authorities use separate issue-management, user, and analytics views. Authentication and role-protected routes serve both experiences. The README identifies MongoDB Atlas and JWT, while sampled backend code shows issue deduplication, priority calculation, workflow operations, and notifications. Some feature modules were not sampled, so their internal connections are omitted; the browser-to-server API link is shown as unverified.
Main entry points: app.js Express API · App.jsx Route composition · issue.service.js Issue processing · workflow.service.js Issue workflow
Components 25
Student experience
- Student pages
client/src/pages/student - Issue reporting
client/src/pages/student/ReportIssue.jsx - Web authentication
client/src/context/AuthContext.jsx - Client API
client/src/api
Authority experience
- Authority views
client/src/pages/authority - Analytics views
client/src/pages/authority/Analytics.jsx
API and access
- Route composition
client/src/App.jsx - Express API
server/src/app.js - Issue routes
server/src/routes/issue.routes.js - Authority routes
server/src/routes/authority.routes.js - Other API routes
server/src/routes - Issue handlers
server/src/controllers/issue.controller.js - Authority handlers
server/src/controllers/authority.controller.js - Analytics subsystem
server/src/controllers/analytics.controller.js - Identity and access
server/src/middleware/authenticate.js
Issue domain
- Issue processing
server/src/services/issue.service.js - Issue workflow
server/src/services/workflow.service.js - Priority scoring
server/src/services/priority.service.js - Photo uploads
server/src/services/upload.service.js - Notifications
server/src/services/notification.service.js
Persistence and services
- Issue and report data
server/src/models/Issue.js - User data
server/src/models/User.js - MongoDB
server/src/config/db.js - Cloudinary storage
server/src/config/cloudinary.js
Other components
- Campus users
Connections 31
- Campus users → Route composition: uses
client/src/App.jsx - Route composition → Student pages: routes to
client/src/App.jsx - Route composition → Issue reporting: routes to
client/src/App.jsx - Route composition → Authority views: routes to
client/src/App.jsx - Route composition → Web authentication: provides auth
client/src/App.jsx - Web authentication → Client API: calls
client/src/context/AuthContext.jsx - Issue reporting → Client API: submits via
client/src/pages/student/ReportIssue.jsx - Analytics views → Client API: requests data
- Client API → Express API: HTTP requests
- Express API → Issue routes: mounts
server/src/app.js - Express API → Authority routes: mounts
server/src/app.js - Express API → Other API routes: mounts
server/src/app.js - Issue routes → Issue handlers: dispatches
server/src/routes/issue.routes.js - Authority routes → Authority handlers: dispatches
server/src/routes/authority.routes.js - Issue routes → Identity and access: protects
server/src/routes/issue.routes.js - Authority routes → Identity and access: protects
server/src/routes/authority.routes.js - Issue handlers → Issue processing: calls
server/src/controllers/issue.controller.js - Issue handlers → Photo uploads: uploads files
server/src/controllers/issue.controller.js - Authority handlers → Issue workflow: delegates
server/src/controllers/authority.controller.js - Authority handlers → Priority scoring: computes priority
server/src/controllers/authority.controller.js - Issue processing → Issue and report data: reads and writes
server/src/services/issue.service.js - Issue processing → Priority scoring: scores issues
server/src/services/issue.service.js - Issue processing → Notifications: notifies reporters
server/src/services/issue.service.js - Issue workflow → Issue and report data: updates records
server/src/services/workflow.service.js - Issue workflow → Priority scoring: recalculates
server/src/services/workflow.service.js - Issue workflow → Notifications: notifies users
server/src/services/workflow.service.js - Photo uploads → Cloudinary storage: uses storage
server/src/services/upload.service.js - Identity and access → User data: loads user
server/src/middleware/authenticate.js - Identity and access → Express API: verifies tokens
server/src/middleware/authenticate.js - Analytics subsystem → Issue and report data: queries issue data
- Express API → MongoDB: connects
server/src/server.js