# abdulbosidcoder/mylearncenter architecture

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

- Interactive diagram: https://gitdiagram.com/abdulbosidcoder/mylearncenter
- Repository: https://github.com/abdulbosidcoder/mylearncenter

## Overview

MyLearnCenter is a Telegram Mini App and bot for guided Data Science lessons. Students enter through Telegram, browse published topics and ordered lessons, study content and visualizations, then take quizzes; passing unlocks later lessons and triggers progress notifications. Teachers and administrators edit and publish content, and can turn uploaded materials into AI-generated lesson drafts or request text rewrites. The graph reflects documented material-generation capabilities, though their implementation was not sampled; their exact API/UI paths are supported by the tree and README.

Main entry points: [`backend/app/main.py`](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/main.py) (FastAPI Host), [`backend/app/db.py`](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/db.py) (Application Database), [`frontend/src/App.tsx`](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/App.tsx) (Mini App Router), [`frontend/src/api.ts`](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/api.ts) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Mini App"]
  node_miniapp["Mini App Router<br/>[App.tsx]"]
  node_lesson_ui["Lesson And Quiz UI<br/>[LessonPage.tsx]"]
  node_material_ui["Material Pages<br/>[MaterialsPage.tsx]"]
  node_admin_ui["Admin Page<br/>[AdminPage.tsx]"]
  node_widget_view["Visualization Renderer<br/>[index.tsx]"]
  node_api_client["API Client<br/>[api.ts]"]
end

subgraph group_learning["Learning API"]
  node_api_host["FastAPI Host<br/>[main.py]"]
  node_content_api["Topics And Lessons<br/>[content.py]"]
  node_quiz_api["Quiz And Unlocking<br/>[quiz.py]"]
end

subgraph group_ai["AI Content"]
  node_materials_api["Material Processing<br/>[materials.py]"]
  node_agent["Lesson AI Agent<br/>[agent.py]"]
end

subgraph group_identity["Identity And Bot"]
  node_telegram_auth["Telegram Auth<br/>[telegram_auth.py]"]
  node_users_api["User Management<br/>[users.py]"]
  node_bot["Telegram Bot<br/>[__main__.py]"]
  node_notify["Notifications<br/>[notify.py]"]
end

subgraph group_state["Persistence And Progress"]
  node_database[("Application Database<br/>[db.py]")]
  node_models["Domain Models<br/>[models.py]"]
  node_progress["Progress Rules<br/>[progress.py]"]
end

node_telegram_user(("Telegram User"))
node_anthropic["Anthropic API"]
node_telegram_service["Telegram Platform"]

node_telegram_user -->|"opens"| node_miniapp
node_miniapp -->|"loads user"| node_api_client
node_miniapp -->|"routes to"| node_lesson_ui
node_miniapp -->|"routes to"| node_material_ui
node_miniapp -->|"routes to"| node_admin_ui
node_lesson_ui -->|"requests lessons and quizzes"| node_api_client
node_material_ui -->|"manages materials"| node_api_client
node_admin_ui -->|"manages content and users"| node_api_client
node_lesson_ui -->|"renders visualizations"| node_widget_view
node_api_client -->|"calls API"| node_api_host
node_api_host -->|"validates initData"| node_telegram_auth
node_api_host -->|"dispatches content routes"| node_content_api
node_api_host -->|"dispatches quiz routes"| node_quiz_api
node_api_host -->|"dispatches material routes"| node_materials_api
node_api_host -->|"dispatches user routes"| node_users_api
node_content_api -->|"reads and writes content"| node_database
node_content_api -->|"checks lesson states"| node_progress
node_content_api -->|"requests card rewrite"| node_agent
node_quiz_api -->|"stores attempts"| node_database
node_quiz_api -->|"checks and updates progress"| node_progress
node_quiz_api -->|"announces pass"| node_notify
node_materials_api -->|"stores material jobs"| node_database
node_materials_api -->|"generates lesson drafts"| node_agent
node_agent -.->|"requests generation"| node_anthropic
node_users_api -->|"reads and writes users"| node_database
node_bot -->|"registers users"| node_database
node_bot -->|"gets progress reports"| node_progress
node_bot -->|"polls and replies"| node_telegram_service
node_notify -->|"sends messages"| node_telegram_service
node_telegram_auth -->|"checks signed launch data"| node_telegram_service
node_database -->|"persists domain records"| node_models

