# debarghaaa/schoolos-demo architecture

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

- Interactive diagram: https://gitdiagram.com/debarghaaa/schoolos-demo
- Repository: https://github.com/debarghaaa/schoolos-demo

## Overview

SchoolOS is a multi-tenant school-management platform: users work in role-specific web workspaces, which call a FastAPI API for school and platform operations. The backend also runs queued and periodic jobs, including isolated E-Lab execution. The README documents PostgreSQL, Redis, and S3-compatible storage as infrastructure. The graph groups related domain capabilities rather than listing every route; several backend service and frontend API relationships are based on the documented layout and product topology, since their implementations were not sampled.

Main entry points: [`school-api/app/services`](https://github.com/debarghaaa/schoolos-demo/tree/main/school-api/app/services) (Domain services), [`school-api/app/workers/tasks.py`](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/tasks.py) (Background tasks), [`school-api/app/workers/worker.py`](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/worker.py) (Job worker), [`school-os/src/App.tsx`](https://github.com/debarghaaa/schoolos-demo/blob/main/school-os/src/App.tsx) (React application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web workspace"]
  node_spa["React application<br/>[App.tsx]"]
  node_pages["Role workspaces"]
  node_client["API client<br/>[api.ts]"]
end

subgraph group_api["API and services"]
  node_router["API router<br/>[router.py]"]
  node_services["Domain services"]
end

subgraph group_domain["School capabilities"]
  node_auth["Authentication<br/>[auth.py]"]
  node_academic["Academic records<br/>[academic.py]"]
  node_assignments["Assignments and grades<br/>[assignments.py]"]
  node_attendance["Attendance<br/>[attendance.py]"]
  node_timetable["Timetables<br/>[timetable.py]"]
  node_files["File management<br/>[files.py]"]
  node_elab["E-Lab runs<br/>[elab.py]"]
  node_platform["Platform administration<br/>[platform.py]"]
end

subgraph group_runtime["Data and jobs"]
  node_database[("PostgreSQL")]
  node_redis[("Redis")]
  node_worker["Job worker<br/>[worker.py]"]
  node_tasks["Background tasks<br/>[tasks.py]"]
  node_elab_runner["E-Lab runner<br/>[elab_runner.py]"]
  node_storage["Object storage adapter<br/>[storage.py]"]
end

node_user(("School user"))
node_object_store[("S3-compatible storage")]

node_user -->|"uses"| node_spa
node_spa -->|"routes to"| node_pages
node_pages -->|"requests data"| node_client
node_client -->|"calls API"| node_router
node_router -->|"dispatches"| node_services
node_services -->|"handles identity"| node_auth
node_services -->|"handles academics"| node_academic
node_services -->|"handles coursework"| node_assignments
node_services -->|"handles attendance"| node_attendance
node_services -->|"handles schedules"| node_timetable
node_services -->|"handles files"| node_files
node_services -->|"handles E-Lab"| node_elab
node_services -->|"handles platform"| node_platform
node_services -->|"persists records"| node_database
node_worker -->|"drains queues"| node_redis
node_worker -->|"runs tasks"| node_tasks
node_tasks -->|"reads and writes"| node_database
node_tasks -->|"executes runs"| node_elab_runner
node_elab_runner -->|"updates runs"| node_database
node_files -->|"stores objects"| node_storage
node_storage -->|"reads and writes"| node_object_store

click node_spa "https://github.com/debarghaaa/schoolos-demo/blob/main/school-os/src/App.tsx"
click node_pages "https://github.com/debarghaaa/schoolos-demo/tree/main/school-os/src/pages"
click node_client "https://github.com/debarghaaa/schoolos-demo/blob/main/school-os/src/lib/api.ts"
click node_router "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/api/v1/router.py"
click node_services "https://github.com/debarghaaa/schoolos-demo/tree/main/school-api/app/services"
click node_auth "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/auth.py"
click node_academic "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/academic.py"
click node_assignments "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/assignments.py"
click node_attendance "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/attendance.py"
click node_timetable "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/timetable.py"
click node_files "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/files.py"
click node_elab "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/elab.py"
click node_platform "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/platform.py"
click node_worker "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/worker.py"
click node_tasks "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/tasks.py"
click node_elab_runner "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/elab_runner.py"
click node_storage "https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/integrations/storage.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_spa,node_pages,node_client,node_user toneBlue
class node_router,node_services,node_object_store toneAmber
class node_auth,node_academic,node_assignments,node_attendance,node_timetable,node_files,node_elab,node_platform toneMint
class node_database,node_redis,node_worker,node_tasks,node_elab_runner,node_storage toneRose
```

## Components

### Web workspace

- [React application](https://github.com/debarghaaa/schoolos-demo/blob/main/school-os/src/App.tsx): `school-os/src/App.tsx`
- [Role workspaces](https://github.com/debarghaaa/schoolos-demo/tree/main/school-os/src/pages): `school-os/src/pages`
- [API client](https://github.com/debarghaaa/schoolos-demo/blob/main/school-os/src/lib/api.ts): `school-os/src/lib/api.ts`

### API and services

- [API router](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/api/v1/router.py): `school-api/app/api/v1/router.py`
- [Domain services](https://github.com/debarghaaa/schoolos-demo/tree/main/school-api/app/services): `school-api/app/services`

### School capabilities

- [Authentication](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/auth.py): `school-api/app/services/auth.py`
- [Academic records](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/academic.py): `school-api/app/services/academic.py`
- [Assignments and grades](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/assignments.py): `school-api/app/services/assignments.py`
- [Attendance](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/attendance.py): `school-api/app/services/attendance.py`
- [Timetables](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/timetable.py): `school-api/app/services/timetable.py`
- [File management](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/files.py): `school-api/app/services/files.py`
- [E-Lab runs](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/elab.py): `school-api/app/services/elab.py`
- [Platform administration](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/services/platform.py): `school-api/app/services/platform.py`

### Data and jobs

- **PostgreSQL**
- **Redis**
- [Job worker](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/worker.py): `school-api/app/workers/worker.py`
- [Background tasks](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/tasks.py): `school-api/app/workers/tasks.py`
- [E-Lab runner](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/workers/elab_runner.py): `school-api/app/workers/elab_runner.py`
- [Object storage adapter](https://github.com/debarghaaa/schoolos-demo/blob/main/school-api/app/integrations/storage.py): `school-api/app/integrations/storage.py`

### Other components

- **School user**
- **S3-compatible storage**

## Connections

- School user → React application: uses
- React application → Role workspaces: routes to
- Role workspaces → API client: requests data
- API client → API router: calls API
- API router → Domain services: dispatches
- Domain services → Authentication: handles identity
- Domain services → Academic records: handles academics
- Domain services → Assignments and grades: handles coursework
- Domain services → Attendance: handles attendance
- Domain services → Timetables: handles schedules
- Domain services → File management: handles files
- Domain services → E-Lab runs: handles E-Lab
- Domain services → Platform administration: handles platform
- Domain services → PostgreSQL: persists records
- Job worker → Redis: drains queues
- Job worker → Background tasks: runs tasks
- Background tasks → PostgreSQL: reads and writes
- Background tasks → E-Lab runner: executes runs
- E-Lab runner → PostgreSQL: updates runs
- File management → Object storage adapter: stores objects
- Object storage adapter → S3-compatible storage: reads and writes
