How sivakumar202/complaint_grievanc_redressal_system works
This is a role-based college grievance platform. Students authenticate, submit complaints, and track them; HOD/TPO staff handle assigned complaints and respond, while administrators manage staff and review dashboard statistics. Complaint creation can use Gemini embeddings and Pinecone to link duplicates, escalate originals, and notify affected users; resolution also updates linked duplicate records and sends email. The API routes and sampled controllers establish the main backend wiring. Frontend page-to-API calls and unsampled model implementations are not shown, so those links are omitted where wiring is uncertain.
Main entry points: App.tsx Route application · complaintController.js Complaint handling · adminController.js Administration and metrics · server.js Express API server
Components 27
Web application
- Route application
frontend/src/App.tsx - Session and sign-in
frontend/src/hooks/useAuth.tsx - Dashboard and analytics
frontend/src/pages/DashboardHome.tsx - Complaint submission
frontend/src/pages/NewComplaint.tsx - Complaint views
frontend/src/pages/MyComplaints.tsx - Staff workflows
frontend/src/pages/AssignedComplaints.tsx - Staff management
frontend/src/pages/StaffManagement.tsx
API access
- HTTP API client
frontend/src/lib/api.ts - Express API server
Backend/server.js - Complaint routes
Backend/routers/complaintRoutes.js - Admin routes
Backend/routers/adminRoutes.js - Student routes
Backend/routers/studentRoutes.js - Authentication checks
Backend/middleWare/authentication.js - Role authorization
Backend/middleWare/authorization.js
Grievance operations
- Complaint handling
Backend/controllers/complaintController.js - Administration and metrics
Backend/controllers/adminController.js - Student accounts
Backend/controllers/studentController.js
Data and integrations
- Complaint records
Backend/models/complaint.js - Repeated complaint records
Backend/models/repeatedComplaint.js - User records
Backend/models/user.js - MongoDB
- Embedding generation
Backend/utils/embedding.js - Pinecone vector index
Backend/utils/pinecone.js - Email delivery
Backend/service/emailService.js
Other components
- Students and staff
- Google GenAI
- Mail provider
Connections 35
- Students and staff → Route application: uses
- Route application → Session and sign-in: provides session
- Route application → Dashboard and analytics: routes to
- Route application → Complaint submission: routes to
- Route application → Complaint views: routes to
- Route application → Staff workflows: routes to
- Route application → Staff management: routes to
- Session and sign-in → HTTP API client: calls auth APIs
- HTTP API client → Express API server: sends requests
- Express API server → Complaint routes: dispatches
- Express API server → Admin routes: dispatches
- Express API server → Student routes: dispatches
- Complaint routes → Authentication checks: checks identity
- Complaint routes → Role authorization: checks role
- Complaint routes → Complaint handling: dispatches
- Admin routes → Authentication checks: checks identity
- Admin routes → Role authorization: checks role
- Admin routes → Administration and metrics: dispatches
- Student routes → Student accounts: dispatches
- Complaint handling → Complaint records: reads and writes
- Complaint handling → Repeated complaint records: reads and writes
- Complaint handling → User records: looks up users
- Administration and metrics → Complaint records: queries metrics
- Administration and metrics → Repeated complaint records: queries metrics
- Administration and metrics → User records: manages accounts
- Student accounts → User records: manages accounts
- Complaint records → MongoDB: persists records
- Repeated complaint records → MongoDB: persists records
- User records → MongoDB: persists records
- Complaint handling → Embedding generation: requests vector
- Embedding generation → Google GenAI: generates embedding
- Complaint handling → Pinecone vector index: queries and indexes
- Complaint handling → Email delivery: sends notices
- Administration and metrics → Email delivery: sends reset mail
- Email delivery → Mail provider: delivers mail