click node_miniapp "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/App.tsx"
click node_lesson_ui "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/LessonPage.tsx"
click node_material_ui "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/MaterialsPage.tsx"
click node_admin_ui "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/AdminPage.tsx"
click node_widget_view "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/widgets/index.tsx"
click node_api_client "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/api.ts"
click node_api_host "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/main.py"
click node_content_api "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/content.py"
click node_quiz_api "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/quiz.py"
click node_materials_api "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/materials.py"
click node_agent "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/agent.py"
click node_telegram_auth "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/telegram_auth.py"
click node_users_api "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/users.py"
click node_bot "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/bot/__main__.py"
click node_notify "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/notify.py"
click node_database "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/db.py"
click node_models "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/models.py"
click node_progress "https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/progress.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_miniapp,node_lesson_ui,node_material_ui,node_admin_ui,node_widget_view,node_api_client,node_telegram_user toneBlue
class node_api_host,node_content_api,node_quiz_api toneAmber
class node_materials_api,node_agent,node_anthropic toneMint
class node_telegram_auth,node_users_api,node_bot,node_notify toneRose
class node_database,node_models,node_progress,node_telegram_service toneIndigo
```

## Components

### Mini App

- [Mini App Router](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Lesson And Quiz UI](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/LessonPage.tsx): `frontend/src/pages/LessonPage.tsx`
- [Material Pages](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/MaterialsPage.tsx): `frontend/src/pages/MaterialsPage.tsx`
- [Admin Page](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/pages/AdminPage.tsx): `frontend/src/pages/AdminPage.tsx`
- [Visualization Renderer](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/widgets/index.tsx): `frontend/src/widgets/index.tsx`
- [API Client](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/frontend/src/api.ts): `frontend/src/api.ts`

### Learning API

- [FastAPI Host](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/main.py): `backend/app/main.py`
- [Topics And Lessons](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/content.py): `backend/app/api/content.py`
- [Quiz And Unlocking](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/quiz.py): `backend/app/api/quiz.py`

### AI Content

- [Material Processing](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/materials.py): `backend/app/api/materials.py`
- [Lesson AI Agent](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/agent.py): `backend/app/agent.py`

### Identity And Bot

- [Telegram Auth](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/telegram_auth.py): `backend/app/telegram_auth.py`
- [User Management](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/api/users.py): `backend/app/api/users.py`
- [Telegram Bot](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/bot/__main__.py): `backend/app/bot/__main__.py`
- [Notifications](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/notify.py): `backend/app/notify.py`

### Persistence And Progress

- [Application Database](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/db.py): `backend/app/db.py`
- [Domain Models](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/models.py): `backend/app/models.py`
- [Progress Rules](https://github.com/abdulbosidcoder/mylearncenter/blob/claude/project-thread-avvldj/backend/app/progress.py): `backend/app/progress.py`

### Other components

- **Telegram User**
- **Anthropic API**
- **Telegram Platform**

## Connections

- Telegram User → Mini App Router: opens
- Mini App Router → API Client: loads user
- Mini App Router → Lesson And Quiz UI: routes to
- Mini App Router → Material Pages: routes to
- Mini App Router → Admin Page: routes to
- Lesson And Quiz UI → API Client: requests lessons and quizzes
- Material Pages → API Client: manages materials
- Admin Page → API Client: manages content and users
- Lesson And Quiz UI → Visualization Renderer: renders visualizations
- API Client → FastAPI Host: calls API
- FastAPI Host → Telegram Auth: validates initData
- FastAPI Host → Topics And Lessons: dispatches content routes
- FastAPI Host → Quiz And Unlocking: dispatches quiz routes
- FastAPI Host → Material Processing: dispatches material routes
- FastAPI Host → User Management: dispatches user routes
- Topics And Lessons → Application Database: reads and writes content
- Topics And Lessons → Progress Rules: checks lesson states
- Topics And Lessons → Lesson AI Agent: requests card rewrite
- Quiz And Unlocking → Application Database: stores attempts
- Quiz And Unlocking → Progress Rules: checks and updates progress
- Quiz And Unlocking → Notifications: announces pass
- Material Processing → Application Database: stores material jobs
- Material Processing → Lesson AI Agent: generates lesson drafts
- Lesson AI Agent → Anthropic API: requests generation
- User Management → Application Database: reads and writes users
- Telegram Bot → Application Database: registers users
- Telegram Bot → Progress Rules: gets progress reports
- Telegram Bot → Telegram Platform: polls and replies
- Notifications → Telegram Platform: sends messages
- Telegram Auth → Telegram Platform: checks signed launch data
- Application Database → Domain Models: persists domain records
