How takshchauhan/campus-complaint-management-system works
CCMS is a campus complaint reporting system. Its main student workflow is account registration or sign-in, browsing departments and optional keyword suggestions, choosing a department, submitting a complaint, and viewing a receipt or private complaint history. The frontend communicates with a FastAPI backend, which applies authentication and domain services before using SQLAlchemy persistence. Google sign-in is an optional, disabled-by-default capability; staff and admin dashboards appear in the UI, but the README identifies complaint-processing workflows as future work. Edges use README statements or source-index references; unsampled implementation details are not assumed.
Main entry points: App.tsx App navigation · router.py API router · auth.py Authentication routes · complaints.py Complaint routes
Components 34
Frontend
- App navigation
frontend/src/App.tsx - Authentication UI
frontend/src/components/AuthPage.tsx - Auth context
frontend/src/context/AuthContext.tsx - Complaint form
frontend/src/components/SubmitComplaintForm.tsx - Complaint receipt
frontend/src/components/ComplaintReceipt.tsx - Complaint history
frontend/src/components/MyComplaintsList.tsx - Staff dashboard
frontend/src/components/StaffDashboard.tsx - Admin dashboard
frontend/src/components/AdminDashboard.tsx - HTTP client
frontend/src/api/client.ts - Auth API client
frontend/src/api/auth.ts - Complaints API client
frontend/src/api/complaints.ts - Departments API client
frontend/src/api/departments.ts
Backend API
- API router
backend/app/api/v1/router.py - Authentication routes
backend/app/api/v1/endpoints/auth.py - Complaint routes
backend/app/api/v1/endpoints/complaints.py - Department routes
backend/app/api/v1/endpoints/departments.py - Profile routes
backend/app/api/v1/endpoints/users.py - Auth contracts
backend/app/schemas/auth.py - Complaint contracts
backend/app/schemas/complaint.py - Department contracts
backend/app/schemas/department.py - User contracts
backend/app/schemas/user.py
Domain Services
- Account service
backend/app/services/auth_service.py - Google auth service
backend/app/services/google_auth_service.py - Complaint service
backend/app/services/complaint_service.py - Department service
backend/app/services/department_service.py - Keyword suggestions
backend/app/services/suggestion_service.py
Persistence
- DB sessions
backend/app/db/session.py - User records
backend/app/models/user.py - Complaint records
backend/app/models/complaint.py - Department records
backend/app/models/department.py - OAuth state records
backend/app/models/oauth.py
Other components
- Student
- Google OAuth
- SQL database
Connections 48
- Student → App navigation: uses
README.md - App navigation → Authentication UI: renders
frontend/src/App.tsx - App navigation → Complaint form: renders
frontend/src/App.tsx - App navigation → Complaint receipt: renders
frontend/src/App.tsx - App navigation → Complaint history: renders
frontend/src/App.tsx - App navigation → Staff dashboard: renders
frontend/src/App.tsx - App navigation → Admin dashboard: renders
frontend/src/App.tsx - App navigation → Auth context: provides auth
frontend/src/App.tsx - Authentication UI → Auth context: uses
frontend/src/components/AuthPage.tsx - Auth context → Auth API client: calls
frontend/src/context/AuthContext.tsx - Auth context → HTTP client: clears token
frontend/src/context/AuthContext.tsx - Complaint form → Departments API client: loads departments
frontend/src/components/SubmitComplaintForm.tsx - Complaint form → Complaints API client: submits complaint
frontend/src/components/SubmitComplaintForm.tsx - Complaint history → Complaints API client: fetches history
frontend/src/components/MyComplaintsList.tsx - Auth API client → HTTP client: sends requests
frontend/src/api/auth.ts - Complaints API client → HTTP client: sends requests
frontend/src/api/complaints.ts - Departments API client → HTTP client: sends requests
frontend/src/api/departments.ts - HTTP client → API router: HTTP requests
README.md - API router → Authentication routes: registers
backend/app/api/v1/router.py - API router → Complaint routes: registers
backend/app/api/v1/router.py - API router → Department routes: registers
backend/app/api/v1/router.py - API router → Profile routes: registers
backend/app/api/v1/router.py - Authentication routes → Account service: calls
backend/app/api/v1/endpoints/auth.py - Authentication routes → Google auth service: calls
backend/app/api/v1/endpoints/auth.py - Complaint routes → Complaint service: calls
backend/app/api/v1/endpoints/complaints.py - Complaint routes → Keyword suggestions: requests suggestions
backend/app/api/v1/endpoints/complaints.py - Department routes → Department service: calls
backend/app/api/v1/endpoints/departments.py - Department routes → Keyword suggestions: requests suggestions
backend/app/api/v1/endpoints/departments.py - Google auth service → Google OAuth: exchanges tokens
README.md - Authentication routes → DB sessions: uses database session
backend/app/api/v1/endpoints/auth.py - Complaint routes → DB sessions: uses database session
backend/app/api/v1/endpoints/complaints.py - Department routes → DB sessions: uses database session
backend/app/api/v1/endpoints/departments.py - Account service → User records: reads and writes
backend/app/services/auth_service.py - Complaint service → Complaint records: reads and writes
backend/app/services/complaint_service.py - Complaint service → Department records: reads
backend/app/services/complaint_service.py - Department service → Department records: reads
backend/app/services/department_service.py - Keyword suggestions → Department records: reads active departments
backend/app/services/suggestion_service.py - Google auth service → OAuth state records: stores OAuth state
backend/app/services/google_auth_service.py - Google auth service → User records: resolves account
backend/app/services/google_auth_service.py - DB sessions → SQL database: connects
backend/app/db/session.py - User records → Department records: references
backend/app/models/user.py - User records → Complaint records: owns complaints
backend/app/models/user.py - User records → OAuth state records: owns identities
backend/app/models/user.py - Complaint records → Department records: references
backend/app/models/complaint.py - Authentication routes → Auth contracts: validates requests
backend/app/api/v1/endpoints/auth.py - Complaint routes → Complaint contracts: uses contracts
backend/app/api/v1/endpoints/complaints.py - Department routes → Department contracts: uses contracts
backend/app/api/v1/endpoints/departments.py - Account service → User contracts: returns profile
backend/app/services/auth_service.py