# jainil019/school-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/jainil019/school-management-system
- Repository: https://github.com/jainil019/school-management-system

## Overview

This is a school-management web application with admin, teacher, student, and parent portals. Users enter through role-based routes, work with school records or view portal information, and the React services call a FastAPI backend backed by MongoDB. The graph groups related screens and API domains to retain the main capabilities without listing every page. The README is only a Vite template; backend-to-frontend HTTP wiring and several unsampled route implementations are not verified, so those links are omitted or marked unverified.

Main entry points: [`src/routes/AppRoutes.tsx`](https://github.com/jainil019/school-management-system/blob/main/src/routes/AppRoutes.tsx) (Role routing), [`backend/app/main.py`](https://github.com/jainil019/school-management-system/blob/main/backend/app/main.py) (API application), [`src/services`](https://github.com/jainil019/school-management-system/tree/main/src/services) (Domain services), [`backend/app/database.py`](https://github.com/jainil019/school-management-system/blob/main/backend/app/database.py) (MongoDB access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routes["Role routing<br/>[AppRoutes.tsx]"]
  node_login["Sign in<br/>[Login.tsx]"]
  node_api["HTTP client<br/>[api.ts]"]
end

subgraph group_records["School records"]
  node_admin["Admin screens"]
  node_assignment_ui["Assignments<br/>[Assignments.tsx]"]
  node_fees_ui["Fee management<br/>[Fees.tsx]"]
  node_services["Domain services"]
end

subgraph group_portals["Role portals"]
  node_teacher_ui["Teacher portal"]
  node_student_ui["Student portal"]
  node_parent_ui["Parent portal"]
  node_student_agg["Student portal data"]
  node_parent_agg["Parent portal data"]
end

subgraph group_backend["API backend"]
  node_fastapi["API application<br/>[main.py]"]
  node_student_routes["Student records API<br/>[students.py]"]
  node_teacher_routes["Teacher records API<br/>[teachers.py]"]
  node_attendance_routes["Attendance API<br/>[attendance.py]"]
  node_assignment_routes["Assignments API<br/>[assignments.py]"]
  node_other_routes["Other school APIs"]
end

subgraph group_storage["Data storage"]
  node_database[("MongoDB access<br/>[database.py]")]
  node_mongo[("MongoDB")]
end

node_users(("School users"))

node_users -.->|"navigate"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_admin
node_routes -->|"routes to"| node_assignment_ui
node_routes -->|"routes to"| node_fees_ui
node_routes -->|"routes to"| node_teacher_ui
node_routes -->|"routes to"| node_student_ui
node_routes -->|"routes to"| node_parent_ui
node_assignment_ui -->|"uses services"| node_services
node_fees_ui -->|"uses fees"| node_services
node_teacher_ui -->|"loads dashboard data"| node_services
node_student_ui -->|"loads portal data"| node_student_agg
node_student_ui -->|"loads results"| node_student_agg
node_parent_ui -.->|"uses portal data"| node_parent_agg
node_student_agg -->|"filters data"| node_services
node_parent_agg -->|"filters data"| node_services
node_services -->|"makes requests"| node_api
node_api -.->|"HTTP requests"| node_fastapi
node_fastapi -->|"registers"| node_student_routes
node_fastapi -->|"registers"| node_teacher_routes
node_fastapi -->|"registers"| node_attendance_routes
node_fastapi -->|"registers"| node_assignment_routes
node_fastapi -->|"registers"| node_other_routes
node_student_routes -->|"uses"| node_database
node_teacher_routes -->|"uses"| node_database
node_attendance_routes -->|"uses"| node_database
node_assignment_routes -->|"uses"| node_database
node_database -->|"connects to"| node_mongo

click node_routes "https://github.com/jainil019/school-management-system/blob/main/src/routes/AppRoutes.tsx"
click node_login "https://github.com/jainil019/school-management-system/blob/main/src/pages/auth/Login.tsx"
click node_admin "https://github.com/jainil019/school-management-system/tree/main/src/pages/admin"
click node_assignment_ui "https://github.com/jainil019/school-management-system/blob/main/src/pages/admin/Assignments.tsx"
click node_fees_ui "https://github.com/jainil019/school-management-system/blob/main/src/pages/admin/Fees.tsx"
click node_teacher_ui "https://github.com/jainil019/school-management-system/tree/main/src/pages/teacher"
click node_student_ui "https://github.com/jainil019/school-management-system/tree/main/src/pages/student"
click node_parent_ui "https://github.com/jainil019/school-management-system/tree/main/src/pages/parent"
click node_student_agg "https://github.com/jainil019/school-management-system/blob/main/src/services/studentPortalService.ts"
click node_parent_agg "https://github.com/jainil019/school-management-system/blob/main/src/services/parentPortalService.ts"
click node_services "https://github.com/jainil019/school-management-system/tree/main/src/services"
click node_api "https://github.com/jainil019/school-management-system/blob/main/src/services/api.ts"
click node_fastapi "https://github.com/jainil019/school-management-system/blob/main/backend/app/main.py"
click node_student_routes "https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/students.py"
click node_teacher_routes "https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/teachers.py"
click node_attendance_routes "https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/attendance.py"
click node_assignment_routes "https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/assignments.py"
click node_other_routes "https://github.com/jainil019/school-management-system/tree/main/backend/app/routes"
click node_database "https://github.com/jainil019/school-management-system/blob/main/backend/app/database.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_routes,node_login,node_api,node_users toneBlue
class node_admin,node_assignment_ui,node_fees_ui,node_services toneAmber
class node_teacher_ui,node_student_ui,node_parent_ui,node_student_agg,node_parent_agg toneMint
class node_fastapi,node_student_routes,node_teacher_routes,node_attendance_routes,node_assignment_routes,node_other_routes toneRose
class node_database,node_mongo toneIndigo
```

## Components

### Web application

- [Role routing](https://github.com/jainil019/school-management-system/blob/main/src/routes/AppRoutes.tsx): `src/routes/AppRoutes.tsx`
- [Sign in](https://github.com/jainil019/school-management-system/blob/main/src/pages/auth/Login.tsx): `src/pages/auth/Login.tsx`
- [HTTP client](https://github.com/jainil019/school-management-system/blob/main/src/services/api.ts): `src/services/api.ts`

### School records

- [Admin screens](https://github.com/jainil019/school-management-system/tree/main/src/pages/admin): `src/pages/admin`
- [Assignments](https://github.com/jainil019/school-management-system/blob/main/src/pages/admin/Assignments.tsx): `src/pages/admin/Assignments.tsx`
- [Fee management](https://github.com/jainil019/school-management-system/blob/main/src/pages/admin/Fees.tsx): `src/pages/admin/Fees.tsx`
- [Domain services](https://github.com/jainil019/school-management-system/tree/main/src/services): `src/services`

### Role portals

- [Teacher portal](https://github.com/jainil019/school-management-system/tree/main/src/pages/teacher): `src/pages/teacher`
- [Student portal](https://github.com/jainil019/school-management-system/tree/main/src/pages/student): `src/pages/student`
- [Parent portal](https://github.com/jainil019/school-management-system/tree/main/src/pages/parent): `src/pages/parent`
- [Student portal data](https://github.com/jainil019/school-management-system/blob/main/src/services/studentPortalService.ts): `src/services/studentPortalService.ts`
- [Parent portal data](https://github.com/jainil019/school-management-system/blob/main/src/services/parentPortalService.ts): `src/services/parentPortalService.ts`

### API backend

- [API application](https://github.com/jainil019/school-management-system/blob/main/backend/app/main.py): `backend/app/main.py`
- [Student records API](https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/students.py): `backend/app/routes/students.py`
- [Teacher records API](https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/teachers.py): `backend/app/routes/teachers.py`
- [Attendance API](https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/attendance.py): `backend/app/routes/attendance.py`
- [Assignments API](https://github.com/jainil019/school-management-system/blob/main/backend/app/routes/assignments.py): `backend/app/routes/assignments.py`
- [Other school APIs](https://github.com/jainil019/school-management-system/tree/main/backend/app/routes): `backend/app/routes`

### Data storage

- [MongoDB access](https://github.com/jainil019/school-management-system/blob/main/backend/app/database.py): `backend/app/database.py`
- **MongoDB**

### Other components

- **School users**

## Connections

- School users → Role routing: navigate
- Role routing → Sign in: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Admin screens: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Assignments: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Fee management: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Teacher portal: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Student portal: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Role routing → Parent portal: routes to (evidence: `src/routes/AppRoutes.tsx`)
- Assignments → Domain services: uses services (evidence: `src/pages/admin/Assignments.tsx`)
- Fee management → Domain services: uses fees (evidence: `src/pages/admin/Fees.tsx`)
- Teacher portal → Domain services: loads dashboard data (evidence: `src/pages/teacher/TeacherDashboard.tsx`)
- Student portal → Student portal data: loads portal data (evidence: `src/pages/student/StudentDashboard.tsx`)
- Student portal → Student portal data: loads results (evidence: `src/pages/student/StudentResults.tsx`)
- Parent portal → Parent portal data: uses portal data
- Student portal data → Domain services: filters data (evidence: `src/services/studentPortalService.ts`)
- Parent portal data → Domain services: filters data (evidence: `src/services/parentPortalService.ts`)
- Domain services → HTTP client: makes requests (evidence: `src/services/attendanceService.ts`)
- HTTP client → API application: HTTP requests
- API application → Student records API: registers (evidence: `backend/app/main.py`)
- API application → Teacher records API: registers (evidence: `backend/app/main.py`)
- API application → Attendance API: registers (evidence: `backend/app/main.py`)
- API application → Assignments API: registers (evidence: `backend/app/main.py`)
- API application → Other school APIs: registers (evidence: `backend/app/main.py`)
- Student records API → MongoDB access: uses (evidence: `backend/app/routes/students.py`)
- Teacher records API → MongoDB access: uses (evidence: `backend/app/routes/teachers.py`)
- Attendance API → MongoDB access: uses (evidence: `backend/app/routes/attendance.py`)
- Assignments API → MongoDB access: uses (evidence: `backend/app/routes/assignments.py`)
- MongoDB access → MongoDB: connects to (evidence: `backend/app/database.py`)
