# ebanatrm100/tactalab architecture

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

- Interactive diagram: https://gitdiagram.com/ebanatrm100/tactalab
- Repository: https://github.com/ebanatrm100/tactalab

## Overview

TACTALAB is an offline-first inclusive education platform for schools, learners and caregivers. Teachers create and adapt lessons in Studio; learners open lessons in the reader, where accessibility profiles shape the learning experience and quiz progress is recorded. The application also covers screening, exams, teacher development, compliance, assistive-device support and school impact. Local storage and sync support offline use. Some feature pages and server internals were not excerpted, so their documented capabilities are shown without speculative implementation links.

Main entry points: [`src/App.tsx`](https://github.com/ebanatrm100/tactalab/blob/main/src/App.tsx) (Application routes), [`src/pages/LessonReader.tsx`](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/LessonReader.tsx) (Lesson reader), [`src/components/Shell.tsx`](https://github.com/ebanatrm100/tactalab/blob/main/src/components/Shell.tsx) (Role navigation), [`src/state/AppContext.tsx`](https://github.com/ebanatrm100/tactalab/blob/main/src/state/AppContext.tsx) (Session and profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["Application routes<br/>[App.tsx]"]
  node_shell["Role navigation<br/>[Shell.tsx]"]
  node_context["Session and profiles<br/>[AppContext.tsx]"]
end

subgraph group_learning["Accessible learning"]
  node_studio["Lesson authoring<br/>[Studio.tsx]"]
  node_adapt["Lesson adaptation<br/>[adapt.ts]"]
  node_reader["Lesson reader<br/>[LessonReader.tsx]"]
  node_speech["Speech services<br/>[speech.ts]"]
  node_nativevoice["Kinyarwanda voice<br/>[kinyarwandaTts.ts]"]
  node_quiz["Quiz player<br/>[QuizPlayer.tsx]"]
  node_braille["Braille export<br/>[BrailleExport.tsx]"]
end

subgraph group_school["School operations"]
  node_students["Student management<br/>[Students.tsx]"]
  node_exams["Exam accommodations<br/>[Exams.tsx]"]
  node_screening["Early screening<br/>[Screening.tsx]"]
  node_cpd["Teacher CPD<br/>[Cpd.tsx]"]
  node_audit["School audit<br/>[Audit.tsx]"]
  node_reporting["Ministry reporting"]
end

subgraph group_inclusion["Inclusion tools"]
  node_devices["Device repair hub<br/>[Devices.tsx]"]
  node_toolkit["Study toolkit<br/>[Toolkit.tsx]"]
  node_sos["Emergency SOS<br/>[EmergencySos.tsx]"]
end

subgraph group_platform["Offline platform"]
  node_classroom["Classroom bundles<br/>[ClassroomHub.tsx]"]
  node_sync["Outbox sync<br/>[sync.ts]"]
  node_storage[("Offline data store<br/>[storage.ts]")]
  node_idb[("IndexedDB access<br/>[idb.ts]")]
  node_crypto["Data protection<br/>[crypto.ts]"]
  node_api["Application server<br/>[index.mjs]"]
  node_serverdata[("Server data")]
  node_localizer["Localization<br/>[i18n.ts]"]
end

node_educator(("Educator"))
node_learner(("Learner"))

node_educator -->|"uses"| node_app
node_learner -->|"uses"| node_app
node_app -->|"renders"| node_shell
node_app -->|"routes to"| node_studio
node_app -->|"routes to"| node_reader
node_app -->|"routes to"| node_students
node_app -->|"routes to"| node_exams
node_app -->|"routes to"| node_screening
node_app -->|"routes to"| node_cpd
node_app -->|"routes to"| node_audit
node_app -->|"routes to"| node_toolkit
node_studio -->|"sanitizes text"| node_adapt
node_studio -->|"saves lessons"| node_storage
node_reader -->|"adapts content"| node_adapt
node_reader -->|"uses speech"| node_speech
node_reader -->|"fetches audio"| node_nativevoice
node_reader -->|"renders"| node_quiz
node_reader -->|"renders"| node_braille
node_reader -->|"records progress"| node_context
node_context -->|"persists state"| node_storage
node_context -->|"queues changes"| node_sync
node_storage -->|"stores records"| node_idb
node_storage -->|"encrypts profiles"| node_crypto
node_classroom -.->|"imports exports"| node_sync
node_sync -.->|"sends bundles"| node_api
node_api -.->|"persists data"| node_serverdata
node_toolkit -->|"reads aloud"| node_speech
node_toolkit -->|"exports Braille"| node_braille
node_shell -->|"renders"| node_sos
node_shell -->|"uses session"| node_context
node_app -->|"routes to"| node_devices
node_app -->|"renders dashboard panel"| node_reporting
node_app -.->|"routes to"| node_classroom
node_shell -->|"translates UI"| node_localizer

click node_app "https://github.com/ebanatrm100/tactalab/blob/main/src/App.tsx"
click node_shell "https://github.com/ebanatrm100/tactalab/blob/main/src/components/Shell.tsx"
click node_context "https://github.com/ebanatrm100/tactalab/blob/main/src/state/AppContext.tsx"
click node_studio "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Studio.tsx"
click node_adapt "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/adapt.ts"
click node_reader "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/LessonReader.tsx"
click node_speech "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/speech.ts"
click node_nativevoice "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/kinyarwandaTts.ts"
click node_quiz "https://github.com/ebanatrm100/tactalab/blob/main/src/components/QuizPlayer.tsx"
click node_braille "https://github.com/ebanatrm100/tactalab/blob/main/src/components/BrailleExport.tsx"
click node_students "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Students.tsx"
click node_exams "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Exams.tsx"
click node_screening "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Screening.tsx"
click node_cpd "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Cpd.tsx"
click node_audit "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Audit.tsx"
click node_reporting "https://github.com/ebanatrm100/tactalab/blob/main/src/components/MinEducReportPanel.tsx"
click node_devices "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Devices.tsx"
click node_toolkit "https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Toolkit.tsx"
click node_sos "https://github.com/ebanatrm100/tactalab/blob/main/src/components/EmergencySos.tsx"
click node_classroom "https://github.com/ebanatrm100/tactalab/blob/main/src/components/ClassroomHub.tsx"
click node_sync "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/sync.ts"
click node_storage "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/storage.ts"
click node_idb "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/idb.ts"
click node_crypto "https://github.com/ebanatrm100/tactalab/blob/main/src/lib/crypto.ts"
click node_api "https://github.com/ebanatrm100/tactalab/blob/main/server/index.mjs"
click node_serverdata "https://github.com/ebanatrm100/tactalab/tree/main/server/data"
click node_localizer "https://github.com/ebanatrm100/tactalab/blob/main/src/i18n.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_app,node_shell,node_context toneBlue
class node_studio,node_adapt,node_reader,node_speech,node_nativevoice,node_quiz,node_braille toneAmber
class node_students,node_exams,node_screening,node_cpd,node_audit,node_reporting toneMint
class node_devices,node_toolkit,node_sos toneRose
class node_classroom,node_sync,node_storage,node_idb,node_crypto,node_api,node_serverdata,node_localizer,node_educator,node_learner toneIndigo
```

## Components

### Application shell

- [Application routes](https://github.com/ebanatrm100/tactalab/blob/main/src/App.tsx): `src/App.tsx`
- [Role navigation](https://github.com/ebanatrm100/tactalab/blob/main/src/components/Shell.tsx): `src/components/Shell.tsx`
- [Session and profiles](https://github.com/ebanatrm100/tactalab/blob/main/src/state/AppContext.tsx): `src/state/AppContext.tsx`

### Accessible learning

- [Lesson authoring](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Studio.tsx): `src/pages/Studio.tsx`
- [Lesson adaptation](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/adapt.ts): `src/lib/adapt.ts`
- [Lesson reader](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/LessonReader.tsx): `src/pages/LessonReader.tsx`
- [Speech services](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/speech.ts): `src/lib/speech.ts`
- [Kinyarwanda voice](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/kinyarwandaTts.ts): `src/lib/kinyarwandaTts.ts`
- [Quiz player](https://github.com/ebanatrm100/tactalab/blob/main/src/components/QuizPlayer.tsx): `src/components/QuizPlayer.tsx`
- [Braille export](https://github.com/ebanatrm100/tactalab/blob/main/src/components/BrailleExport.tsx): `src/components/BrailleExport.tsx`

### School operations

- [Student management](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Students.tsx): `src/pages/Students.tsx`
- [Exam accommodations](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Exams.tsx): `src/pages/Exams.tsx`
- [Early screening](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Screening.tsx): `src/pages/Screening.tsx`
- [Teacher CPD](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Cpd.tsx): `src/pages/Cpd.tsx`
- [School audit](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Audit.tsx): `src/pages/Audit.tsx`
- [Ministry reporting](https://github.com/ebanatrm100/tactalab/blob/main/src/components/MinEducReportPanel.tsx): `src/components/MinEducReportPanel.tsx`

### Inclusion tools

- [Device repair hub](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Devices.tsx): `src/pages/Devices.tsx`
- [Study toolkit](https://github.com/ebanatrm100/tactalab/blob/main/src/pages/Toolkit.tsx): `src/pages/Toolkit.tsx`
- [Emergency SOS](https://github.com/ebanatrm100/tactalab/blob/main/src/components/EmergencySos.tsx): `src/components/EmergencySos.tsx`

### Offline platform

- [Classroom bundles](https://github.com/ebanatrm100/tactalab/blob/main/src/components/ClassroomHub.tsx): `src/components/ClassroomHub.tsx`
- [Outbox sync](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/sync.ts): `src/lib/sync.ts`
- [Offline data store](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [IndexedDB access](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/idb.ts): `src/lib/idb.ts`
- [Data protection](https://github.com/ebanatrm100/tactalab/blob/main/src/lib/crypto.ts): `src/lib/crypto.ts`
- [Application server](https://github.com/ebanatrm100/tactalab/blob/main/server/index.mjs): `server/index.mjs`
- [Server data](https://github.com/ebanatrm100/tactalab/tree/main/server/data): `server/data`
- [Localization](https://github.com/ebanatrm100/tactalab/blob/main/src/i18n.ts): `src/i18n.ts`

### Other components

- **Educator**
- **Learner**

## Connections

- Educator → Application routes: uses (evidence: `src/App.tsx`)
- Learner → Application routes: uses (evidence: `src/App.tsx`)
- Application routes → Role navigation: renders (evidence: `src/App.tsx`)
- Application routes → Lesson authoring: routes to (evidence: `src/App.tsx`)
- Application routes → Lesson reader: routes to (evidence: `src/App.tsx`)
- Application routes → Student management: routes to (evidence: `src/App.tsx`)
- Application routes → Exam accommodations: routes to (evidence: `src/App.tsx`)
- Application routes → Early screening: routes to (evidence: `src/App.tsx`)
- Application routes → Teacher CPD: routes to (evidence: `src/App.tsx`)
- Application routes → School audit: routes to (evidence: `src/App.tsx`)
- Application routes → Study toolkit: routes to (evidence: `src/App.tsx`)
- Lesson authoring → Lesson adaptation: sanitizes text (evidence: `src/pages/Studio.tsx`)
- Lesson authoring → Offline data store: saves lessons (evidence: `src/pages/Studio.tsx`)
- Lesson reader → Lesson adaptation: adapts content (evidence: `src/pages/LessonReader.tsx`)
- Lesson reader → Speech services: uses speech (evidence: `src/pages/LessonReader.tsx`)
- Lesson reader → Kinyarwanda voice: fetches audio (evidence: `src/pages/LessonReader.tsx`)
- Lesson reader → Quiz player: renders (evidence: `src/pages/LessonReader.tsx`)
- Lesson reader → Braille export: renders (evidence: `src/pages/LessonReader.tsx`)
- Lesson reader → Session and profiles: records progress (evidence: `src/state/AppContext.tsx`)
- Session and profiles → Offline data store: persists state (evidence: `src/state/AppContext.tsx`)
- Session and profiles → Outbox sync: queues changes (evidence: `src/state/AppContext.tsx`)
- Offline data store → IndexedDB access: stores records (evidence: `src/lib/storage.ts`)
- Offline data store → Data protection: encrypts profiles (evidence: `src/lib/storage.ts`)
- Classroom bundles → Outbox sync: imports exports
- Outbox sync → Application server: sends bundles
- Application server → Server data: persists data (evidence: `README.md`)
- Study toolkit → Speech services: reads aloud (evidence: `README.md`)
- Study toolkit → Braille export: exports Braille (evidence: `README.md`)
- Role navigation → Emergency SOS: renders (evidence: `src/components/Shell.tsx`)
- Role navigation → Session and profiles: uses session (evidence: `src/components/Shell.tsx`)
- Application routes → Device repair hub: routes to (evidence: `src/App.tsx`)
- Application routes → Ministry reporting: renders dashboard panel
- Application routes → Classroom bundles: routes to
- Role navigation → Localization: translates UI (evidence: `src/components/Shell.tsx`)
