# vishnu06032006/student_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/vishnu06032006/student_management_system
- Repository: https://github.com/vishnu06032006/student_management_system

## Overview

This is a role-based student and staff institutional ERP. Users sign in, enter role-specific dashboards, and perform academic administration or staff/student workflows; the React client sends requests to an Express API backed by MongoDB. The graph preserves the README’s major academic, attendance, examination, communication, reporting, promotion, audit, and backup capabilities. Detailed links for unsampled feature implementations are documented at subsystem level rather than inferred from filenames.

Main entry points: [`server/app.js`](https://github.com/vishnu06032006/student_management_system/blob/main/server/app.js) (Express API), [`client/src/routes/AppRoutes.jsx`](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/routes/AppRoutes.jsx) (Role routes), [`server/routes/auth.routes.js`](https://github.com/vishnu06032006/student_management_system/blob/main/server/routes/auth.routes.js) (Authentication routes), [`server/services/auth.service.js`](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/auth.service.js) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Role-based client"]
  node_routes["Role routes<br/>[AppRoutes.jsx]"]
  node_authui["Sign-in state<br/>[AuthContext.jsx]"]
  node_studentadmin["Student management<br/>[StudentList.jsx]"]
  node_promotionui["Promotion workflow<br/>[PromotionPage.jsx]"]
  node_timetableui["Timetable views<br/>[TimetablePage.jsx]"]
  node_odui["Student OD requests<br/>[ODRequests.jsx]"]
end

subgraph group_access["API and access"]
  node_api["Express API<br/>[app.js]"]
  node_authroutes["Authentication routes<br/>[auth.routes.js]"]
  node_authlogic["Authentication service<br/>[auth.service.js]"]
  node_authguard["Token and status guard<br/>[auth.middleware.js]"]
  node_enrollmentroute["Enrollment routes"]
end

subgraph group_academics["Academic records"]
  node_enrollmentctl["Enrollment controller"]
  node_enrollmentlogic["Enrollment service"]
  node_academic["Academic structure"]
  node_timetable["Timetable scheduling"]
  node_exams["Exams and results<br/>[exam.service.js]"]
end

subgraph group_daily["Operations and insight"]
  node_attendance["Attendance and eligibility"]
  node_communication["Leave and announcements"]
  node_reports["Reports and analytics<br/>[report.service.js]"]
  node_audit["Activity log<br/>[activityLogger.js]"]
end

subgraph group_state["Persistence and backup"]
  node_enrollmentdata[("Enrollment history<br/>[Enrollment.js]")]
  node_backup["Backup jobs<br/>[backupJob.js]"]
  node_mongo[("MongoDB<br/>[db.js]")]
end

node_users(("Admin, staff, students"))

node_users -->|"use"| node_routes
node_routes -->|"checks session"| node_authui
node_routes -->|"request features"| node_api
node_api -->|"mounts API"| node_authroutes
node_authroutes -->|"dispatches auth"| node_authlogic
node_authlogic -.->|"issues tokens"| node_authguard
node_api -.->|"mounts API"| node_enrollmentroute
node_enrollmentroute -->|"routes requests"| node_enrollmentctl
node_enrollmentctl -->|"calls service"| node_enrollmentlogic
node_enrollmentlogic -->|"reads and writes"| node_enrollmentdata
node_studentadmin -->|"manage records"| node_api
node_promotionui -->|"promote students"| node_api
node_timetableui -->|"manage schedules"| node_api
node_odui -->|"submit requests"| node_api
node_api -.->|"serves structure"| node_academic
node_api -.->|"serves attendance"| node_attendance
node_api -.->|"serves schedules"| node_timetable
node_api -.->|"serves exams"| node_exams
node_api -.->|"serves communication"| node_communication
node_api -.->|"serves reports"| node_reports
node_api -.->|"records activity"| node_audit
node_backup -.->|"backs up data"| node_mongo

click node_routes "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/routes/AppRoutes.jsx"
click node_authui "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/context/AuthContext.jsx"
click node_studentadmin "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/students/StudentList.jsx"
click node_promotionui "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/promotion/PromotionPage.jsx"
click node_timetableui "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/timetable/TimetablePage.jsx"
click node_odui "https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/student/ODRequests.jsx"
click node_api "https://github.com/vishnu06032006/student_management_system/blob/main/server/app.js"
click node_authroutes "https://github.com/vishnu06032006/student_management_system/blob/main/server/routes/auth.routes.js"
click node_authlogic "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/auth.service.js"
click node_authguard "https://github.com/vishnu06032006/student_management_system/blob/main/server/middleware/auth.middleware.js"
click node_enrollmentroute "https://github.com/vishnu06032006/student_management_system/blob/main/server/routes/enrollment.routes.js"
click node_enrollmentctl "https://github.com/vishnu06032006/student_management_system/blob/main/server/controllers/enrollment.controller.js"
click node_enrollmentlogic "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/enrollment.service.js"
click node_enrollmentdata "https://github.com/vishnu06032006/student_management_system/blob/main/server/models/Enrollment.js"
click node_academic "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/academicYear.service.js"
click node_attendance "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/attendance.service.js"
click node_timetable "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/timetable.service.js"
click node_exams "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/exam.service.js"
click node_communication "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/announcement.service.js"
click node_reports "https://github.com/vishnu06032006/student_management_system/blob/main/server/services/report.service.js"
click node_audit "https://github.com/vishnu06032006/student_management_system/blob/main/server/utils/activityLogger.js"
click node_backup "https://github.com/vishnu06032006/student_management_system/blob/main/server/jobs/backupJob.js"
click node_mongo "https://github.com/vishnu06032006/student_management_system/blob/main/server/config/db.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_routes,node_authui,node_studentadmin,node_promotionui,node_timetableui,node_odui toneBlue
class node_api,node_authroutes,node_authlogic,node_authguard,node_enrollmentroute toneAmber
class node_enrollmentctl,node_enrollmentlogic,node_academic,node_timetable,node_exams toneMint
class node_attendance,node_communication,node_reports,node_audit toneRose
class node_enrollmentdata,node_backup,node_mongo,node_users toneIndigo
```

## Components

### Role-based client

- [Role routes](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/routes/AppRoutes.jsx): `client/src/routes/AppRoutes.jsx`
- [Sign-in state](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Student management](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/students/StudentList.jsx): `client/src/pages/admin/students/StudentList.jsx`
- [Promotion workflow](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/promotion/PromotionPage.jsx): `client/src/pages/admin/promotion/PromotionPage.jsx`
- [Timetable views](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/admin/timetable/TimetablePage.jsx): `client/src/pages/admin/timetable/TimetablePage.jsx`
- [Student OD requests](https://github.com/vishnu06032006/student_management_system/blob/main/client/src/pages/student/ODRequests.jsx): `client/src/pages/student/ODRequests.jsx`

### API and access

- [Express API](https://github.com/vishnu06032006/student_management_system/blob/main/server/app.js): `server/app.js`
- [Authentication routes](https://github.com/vishnu06032006/student_management_system/blob/main/server/routes/auth.routes.js): `server/routes/auth.routes.js`
- [Authentication service](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/auth.service.js): `server/services/auth.service.js`
- [Token and status guard](https://github.com/vishnu06032006/student_management_system/blob/main/server/middleware/auth.middleware.js): `server/middleware/auth.middleware.js`
- [Enrollment routes](https://github.com/vishnu06032006/student_management_system/blob/main/server/routes/enrollment.routes.js): `server/routes/enrollment.routes.js`

### Academic records

- [Enrollment controller](https://github.com/vishnu06032006/student_management_system/blob/main/server/controllers/enrollment.controller.js): `server/controllers/enrollment.controller.js`
- [Enrollment service](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/enrollment.service.js): `server/services/enrollment.service.js`
- [Academic structure](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/academicYear.service.js): `server/services/academicYear.service.js`
- [Timetable scheduling](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/timetable.service.js): `server/services/timetable.service.js`
- [Exams and results](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/exam.service.js): `server/services/exam.service.js`

### Operations and insight

- [Attendance and eligibility](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/attendance.service.js): `server/services/attendance.service.js`
- [Leave and announcements](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/announcement.service.js): `server/services/announcement.service.js`
- [Reports and analytics](https://github.com/vishnu06032006/student_management_system/blob/main/server/services/report.service.js): `server/services/report.service.js`
- [Activity log](https://github.com/vishnu06032006/student_management_system/blob/main/server/utils/activityLogger.js): `server/utils/activityLogger.js`

### Persistence and backup

- [Enrollment history](https://github.com/vishnu06032006/student_management_system/blob/main/server/models/Enrollment.js): `server/models/Enrollment.js`
- [Backup jobs](https://github.com/vishnu06032006/student_management_system/blob/main/server/jobs/backupJob.js): `server/jobs/backupJob.js`
- [MongoDB](https://github.com/vishnu06032006/student_management_system/blob/main/server/config/db.js): `server/config/db.js`

### Other components

- **Admin, staff, students**

## Connections

- Admin, staff, students → Role routes: use (evidence: `client/src/routes/AppRoutes.jsx`)
- Role routes → Sign-in state: checks session (evidence: `client/src/App.jsx`)
- Role routes → Express API: request features
- Express API → Authentication routes: mounts API (evidence: `server/app.js`)
- Authentication routes → Authentication service: dispatches auth (evidence: `server/routes/auth.routes.js`)
- Authentication service → Token and status guard: issues tokens
- Express API → Enrollment routes: mounts API
- Enrollment routes → Enrollment controller: routes requests (evidence: `server/routes/enrollment.routes.js`)
- Enrollment controller → Enrollment service: calls service (evidence: `server/controllers/enrollment.controller.js`)
- Enrollment service → Enrollment history: reads and writes (evidence: `server/services/enrollment.service.js`)
- Student management → Express API: manage records
- Promotion workflow → Express API: promote students
- Timetable views → Express API: manage schedules
- Student OD requests → Express API: submit requests
- Express API → Academic structure: serves structure
- Express API → Attendance and eligibility: serves attendance
- Express API → Timetable scheduling: serves schedules
- Express API → Exams and results: serves exams
- Express API → Leave and announcements: serves communication
- Express API → Reports and analytics: serves reports
- Express API → Activity log: records activity
- Backup jobs → MongoDB: backs up data
