# mwirigijackson07-eng/smartrevisionassistant architecture

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

- Interactive diagram: https://gitdiagram.com/mwirigijackson07-eng/smartrevisionassistant
- Repository: https://github.com/mwirigijackson07-eng/smartrevisionassistant

## Overview

Smart Revision Assistant is a Telegram bot for Kenyan secondary-school revision. Students start at a welcome menu, choose Study Resources, then browse KCSE Form 4 subjects or CBC grades and pathways; selecting a KCSE subject currently reports that materials are unavailable. Quiz, account, and project-information menu responses are also present, but quizzes and accounts are placeholders. The map follows the documented runtime flow; it includes no storage or material-delivery service because neither is implemented.

Main entry points: [`bot.py`](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py) (Welcome and menu), [`handlers/resource_handlers.py`](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/handlers/resource_handlers.py) (Resource routes), [`keyboards/resource_keyboards.py`](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/keyboards/resource_keyboards.py) (Inline keyboards), [`resources/navigation_data.py`](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/resources/navigation_data.py) (Curriculum data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Bot entry and menus"]
  node_bot["Bot application<br/>[bot.py]"]
  node_menu["Welcome and menu<br/>[bot.py]"]
  node_quiz["Quiz placeholder<br/>[bot.py]"]
  node_account["Account placeholder<br/>[bot.py]"]
  node_about["About information<br/>[bot.py]"]
end

subgraph group_navigation["Resource navigation"]
  node_resource_routes["Resource routes"]
  node_resource_screens["Resource screens"]
  node_keyboards["Inline keyboards"]
end

subgraph group_catalog["Curriculum catalog"]
  node_catalog["Curriculum data<br/>[navigation_data.py]"]
end

node_student(("Student"))
node_telegram["Telegram"]

node_student -->|"uses"| node_telegram
node_telegram -->|"delivers updates"| node_bot
node_bot -->|"routes start"| node_menu
node_menu -->|"shows welcome"| node_student
node_menu -->|"registers routes"| node_resource_routes
node_resource_routes -->|"renders selections"| node_resource_screens
node_resource_routes -->|"requests keyboards"| node_keyboards
node_keyboards -->|"reads labels"| node_catalog
node_resource_routes -->|"reads curriculum"| node_catalog
node_menu -->|"shows placeholder"| node_quiz
node_menu -->|"shows placeholder"| node_account
node_menu -->|"shows information"| node_about

click node_bot "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py"
click node_menu "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py"
click node_resource_routes "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/handlers/resource_handlers.py"
click node_resource_screens "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/handlers/resource_handlers.py"
click node_keyboards "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/keyboards/resource_keyboards.py"
click node_catalog "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/resources/navigation_data.py"
click node_quiz "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py"
click node_account "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py"
click node_about "https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.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_bot,node_menu,node_quiz,node_account,node_about toneBlue
class node_resource_routes,node_resource_screens,node_keyboards toneAmber
class node_catalog toneMint
class node_student,node_telegram toneIndigo
```

## Components

### Bot entry and menus

- [Bot application](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py): `bot.py`
- [Welcome and menu](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py): `bot.py`
- [Quiz placeholder](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py): `bot.py`
- [Account placeholder](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py): `bot.py`
- [About information](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/bot.py): `bot.py`

### Resource navigation

- [Resource routes](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/handlers/resource_handlers.py): `handlers/resource_handlers.py`
- [Resource screens](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/handlers/resource_handlers.py): `handlers/resource_handlers.py`
- [Inline keyboards](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/keyboards/resource_keyboards.py): `keyboards/resource_keyboards.py`

### Curriculum catalog

- [Curriculum data](https://github.com/mwirigijackson07-eng/smartrevisionassistant/blob/main/resources/navigation_data.py): `resources/navigation_data.py`

### Other components

- **Student**
- **Telegram**

## Connections

- Student → Telegram: uses (evidence: `README.md`)
- Telegram → Bot application: delivers updates (evidence: `README.md`)
- Bot application → Welcome and menu: routes start (evidence: `bot.py`)
- Welcome and menu → Student: shows welcome (evidence: `bot.py`)
- Welcome and menu → Resource routes: registers routes (evidence: `bot.py`)
- Resource routes → Resource screens: renders selections (evidence: `handlers/resource_handlers.py`)
- Resource routes → Inline keyboards: requests keyboards (evidence: `handlers/resource_handlers.py`)
- Inline keyboards → Curriculum data: reads labels (evidence: `keyboards/resource_keyboards.py`)
- Resource routes → Curriculum data: reads curriculum (evidence: `handlers/resource_handlers.py`)
- Welcome and menu → Quiz placeholder: shows placeholder (evidence: `bot.py`)
- Welcome and menu → Account placeholder: shows placeholder (evidence: `bot.py`)
- Welcome and menu → About information: shows information (evidence: `bot.py`)
