# academic-curator/school-curator architecture

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

- Interactive diagram: https://gitdiagram.com/academic-curator/school-curator
- Repository: https://github.com/academic-curator/school-curator

## Overview

Curator Academy is a role-based school management application. Users enter through login and role-specific dashboards, then work with school records and operational modules; administrators can also load initial school data from a workbook. The README documents academics, attendance, finance, timetables, facilities, reports, notifications, settings, and profile self-service, while the sampled implementation shows the shared module workspace, dashboard data loading, selected APIs, and persistence helpers. Some module implementations are unsampled, so their runtime links are not inferred.

Main entry points: [`lib/prisma.ts`](https://github.com/academic-curator/school-curator/blob/main/lib/prisma.ts) (Prisma client), [`components/DashboardHome.tsx`](https://github.com/academic-curator/school-curator/blob/main/components/DashboardHome.tsx) (Dashboard), [`app/api/students/route.ts`](https://github.com/academic-curator/school-curator/blob/main/app/api/students/route.ts) (Student records), [`app/api/v1/[[...path]]/route.ts`](https://github.com/academic-curator/school-curator/blob/main/app/api/v1/%5B%5B...path%5D%5D/route.ts) (Versioned API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_login["Sign-in<br/>[LoginForm.tsx]"]
  node_appshell["Application shell<br/>[AppShell.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardHome.tsx]"]
  node_workspace["Module workspace<br/>[ModulePage.tsx]"]
  node_moduleviews["Module views<br/>[ModuleTabs.tsx]"]
  node_seedui["Setup screen"]
end

subgraph group_school["School operations"]
  node_schooldata["School data loader<br/>[school-data.ts]"]
  node_students["Student records<br/>[route.ts]"]
  node_staff["Staff records<br/>[route.ts]"]
  node_departments["Departments<br/>[route.ts]"]
  node_diary["Class diary<br/>[route.ts]"]
  node_notifications["Notifications<br/>[route.ts]"]
  node_schoolmodules["Other school modules<br/>[ModuleTabs.tsx]"]
end

subgraph group_api["Application APIs"]
  node_loginapi["Login API<br/>[route.ts]"]
  node_schoolapi["Versioned API<br/>[route.ts]"]
  node_seedapi["Workbook import<br/>[route.ts]"]
end

subgraph group_foundation["Shared services"]
  node_access["Role access<br/>[access.ts]"]
  node_auth["Session service<br/>[auth.ts]"]
  node_settings["App settings<br/>[app-settings.ts]"]
  node_database[("PostgreSQL<br/>[schema.prisma]")]
  node_prisma["Prisma client<br/>[prisma.ts]"]
end

node_users(("School users"))

node_users -->|"sign in"| node_login
node_users -->|"use school modules"| node_schoolmodules
node_users -->|"set up school"| node_seedui
node_loginapi -->|"issue session"| node_auth
node_loginapi -->|"look up user"| node_prisma
node_auth -->|"check token"| node_prisma
node_dashboard -->|"load snapshot"| node_schooldata
node_dashboard -->|"render within"| node_appshell
node_dashboard -->|"load settings"| node_settings
node_workspace -->|"render modules"| node_moduleviews
node_students -->|"check session"| node_auth
node_students -->|"enforce roles"| node_access
node_students -->|"read and write"| node_prisma
node_staff -->|"access records"| node_prisma
node_departments -->|"access records"| node_prisma
node_diary -->|"access entries"| node_prisma
node_notifications -->|"access notices"| node_prisma
node_schoolapi -->|"access school data"| node_prisma
node_schoolapi -->|"check permissions"| node_access
node_schoolapi -->|"check exam rules"| node_settings
node_seedapi -->|"load workbook data"| node_prisma
node_prisma -.->|"persist records"| node_database

click node_login "https://github.com/academic-curator/school-curator/blob/main/components/LoginForm.tsx"
click node_appshell "https://github.com/academic-curator/school-curator/blob/main/components/AppShell.tsx"
click node_dashboard "https://github.com/academic-curator/school-curator/blob/main/components/DashboardHome.tsx"
click node_workspace "https://github.com/academic-curator/school-curator/blob/main/components/ModulePage.tsx"
click node_moduleviews "https://github.com/academic-curator/school-curator/blob/main/components/ModuleTabs.tsx"
click node_seedui "https://github.com/academic-curator/school-curator/blob/main/components/SeedSetupScreen.tsx"
click node_schooldata "https://github.com/academic-curator/school-curator/blob/main/lib/school-data.ts"
click node_students "https://github.com/academic-curator/school-curator/blob/main/app/api/students/route.ts"
click node_staff "https://github.com/academic-curator/school-curator/blob/main/app/api/staff/route.ts"
click node_departments "https://github.com/academic-curator/school-curator/blob/main/app/api/departments/route.ts"
click node_diary "https://github.com/academic-curator/school-curator/blob/main/app/api/diary/route.ts"
click node_notifications "https://github.com/academic-curator/school-curator/blob/main/app/api/notifications/route.ts"
click node_schoolmodules "https://github.com/academic-curator/school-curator/blob/main/components/ModuleTabs.tsx"
click node_loginapi "https://github.com/academic-curator/school-curator/blob/main/app/api/auth/login/route.ts"
click node_schoolapi "https://github.com/academic-curator/school-curator/blob/main/app/api/v1/%5B%5B...path%5D%5D/route.ts"
click node_seedapi "https://github.com/academic-curator/school-curator/blob/main/app/api/seed-data/load/route.ts"
click node_access "https://github.com/academic-curator/school-curator/blob/main/lib/access.ts"
click node_auth "https://github.com/academic-curator/school-curator/blob/main/lib/auth.ts"
click node_settings "https://github.com/academic-curator/school-curator/blob/main/lib/app-settings.ts"
click node_database "https://github.com/academic-curator/school-curator/blob/main/prisma/schema.prisma"
click node_prisma "https://github.com/academic-curator/school-curator/blob/main/lib/prisma.ts"

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_login,node_appshell,node_dashboard,node_workspace,node_moduleviews,node_seedui,node_users toneBlue
class node_schooldata,node_students,node_staff,node_departments,node_diary,node_notifications,node_schoolmodules toneAmber
class node_loginapi,node_schoolapi,node_seedapi toneMint
class node_access,node_auth,node_settings,node_database,node_prisma toneRose
```

## Components

### User experience

- [Sign-in](https://github.com/academic-curator/school-curator/blob/main/components/LoginForm.tsx): `components/LoginForm.tsx`
- [Application shell](https://github.com/academic-curator/school-curator/blob/main/components/AppShell.tsx): `components/AppShell.tsx`
- [Dashboard](https://github.com/academic-curator/school-curator/blob/main/components/DashboardHome.tsx): `components/DashboardHome.tsx`
- [Module workspace](https://github.com/academic-curator/school-curator/blob/main/components/ModulePage.tsx): `components/ModulePage.tsx`
- [Module views](https://github.com/academic-curator/school-curator/blob/main/components/ModuleTabs.tsx): `components/ModuleTabs.tsx`
- [Setup screen](https://github.com/academic-curator/school-curator/blob/main/components/SeedSetupScreen.tsx): `components/SeedSetupScreen.tsx`

### School operations

- [School data loader](https://github.com/academic-curator/school-curator/blob/main/lib/school-data.ts): `lib/school-data.ts`
- [Student records](https://github.com/academic-curator/school-curator/blob/main/app/api/students/route.ts): `app/api/students/route.ts`
- [Staff records](https://github.com/academic-curator/school-curator/blob/main/app/api/staff/route.ts): `app/api/staff/route.ts`
- [Departments](https://github.com/academic-curator/school-curator/blob/main/app/api/departments/route.ts): `app/api/departments/route.ts`
- [Class diary](https://github.com/academic-curator/school-curator/blob/main/app/api/diary/route.ts): `app/api/diary/route.ts`
- [Notifications](https://github.com/academic-curator/school-curator/blob/main/app/api/notifications/route.ts): `app/api/notifications/route.ts`
- [Other school modules](https://github.com/academic-curator/school-curator/blob/main/components/ModuleTabs.tsx): `components/ModuleTabs.tsx`

### Application APIs

- [Login API](https://github.com/academic-curator/school-curator/blob/main/app/api/auth/login/route.ts): `app/api/auth/login/route.ts`
- [Versioned API](https://github.com/academic-curator/school-curator/blob/main/app/api/v1/%5B%5B...path%5D%5D/route.ts): `app/api/v1/[[...path]]/route.ts`
- [Workbook import](https://github.com/academic-curator/school-curator/blob/main/app/api/seed-data/load/route.ts): `app/api/seed-data/load/route.ts`

### Shared services

- [Role access](https://github.com/academic-curator/school-curator/blob/main/lib/access.ts): `lib/access.ts`
- [Session service](https://github.com/academic-curator/school-curator/blob/main/lib/auth.ts): `lib/auth.ts`
- [App settings](https://github.com/academic-curator/school-curator/blob/main/lib/app-settings.ts): `lib/app-settings.ts`
- [PostgreSQL](https://github.com/academic-curator/school-curator/blob/main/prisma/schema.prisma): `prisma/schema.prisma`
- [Prisma client](https://github.com/academic-curator/school-curator/blob/main/lib/prisma.ts): `lib/prisma.ts`

### Other components

- **School users**

## Connections

- School users → Sign-in: sign in (evidence: `README.md`)
- School users → Other school modules: use school modules (evidence: `README.md`)
- School users → Setup screen: set up school (evidence: `README.md`)
- Login API → Session service: issue session (evidence: `app/api/auth/login/route.ts`)
- Login API → Prisma client: look up user (evidence: `app/api/auth/login/route.ts`)
- Session service → Prisma client: check token (evidence: `lib/auth.ts`)
- Dashboard → School data loader: load snapshot (evidence: `app/dashboard/page.tsx`)
- Dashboard → Application shell: render within (evidence: `app/dashboard/page.tsx`)
- Dashboard → App settings: load settings (evidence: `app/dashboard/page.tsx`)
- Module workspace → Module views: render modules (evidence: `components/ModulePage.tsx`)
- Student records → Session service: check session (evidence: `app/api/students/route.ts`)
- Student records → Role access: enforce roles (evidence: `app/api/students/route.ts`)
- Student records → Prisma client: read and write (evidence: `app/api/students/route.ts`)
- Staff records → Prisma client: access records (evidence: `app/api/staff/route.ts`)
- Departments → Prisma client: access records (evidence: `app/api/departments/route.ts`)
- Class diary → Prisma client: access entries (evidence: `app/api/diary/route.ts`)
- Notifications → Prisma client: access notices (evidence: `app/api/notifications/route.ts`)
- Versioned API → Prisma client: access school data (evidence: `app/api/v1/[[...path]]/route.ts`)
- Versioned API → Role access: check permissions (evidence: `app/api/v1/[[...path]]/route.ts`)
- Versioned API → App settings: check exam rules (evidence: `app/api/v1/[[...path]]/route.ts`)
- Workbook import → Prisma client: load workbook data (evidence: `app/api/seed-data/load/route.ts`)
- Prisma client → PostgreSQL: persist records (evidence: `README.md`)
