# sunshine25txt/school_management_system architecture

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

- Interactive diagram: https://gitdiagram.com/sunshine25txt/school_management_system
- Repository: https://github.com/sunshine25txt/school_management_system

## Overview

School Management System is a React/Go school administration product backed by shared PostgreSQL. Users sign in or register, enter a role-based workspace, and manage school records through frontend API calls to the Go service. Major workflows cover academic setup, enrollment, attendance, grades, fees, admissions, announcements, and reporting. The README documents the API/database arrangement and setup order; unsampled backend routing and repository calls are not asserted here.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/App.jsx) (Workspace routing), [`frontend/src/api/index.js`](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/index.js) (HTTP API client), [`frontend/src/api/operations.js`](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/operations.js) (Operations API), [`frontend/src/pages/Classes.jsx`](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Classes.jsx) (Calendar and classes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Workspace routing<br/>[App.jsx]"]
  node_landing["Registration and sign-in<br/>[LandingPage.jsx]"]
  node_navbar["Navigation and alerts<br/>[Navbar.jsx]"]
  node_sidebar["Role navigation<br/>[Sidebar.jsx]"]
end

subgraph group_school_ops["School operations"]
  node_classes["Calendar and classes<br/>[Classes.jsx]"]
  node_curriculum["Curriculum<br/>[Curriculum.jsx]"]
  node_enrollment["Student enrollment<br/>[Students.jsx]"]
  node_attendance["Attendance"]
  node_grades["Grades and assessment<br/>[Grades.jsx]"]
  node_fees["Fees and transfers<br/>[Fees.jsx]"]
  node_admissions["Admissions<br/>[Admissions.jsx]"]
  node_accounts["Account approvals<br/>[Accounts.jsx]"]
  node_announcements["Announcements<br/>[Announcements.jsx]"]
  node_timetable["Timetable<br/>[Timetable.jsx]"]
  node_reports["School reports<br/>[SchoolReports.jsx]"]
end

subgraph group_api["API and identity"]
  node_auth_context["Session context<br/>[AuthContext.jsx]"]
  node_api_client["HTTP API client<br/>[index.js]"]
  node_academic_api["Academic API<br/>[academic.js]"]
  node_operations_api["Operations API<br/>[operations.js]"]
  node_assessment_api["Assessment API<br/>[assessment.js]"]
  node_fees_api["Fees API<br/>[fees.js]"]
  node_go_server["Go API server<br/>[main.go]"]
end

subgraph group_persistence["Persistence"]
  node_postgres[("PostgreSQL")]
end

node_school_user(("School user"))

node_school_user -->|"signs in"| node_landing
node_school_user -.->|"uses workspace"| node_app
node_app -->|"reads session"| node_auth_context
node_app -->|"shows unauthenticated"| node_landing
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_classes
node_app -->|"routes to"| node_curriculum
node_app -->|"routes to"| node_enrollment
node_app -->|"routes to"| node_attendance
node_app -->|"routes to"| node_grades
node_app -->|"routes to"| node_fees
node_app -->|"routes to"| node_admissions
node_app -->|"routes to"| node_accounts
node_app -->|"routes to"| node_announcements
node_app -->|"routes to"| node_timetable
node_app -->|"routes to"| node_reports
node_auth_context -->|"calls"| node_api_client
node_landing -->|"requests password reset"| node_api_client
node_navbar -->|"loads alerts"| node_operations_api
node_classes -->|"calls class endpoints"| node_api_client
node_classes -->|"calls academic endpoints"| node_academic_api
node_attendance -->|"loads roster"| node_academic_api
node_admissions -->|"uses operations requests"| node_operations_api
node_announcements -->|"uses operations requests"| node_operations_api
node_reports -->|"loads report data"| node_operations_api
node_grades -->|"uses assessment endpoints"| node_assessment_api
node_fees -->|"uses fee endpoints"| node_fees_api
node_academic_api -->|"sends requests"| node_api_client
node_operations_api -->|"sends requests"| node_api_client
node_api_client -->|"sends HTTP requests"| node_go_server
node_go_server -->|"uses shared database"| node_postgres

click node_app "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/App.jsx"
click node_auth_context "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/context/AuthContext.jsx"
click node_landing "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/LandingPage.jsx"
click node_navbar "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/components/Navbar.jsx"
click node_sidebar "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/components/Sidebar.jsx"
click node_classes "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Classes.jsx"
click node_curriculum "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Curriculum.jsx"
click node_enrollment "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Students.jsx"
click node_attendance "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/AttendanceWorkflows.jsx"
click node_grades "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Grades.jsx"
click node_fees "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Fees.jsx"
click node_admissions "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Admissions.jsx"
click node_accounts "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Accounts.jsx"
click node_announcements "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Announcements.jsx"
click node_timetable "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Timetable.jsx"
click node_reports "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/SchoolReports.jsx"
click node_api_client "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/index.js"
click node_academic_api "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/academic.js"
click node_operations_api "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/operations.js"
click node_assessment_api "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/assessment.js"
click node_fees_api "https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/fees.js"
click node_go_server "https://github.com/sunshine25txt/school_management_system/blob/main/backend/cmd/server/main.go"

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_landing,node_navbar,node_sidebar,node_school_user toneBlue
class node_classes,node_curriculum,node_enrollment,node_attendance,node_grades,node_fees,node_admissions,node_accounts,node_announcements,node_timetable,node_reports toneAmber
class node_auth_context,node_api_client,node_academic_api,node_operations_api,node_assessment_api,node_fees_api,node_go_server toneMint
class node_postgres toneRose
```

## Components

### User experience

- [Workspace routing](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Registration and sign-in](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/LandingPage.jsx): `frontend/src/pages/LandingPage.jsx`
- [Navigation and alerts](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Role navigation](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/components/Sidebar.jsx): `frontend/src/components/Sidebar.jsx`

### School operations

- [Calendar and classes](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Classes.jsx): `frontend/src/pages/Classes.jsx`
- [Curriculum](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Curriculum.jsx): `frontend/src/pages/Curriculum.jsx`
- [Student enrollment](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Students.jsx): `frontend/src/pages/Students.jsx`
- [Attendance](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/AttendanceWorkflows.jsx): `frontend/src/pages/AttendanceWorkflows.jsx`
- [Grades and assessment](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Grades.jsx): `frontend/src/pages/Grades.jsx`
- [Fees and transfers](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Fees.jsx): `frontend/src/pages/Fees.jsx`
- [Admissions](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Admissions.jsx): `frontend/src/pages/Admissions.jsx`
- [Account approvals](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Accounts.jsx): `frontend/src/pages/Accounts.jsx`
- [Announcements](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Announcements.jsx): `frontend/src/pages/Announcements.jsx`
- [Timetable](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/Timetable.jsx): `frontend/src/pages/Timetable.jsx`
- [School reports](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/pages/SchoolReports.jsx): `frontend/src/pages/SchoolReports.jsx`

### API and identity

- [Session context](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [HTTP API client](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/index.js): `frontend/src/api/index.js`
- [Academic API](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/academic.js): `frontend/src/api/academic.js`
- [Operations API](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/operations.js): `frontend/src/api/operations.js`
- [Assessment API](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/assessment.js): `frontend/src/api/assessment.js`
- [Fees API](https://github.com/sunshine25txt/school_management_system/blob/main/frontend/src/api/fees.js): `frontend/src/api/fees.js`
- [Go API server](https://github.com/sunshine25txt/school_management_system/blob/main/backend/cmd/server/main.go): `backend/cmd/server/main.go`

### Persistence

- **PostgreSQL**

### Other components

- **School user**

## Connections

- School user → Registration and sign-in: signs in
- School user → Workspace routing: uses workspace
- Workspace routing → Session context: reads session (evidence: `frontend/src/App.jsx`)
- Workspace routing → Registration and sign-in: shows unauthenticated (evidence: `frontend/src/App.jsx`)
- Workspace routing → Role navigation: renders (evidence: `frontend/src/App.jsx`)
- Workspace routing → Navigation and alerts: renders (evidence: `frontend/src/App.jsx`)
- Workspace routing → Calendar and classes: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Curriculum: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Student enrollment: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Attendance: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Grades and assessment: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Fees and transfers: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Admissions: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Account approvals: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Announcements: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → Timetable: routes to (evidence: `frontend/src/App.jsx`)
- Workspace routing → School reports: routes to (evidence: `frontend/src/App.jsx`)
- Session context → HTTP API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Registration and sign-in → HTTP API client: requests password reset (evidence: `frontend/src/pages/LandingPage.jsx`)
- Navigation and alerts → Operations API: loads alerts (evidence: `frontend/src/components/Navbar.jsx`)
- Calendar and classes → HTTP API client: calls class endpoints (evidence: `frontend/src/pages/Classes.jsx`)
- Calendar and classes → Academic API: calls academic endpoints (evidence: `frontend/src/pages/Classes.jsx`)
- Attendance → Academic API: loads roster (evidence: `frontend/src/pages/AttendanceWorkflows.jsx`)
- Admissions → Operations API: uses operations requests (evidence: `frontend/src/pages/Admissions.jsx`)
- Announcements → Operations API: uses operations requests (evidence: `frontend/src/pages/Announcements.jsx`)
- School reports → Operations API: loads report data (evidence: `frontend/src/pages/SchoolReports.jsx`)
- Grades and assessment → Assessment API: uses assessment endpoints (evidence: `frontend/src/pages/Grades.jsx`)
- Fees and transfers → Fees API: uses fee endpoints (evidence: `frontend/src/pages/Fees.jsx`)
- Academic API → HTTP API client: sends requests (evidence: `frontend/src/api/academic.js`)
- Operations API → HTTP API client: sends requests (evidence: `frontend/src/api/operations.js`)
- HTTP API client → Go API server: sends HTTP requests (evidence: `README.md`)
- Go API server → PostgreSQL: uses shared database (evidence: `README.md`)
