# bhavyasharan/college-complaint-management-system architecture

> Architecture diagram of the GitHub repository bhavyasharan/college-complaint-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhavyasharan/college-complaint-management-system
- Repository: https://github.com/bhavyasharan/college-complaint-management-system

## Overview

The product is a campus complaint portal with student and staff sign-in, complaint filing and tracking, technician assignment and rectification, student confirmation, and staff dashboards and analytics. The frontend routes users into role-specific pages, which use a shared Supabase client; the sampled HOD and technician code shows complaint assignment and status handling. The README describes a Flask API and automated routing, but the available evidence does not show frontend-to-backend calls or the complete routing implementation, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/App.jsx) (Route dispatcher), [`frontend/src/supabaseClient.js`](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/supabaseClient.js) (Supabase client), [`frontend/src/pages/TechnicianDashboard.jsx`](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/TechnicianDashboard.jsx) (Technician resolution), [`frontend/src/pages/HodDashboard.jsx`](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/HodDashboard.jsx) (Department assignment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Portal and access"]
  node_app["Route dispatcher<br/>[App.jsx]"]
  node_role["Role selection<br/>[RoleSelection.jsx]"]
  node_guard["Session guard<br/>[ProtectedRoute.jsx]"]
  node_student_auth["Student access<br/>[StudentLogin.jsx]"]
  node_staff_auth["Staff access<br/>[AdminLogin.jsx]"]
  node_signup["Account registration<br/>[StudentSignUp.jsx]"]
  node_staff_signup["Staff registration<br/>[AdminSignUp.jsx]"]
end

subgraph group_student["Student services"]
  node_student_dashboard["Complaint filing and tracking"]
  node_profile["User profile<br/>[Profile.jsx]"]
end

subgraph group_staff["Staff resolution"]
  node_hod["Department assignment<br/>[HodDashboard.jsx]"]
  node_technician["Technician resolution"]
  node_dean["Dean overview<br/>[DeanDashboard.jsx]"]
  node_analytics["Department analytics"]
  node_teacher["Teacher performance"]
  node_navbar["Dashboard navigation<br/>[Navbar.jsx]"]
end

subgraph group_data["Services and API"]
  node_supabase_client["Supabase client<br/>[supabaseClient.js]"]
  node_supabase[("Supabase auth and database")]
  node_backend["Flask API<br/>[app.py]"]
end

node_user(("Campus user"))

node_user -->|"chooses role"| node_role
node_app -->|"routes to"| node_role
node_app -->|"routes to"| node_student_auth
node_app -->|"routes to"| node_staff_auth
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_staff_signup
node_app -->|"protects routes"| node_guard
node_guard -->|"checks session"| node_supabase_client
node_app -->|"routes to"| node_student_dashboard
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_hod
node_app -->|"routes to"| node_technician
node_app -->|"routes to"| node_dean
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_teacher
node_student_auth -->|"authenticates with"| node_supabase_client
node_staff_auth -->|"authenticates with"| node_supabase_client
node_signup -->|"registers with"| node_supabase_client
node_staff_signup -->|"registers with"| node_supabase_client
node_student_dashboard -->|"reads and updates"| node_supabase_client
node_hod -->|"loads and assigns"| node_supabase_client
node_technician -->|"loads and updates"| node_supabase_client
node_dean -->|"loads complaints"| node_supabase_client
node_analytics -->|"queries data"| node_supabase_client
node_teacher -->|"queries data"| node_supabase_client
node_profile -->|"queries data"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_hod -.->|"assigns work"| node_technician
node_technician -.->|"awaits confirmation"| node_student_dashboard

click node_app "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/App.jsx"
click node_role "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/RoleSelection.jsx"
click node_guard "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/ProtectedRoute.jsx"
click node_student_auth "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentLogin.jsx"
click node_staff_auth "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/AdminLogin.jsx"
click node_signup "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentSignUp.jsx"
click node_staff_signup "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/AdminSignUp.jsx"
click node_student_dashboard "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentDashboard.jsx"
click node_profile "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/Profile.jsx"
click node_hod "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/HodDashboard.jsx"
click node_technician "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/TechnicianDashboard.jsx"
click node_dean "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/DeanDashboard.jsx"
click node_analytics "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/DepartmentAnalytics.jsx"
click node_teacher "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/TeacherPerformance.jsx"
click node_navbar "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/Navbar.jsx"
click node_supabase_client "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/supabaseClient.js"
click node_backend "https://github.com/bhavyasharan/college-complaint-management-system/blob/main/backend/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_role,node_guard,node_student_auth,node_staff_auth,node_signup,node_staff_signup,node_user toneBlue
class node_student_dashboard,node_profile toneAmber
class node_hod,node_technician,node_dean,node_analytics,node_teacher,node_navbar toneMint
class node_supabase_client,node_supabase,node_backend toneRose
```

## Components

### Portal and access

- [Route dispatcher](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Role selection](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/RoleSelection.jsx): `frontend/src/components/RoleSelection.jsx`
- [Session guard](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/ProtectedRoute.jsx): `frontend/src/components/ProtectedRoute.jsx`
- [Student access](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentLogin.jsx): `frontend/src/pages/StudentLogin.jsx`
- [Staff access](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/AdminLogin.jsx): `frontend/src/pages/AdminLogin.jsx`
- [Account registration](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentSignUp.jsx): `frontend/src/pages/StudentSignUp.jsx`
- [Staff registration](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/AdminSignUp.jsx): `frontend/src/pages/AdminSignUp.jsx`

### Student services

- [Complaint filing and tracking](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/StudentDashboard.jsx): `frontend/src/pages/StudentDashboard.jsx`
- [User profile](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`

### Staff resolution

- [Department assignment](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/HodDashboard.jsx): `frontend/src/pages/HodDashboard.jsx`
- [Technician resolution](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/TechnicianDashboard.jsx): `frontend/src/pages/TechnicianDashboard.jsx`
- [Dean overview](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/DeanDashboard.jsx): `frontend/src/pages/DeanDashboard.jsx`
- [Department analytics](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/DepartmentAnalytics.jsx): `frontend/src/pages/DepartmentAnalytics.jsx`
- [Teacher performance](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/pages/TeacherPerformance.jsx): `frontend/src/pages/TeacherPerformance.jsx`
- [Dashboard navigation](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`

### Services and API

- [Supabase client](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/frontend/src/supabaseClient.js): `frontend/src/supabaseClient.js`
- **Supabase auth and database**
- [Flask API](https://github.com/bhavyasharan/college-complaint-management-system/blob/main/backend/app.py): `backend/app.py`

### Other components

- **Campus user**

## Connections

- Campus user → Role selection: chooses role (evidence: `frontend/src/components/RoleSelection.jsx`)
- Route dispatcher → Role selection: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Student access: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Staff access: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Account registration: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Staff registration: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Session guard: protects routes (evidence: `frontend/src/App.jsx`)
- Session guard → Supabase client: checks session (evidence: `frontend/src/components/ProtectedRoute.jsx`)
- Route dispatcher → Complaint filing and tracking: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → User profile: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Department assignment: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Technician resolution: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Dean overview: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Department analytics: routes to (evidence: `frontend/src/App.jsx`)
- Route dispatcher → Teacher performance: routes to (evidence: `frontend/src/App.jsx`)
- Student access → Supabase client: authenticates with (evidence: `frontend/src/pages/StudentLogin.jsx`)
- Staff access → Supabase client: authenticates with (evidence: `frontend/src/pages/AdminLogin.jsx`)
- Account registration → Supabase client: registers with (evidence: `frontend/src/pages/StudentSignUp.jsx`)
- Staff registration → Supabase client: registers with (evidence: `frontend/src/pages/AdminSignUp.jsx`)
- Complaint filing and tracking → Supabase client: reads and updates (evidence: `frontend/src/pages/StudentDashboard.jsx`)
- Department assignment → Supabase client: loads and assigns (evidence: `frontend/src/pages/HodDashboard.jsx`)
- Technician resolution → Supabase client: loads and updates (evidence: `frontend/src/pages/TechnicianDashboard.jsx`)
- Dean overview → Supabase client: loads complaints (evidence: `frontend/src/pages/DeanDashboard.jsx`)
- Department analytics → Supabase client: queries data (evidence: `frontend/src/pages/DepartmentAnalytics.jsx`)
- Teacher performance → Supabase client: queries data (evidence: `frontend/src/pages/TeacherPerformance.jsx`)
- User profile → Supabase client: queries data (evidence: `frontend/src/pages/Profile.jsx`)
- Supabase client → Supabase auth and database: connects to (evidence: `frontend/src/supabaseClient.js`)
- Department assignment → Technician resolution: assigns work
- Technician resolution → Complaint filing and tracking: awaits confirmation
