# stevengiki201/school-app architecture

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

- Interactive diagram: https://gitdiagram.com/stevengiki201/school-app
- Repository: https://github.com/stevengiki201/school-app

## Overview

ShuleBomba is a teacher-facing school app for managing multiple classes and their students. The main workflow is to browse or select a class, manage its roster, record attendance, and review saved roll calls; the app also supports tests and attendance exports. A MobX-state-tree root store holds school data and persists snapshots locally, while separate services handle server synchronization and report generation. The README describes attendance locking and password-based correction within one day. Several screen implementations were not sampled, so their detailed calls are not asserted.

Main entry points: [`components/models/index.ts`](https://github.com/stevengiki201/school-app/blob/main/components/models/index.ts) (School Data Store), [`services/syncFromServer.ts`](https://github.com/stevengiki201/school-app/blob/main/services/syncFromServer.ts) (Server Sync), [`app/(tabs)/index.tsx`](https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/index.tsx) (Class Dashboard), [`services/exportAttendance.ts`](https://github.com/stevengiki201/school-app/blob/main/services/exportAttendance.ts) (Report Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_classroom["Class Management"]
  node_home["Class Dashboard<br/>[index.tsx]"]
  node_classview["Class View<br/>[classview.tsx]"]
  node_classcreate["Create Class<br/>[addclass.tsx]"]
  node_student["Student Management<br/>[add-student.tsx]"]
  node_classdelete["Delete Class<br/>[delete-class.tsx]"]
end

subgraph group_records["School Records"]
  node_attendance["Attendance Entry<br/>[attendance.tsx]"]
  node_savedroll["Saved Roll Calls<br/>[saved-rolcall.tsx]"]
  node_exports["Attendance Export<br/>[exports.tsx]"]
  node_exportservice["Report Generator"]
  node_tests["Test Scores<br/>[test-score.tsx]"]
  node_testcreate["Create Test<br/>[add-test.tsx]"]
end

subgraph group_state["State and Sync"]
  node_store[("School Data Store<br/>[index.ts]")]
  node_sync["Server Sync<br/>[syncFromServer.ts]"]
  node_uploads["Teacher Upload API"]
end

subgraph group_account["Account and Preferences"]
  node_settings["Settings<br/>[settings.tsx]"]
  node_account["Teacher Account<br/>[account.tsx]"]
  node_preferences["App Preferences<br/>[app-preference.tsx]"]
  node_madarasa["Class Management Settings"]
  node_about["About App<br/>[about-app.tsx]"]
end

node_teacher(("Teacher"))

node_teacher -->|"opens"| node_home
node_home -->|"opens class"| node_classview
node_exports -->|"requests report"| node_exportservice
node_exportservice -->|"reads attendance"| node_store
node_store -->|"persists snapshot"| node_store
node_sync -->|"fetches uploads"| node_uploads
node_sync -->|"applies snapshot"| node_store

click node_home "https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/index.tsx"
click node_classview "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/classview.tsx"
click node_classcreate "https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/addclass.tsx"
click node_student "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/add-student.tsx"
click node_classdelete "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/delete-class.tsx"
click node_attendance "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/attendance.tsx"
click node_savedroll "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/saved-rolcall.tsx"
click node_exports "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/exports.tsx"
click node_exportservice "https://github.com/stevengiki201/school-app/blob/main/services/exportAttendance.ts"
click node_tests "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/test-score.tsx"
click node_testcreate "https://github.com/stevengiki201/school-app/blob/main/app/(classes)/add-test.tsx"
click node_store "https://github.com/stevengiki201/school-app/blob/main/components/models/index.ts"
click node_sync "https://github.com/stevengiki201/school-app/blob/main/services/syncFromServer.ts"
click node_uploads "https://github.com/stevengiki201/school-app/blob/main/services/teacherUploadsApi.ts"
click node_settings "https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/settings.tsx"
click node_account "https://github.com/stevengiki201/school-app/blob/main/app/account.tsx"
click node_preferences "https://github.com/stevengiki201/school-app/blob/main/app/app-preference.tsx"
click node_madarasa "https://github.com/stevengiki201/school-app/blob/main/app/manage-madarasa.tsx"
click node_about "https://github.com/stevengiki201/school-app/blob/main/app/about-app.tsx"

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_home,node_classview,node_classcreate,node_student,node_classdelete toneBlue
class node_attendance,node_savedroll,node_exports,node_exportservice,node_tests,node_testcreate toneAmber
class node_store,node_sync,node_uploads toneMint
class node_settings,node_account,node_preferences,node_madarasa,node_about toneRose
class node_teacher toneIndigo
```

## Components

### Class Management

- [Class Dashboard](https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Class View](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/classview.tsx): `app/(classes)/classview.tsx`
- [Create Class](https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/addclass.tsx): `app/(tabs)/addclass.tsx`
- [Student Management](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/add-student.tsx): `app/(classes)/add-student.tsx`
- [Delete Class](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/delete-class.tsx): `app/(classes)/delete-class.tsx`

### School Records

- [Attendance Entry](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/attendance.tsx): `app/(classes)/attendance.tsx`
- [Saved Roll Calls](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/saved-rolcall.tsx): `app/(classes)/saved-rolcall.tsx`
- [Attendance Export](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/exports.tsx): `app/(classes)/exports.tsx`
- [Report Generator](https://github.com/stevengiki201/school-app/blob/main/services/exportAttendance.ts): `services/exportAttendance.ts`
- [Test Scores](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/test-score.tsx): `app/(classes)/test-score.tsx`
- [Create Test](https://github.com/stevengiki201/school-app/blob/main/app/(classes)/add-test.tsx): `app/(classes)/add-test.tsx`

### State and Sync

- [School Data Store](https://github.com/stevengiki201/school-app/blob/main/components/models/index.ts): `components/models/index.ts`
- [Server Sync](https://github.com/stevengiki201/school-app/blob/main/services/syncFromServer.ts): `services/syncFromServer.ts`
- [Teacher Upload API](https://github.com/stevengiki201/school-app/blob/main/services/teacherUploadsApi.ts): `services/teacherUploadsApi.ts`

### Account and Preferences

- [Settings](https://github.com/stevengiki201/school-app/blob/main/app/(tabs)/settings.tsx): `app/(tabs)/settings.tsx`
- [Teacher Account](https://github.com/stevengiki201/school-app/blob/main/app/account.tsx): `app/account.tsx`
- [App Preferences](https://github.com/stevengiki201/school-app/blob/main/app/app-preference.tsx): `app/app-preference.tsx`
- [Class Management Settings](https://github.com/stevengiki201/school-app/blob/main/app/manage-madarasa.tsx): `app/manage-madarasa.tsx`
- [About App](https://github.com/stevengiki201/school-app/blob/main/app/about-app.tsx): `app/about-app.tsx`

### Other components

- **Teacher**

## Connections

- Teacher → Class Dashboard: opens
- Class Dashboard → Class View: opens class (evidence: `app/(tabs)/index.tsx`)
- Attendance Export → Report Generator: requests report (evidence: `app/(classes)/exports.tsx`)
- Report Generator → School Data Store: reads attendance (evidence: `services/exportAttendance.ts`)
- School Data Store → School Data Store: persists snapshot (evidence: `components/models/index.ts`)
- Server Sync → Teacher Upload API: fetches uploads (evidence: `services/syncFromServer.ts`)
- Server Sync → School Data Store: applies snapshot (evidence: `services/syncFromServer.ts`)
