# sowmiyacodes/srms architecture

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

- Interactive diagram: https://gitdiagram.com/sowmiyacodes/srms
- Repository: https://github.com/sowmiyacodes/srms

## Overview

SRMS is a role-based student and staff management application. Users select a portal, authenticate, and enter role-specific dashboards; HOD/admin workflows manage student records and staff, while staff workflows expose faculty-advisor and project-student views. The backend separates HTTP routing, controllers, services, and query construction over PostgreSQL, with Supabase used in authentication. The README documents the broader role and session capabilities; some page-to-API and auth wiring is not shown in the excerpts, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/App.jsx) (Role routing), [`frontend/src/pages/AdminDashboard.jsx`](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/AdminDashboard.jsx) (Student dashboard), [`frontend/src/api/staff.api.js`](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/staff.api.js) (Staff API), [`backend/app.js`](https://github.com/sowmiyacodes/srms/blob/main/backend/app.js) (Express entrypoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Role routing<br/>[App.jsx]"]
  node_login["Login and registration<br/>[LoginPage.jsx]"]
  node_admin_ui["Student dashboard<br/>[AdminDashboard.jsx]"]
  node_staff_ui["Staff management"]
  node_fa_ui["Advisor management<br/>[FAManagement.jsx]"]
  node_project_ui["Project students"]
  node_student_filters["Student filters<br/>[StudentFilters.jsx]"]
  node_student_table["Student table and profile<br/>[StudentTable.jsx]"]
end

subgraph group_api["API and access"]
  node_http["HTTP client<br/>[axios.js]"]
  node_student_api["Student API<br/>[student.api.js]"]
  node_staff_api["Staff API<br/>[staff.api.js]"]
  node_express["Express entrypoint<br/>[app.js]"]
  node_auth_routes["Authentication routes<br/>[authRoutes.js]"]
  node_student_routes["Student routes<br/>[student.routes.js]"]
  node_staff_routes["Staff routes<br/>[staff.routes.js]"]
  node_auth_controller["Authentication controller<br/>[authController.js]"]
end

subgraph group_student["Student management"]
  node_student_controller["Student controller"]
  node_student_service["Student service<br/>[student.service.js]"]
  node_student_query["Student listing query"]
  node_student_filters_backend["Query filters and stats"]
end

subgraph group_staff["Staff management"]
  node_staff_controller["Staff controller"]
  node_staff_service["Staff service<br/>[staff.service.js]"]
  node_staff_queries["Staff queries"]
  node_project_service["Project-student service"]
  node_project_query["Project-student query"]
end

node_user(("Portal user"))
node_pg[("PostgreSQL<br/>[db.js]")]
node_supabase[("Supabase<br/>[supabase.js]")]

node_user -->|"navigates"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_admin_ui
node_app -->|"routes to"| node_staff_ui
node_staff_ui -->|"requests staff"| node_staff_api
node_staff_ui -->|"requests advisor students"| node_student_api
node_fa_ui -->|"uses API"| node_staff_api
node_project_ui -->|"uses API"| node_staff_api
node_admin_ui -->|"requests student data"| node_student_api
node_admin_ui -->|"renders"| node_student_filters
node_admin_ui -->|"renders"| node_student_table
node_student_api -->|"sends requests"| node_http
node_staff_api -->|"sends requests"| node_http
node_express -->|"mounts"| node_auth_routes
node_express -->|"mounts"| node_student_routes
node_express -->|"mounts"| node_staff_routes
node_student_routes -->|"dispatches"| node_student_controller
node_staff_routes -->|"dispatches"| node_staff_controller
node_student_controller -->|"delegates"| node_student_service
node_student_service -->|"requests listing"| node_student_query
node_student_query -->|"applies filters"| node_student_filters_backend
node_student_filters_backend -->|"queries database"| node_pg
node_staff_controller -->|"delegates"| node_staff_service
node_staff_controller -->|"requests project students"| node_project_service
node_staff_service -->|"uses queries"| node_staff_queries
node_staff_queries -->|"queries database"| node_pg
node_project_service -->|"delegates"| node_project_query
node_project_query -->|"queries database"| node_pg
node_auth_routes -.->|"routes auth"| node_auth_controller
node_auth_controller -->|"reads and writes users"| node_supabase

click node_app "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/App.jsx"
click node_login "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/LoginPage.jsx"
click node_admin_ui "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_staff_ui "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/StaffManagement.jsx"
click node_fa_ui "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/staff/FAManagement.jsx"
click node_project_ui "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/staff/ProjectStudentsModal.jsx"
click node_student_filters "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/students/StudentFilters.jsx"
click node_student_table "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/students/StudentTable.jsx"
click node_http "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/axios.js"
click node_student_api "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/student.api.js"
click node_staff_api "https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/staff.api.js"
click node_express "https://github.com/sowmiyacodes/srms/blob/main/backend/app.js"
click node_auth_routes "https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/authRoutes.js"
click node_student_routes "https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/student.routes.js"
click node_staff_routes "https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/staff.routes.js"
click node_auth_controller "https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/authController.js"
click node_student_controller "https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/student.controller.js"
click node_student_service "https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/student.service.js"
click node_student_query "https://github.com/sowmiyacodes/srms/blob/main/backend/src/queries/student/studentListQuery.js"
click node_student_filters_backend "https://github.com/sowmiyacodes/srms/tree/main/backend/src/filters/student"
click node_staff_controller "https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/staff.controller.js"
click node_staff_service "https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/staff.service.js"
click node_staff_queries "https://github.com/sowmiyacodes/srms/tree/main/backend/src/queries/staff"
click node_project_service "https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/projectStudents.service.js"
click node_project_query "https://github.com/sowmiyacodes/srms/blob/main/backend/src/queries/projectStudents/projectStudentsQuery.js"
click node_pg "https://github.com/sowmiyacodes/srms/blob/main/backend/src/config/db.js"
click node_supabase "https://github.com/sowmiyacodes/srms/blob/main/backend/src/config/supabase.js"

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_login,node_admin_ui,node_staff_ui,node_fa_ui,node_project_ui,node_student_filters,node_student_table,node_user toneBlue
class node_http,node_student_api,node_staff_api,node_express,node_auth_routes,node_student_routes,node_staff_routes,node_auth_controller,node_pg,node_supabase toneAmber
class node_student_controller,node_student_service,node_student_query,node_student_filters_backend toneMint
class node_staff_controller,node_staff_service,node_staff_queries,node_project_service,node_project_query toneRose
```

## Components

### Web application

- [Role routing](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and registration](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/LoginPage.jsx): `frontend/src/pages/LoginPage.jsx`
- [Student dashboard](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Staff management](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/pages/StaffManagement.jsx): `frontend/src/pages/StaffManagement.jsx`
- [Advisor management](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/staff/FAManagement.jsx): `frontend/src/components/staff/FAManagement.jsx`
- [Project students](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/staff/ProjectStudentsModal.jsx): `frontend/src/components/staff/ProjectStudentsModal.jsx`
- [Student filters](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/students/StudentFilters.jsx): `frontend/src/components/students/StudentFilters.jsx`
- [Student table and profile](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/components/students/StudentTable.jsx): `frontend/src/components/students/StudentTable.jsx`

### API and access

- [HTTP client](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`
- [Student API](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/student.api.js): `frontend/src/api/student.api.js`
- [Staff API](https://github.com/sowmiyacodes/srms/blob/main/frontend/src/api/staff.api.js): `frontend/src/api/staff.api.js`
- [Express entrypoint](https://github.com/sowmiyacodes/srms/blob/main/backend/app.js): `backend/app.js`
- [Authentication routes](https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/authRoutes.js): `backend/src/routes/authRoutes.js`
- [Student routes](https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/student.routes.js): `backend/src/routes/student.routes.js`
- [Staff routes](https://github.com/sowmiyacodes/srms/blob/main/backend/src/routes/staff.routes.js): `backend/src/routes/staff.routes.js`
- [Authentication controller](https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`

### Student management

- [Student controller](https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/student.controller.js): `backend/src/controllers/student.controller.js`
- [Student service](https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/student.service.js): `backend/src/services/student.service.js`
- [Student listing query](https://github.com/sowmiyacodes/srms/blob/main/backend/src/queries/student/studentListQuery.js): `backend/src/queries/student/studentListQuery.js`
- [Query filters and stats](https://github.com/sowmiyacodes/srms/tree/main/backend/src/filters/student): `backend/src/filters/student`

### Staff management

- [Staff controller](https://github.com/sowmiyacodes/srms/blob/main/backend/src/controllers/staff.controller.js): `backend/src/controllers/staff.controller.js`
- [Staff service](https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/staff.service.js): `backend/src/services/staff.service.js`
- [Staff queries](https://github.com/sowmiyacodes/srms/tree/main/backend/src/queries/staff): `backend/src/queries/staff`
- [Project-student service](https://github.com/sowmiyacodes/srms/blob/main/backend/src/services/projectStudents.service.js): `backend/src/services/projectStudents.service.js`
- [Project-student query](https://github.com/sowmiyacodes/srms/blob/main/backend/src/queries/projectStudents/projectStudentsQuery.js): `backend/src/queries/projectStudents/projectStudentsQuery.js`

### Other components

- **Portal user**
- [PostgreSQL](https://github.com/sowmiyacodes/srms/blob/main/backend/src/config/db.js): `backend/src/config/db.js`
- [Supabase](https://github.com/sowmiyacodes/srms/blob/main/backend/src/config/supabase.js): `backend/src/config/supabase.js`

## Connections

- Portal user → Role routing: navigates (evidence: `frontend/src/App.jsx`)
- Role routing → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- Role routing → Student dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Role routing → Staff management: routes to (evidence: `frontend/src/App.jsx`)
- Staff management → Staff API: requests staff (evidence: `frontend/src/pages/StaffManagement.jsx`)
- Staff management → Student API: requests advisor students (evidence: `frontend/src/pages/StaffManagement.jsx`)
- Advisor management → Staff API: uses API (evidence: `frontend/src/components/staff/FAManagement.jsx`)
- Project students → Staff API: uses API (evidence: `frontend/src/components/staff/ProjectStudentsModal.jsx`)
- Student dashboard → Student API: requests student data (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Student dashboard → Student filters: renders (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Student dashboard → Student table and profile: renders (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Student API → HTTP client: sends requests (evidence: `frontend/src/api/student.api.js`)
- Staff API → HTTP client: sends requests (evidence: `frontend/src/api/staff.api.js`)
- Express entrypoint → Authentication routes: mounts (evidence: `backend/app.js`)
- Express entrypoint → Student routes: mounts (evidence: `backend/app.js`)
- Express entrypoint → Staff routes: mounts (evidence: `backend/app.js`)
- Student routes → Student controller: dispatches (evidence: `backend/src/routes/student.routes.js`)
- Staff routes → Staff controller: dispatches (evidence: `backend/src/routes/staff.routes.js`)
- Student controller → Student service: delegates (evidence: `backend/src/controllers/student.controller.js`)
- Student service → Student listing query: requests listing (evidence: `backend/src/services/student.service.js`)
- Student listing query → Query filters and stats: applies filters (evidence: `backend/src/queries/student/studentListQuery.js`)
- Query filters and stats → PostgreSQL: queries database (evidence: `backend/src/filters/student/baseQuery.js`)
- Staff controller → Staff service: delegates (evidence: `backend/src/controllers/staff.controller.js`)
- Staff controller → Project-student service: requests project students (evidence: `backend/src/controllers/staff.controller.js`)
- Staff service → Staff queries: uses queries (evidence: `backend/src/services/staff.service.js`)
- Staff queries → PostgreSQL: queries database (evidence: `backend/src/queries/staff/faStudentsQuery.js`)
- Project-student service → Project-student query: delegates (evidence: `backend/src/services/projectStudents.service.js`)
- Project-student query → PostgreSQL: queries database (evidence: `backend/src/queries/projectStudents/projectStudentsQuery.js`)
- Authentication routes → Authentication controller: routes auth
- Authentication controller → Supabase: reads and writes users (evidence: `backend/src/controllers/authController.js`)
