# andriypuhalsky/ai-academy architecture

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

- Interactive diagram: https://gitdiagram.com/andriypuhalsky/ai-academy
- Repository: https://github.com/andriypuhalsky/ai-academy

## Overview

This appears to be a static AI-learning site, served locally with Python’s HTTP server. The likely user journey is to browse course and roadmap content, complete learning activities, and use account-backed progress or certificates; the filenames identify these capabilities, but the README does not describe the product workflow. The graph preserves the main learning, account, and administration areas while limiting connections to those supported by the excerpts. In particular, the excerpts confirm Supabase-backed authentication and Telegram administration, but do not show how lessons, quizzes, progress, and certificates are wired together.

Main entry points: [`tg/telegram_index.ts`](https://github.com/andriypuhalsky/ai-academy/blob/main/tg/telegram_index.ts) (Telegram function), [`js/roadmap-render.js`](https://github.com/andriypuhalsky/ai-academy/blob/main/js/roadmap-render.js) (Learning roadmap), [`js/auth-ui.js`](https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth-ui.js) (Authentication UI), [`js/auth.js`](https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth.js) (Authentication data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_course["Course modules<br/>[module.js]"]
  node_roadmap["Learning roadmap<br/>[roadmap-render.js]"]
  node_quiz["Quizzes<br/>[quiz.js]"]
end

subgraph group_account["Account and records"]
  node_progress["Progress tracking<br/>[progress.js]"]
  node_certificates["Certificates<br/>[certificate.js]"]
  node_verification["Certificate verification<br/>[verify.js]"]
  node_authui["Authentication UI<br/>[auth-ui.js]"]
  node_auth["Authentication data<br/>[auth.js]"]
end

subgraph group_presentation["Shared presentation"]
  node_roadmapmotion["Roadmap motion<br/>[roadmap-motion.js]"]
  node_theme["Theme utilities<br/>[tw-theme.js]"]
  node_motion["Motion utilities<br/>[motion.js]"]
  node_mermaid["Diagram rendering<br/>[mermaid-init.js]"]
end

subgraph group_operations["Admin operations"]
  node_contact["Contact form<br/>[contact.js]"]
  node_telegramfn["Telegram function<br/>[telegram_index.ts]"]
end

node_learner(("Learner"))
node_supabase[("Supabase")]
node_telegram["Telegram"]
node_contactactor(("Contact sender"))

node_learner -->|"browses"| node_course
node_learner -->|"views"| node_roadmap
node_learner -->|"uses"| node_quiz
node_learner -->|"opens account"| node_authui
node_authui -->|"dispatches handlers"| node_auth
node_auth -->|"auth and profile requests"| node_supabase
node_learner -->|"checks certificate"| node_verification
node_contactactor -->|"submits message"| node_contact
node_telegram -->|"sends updates"| node_telegramfn
node_telegramfn -->|"queries admin report"| node_supabase
node_telegramfn -->|"sends messages"| node_telegram
node_roadmap -->|"animates"| node_roadmapmotion

click node_course "https://github.com/andriypuhalsky/ai-academy/blob/main/js/module.js"
click node_roadmap "https://github.com/andriypuhalsky/ai-academy/blob/main/js/roadmap-render.js"
click node_roadmapmotion "https://github.com/andriypuhalsky/ai-academy/blob/main/js/roadmap-motion.js"
click node_quiz "https://github.com/andriypuhalsky/ai-academy/blob/main/js/quiz.js"
click node_progress "https://github.com/andriypuhalsky/ai-academy/blob/main/js/progress.js"
click node_certificates "https://github.com/andriypuhalsky/ai-academy/blob/main/js/certificate.js"
click node_verification "https://github.com/andriypuhalsky/ai-academy/blob/main/js/verify.js"
click node_authui "https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth-ui.js"
click node_auth "https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth.js"
click node_contact "https://github.com/andriypuhalsky/ai-academy/blob/main/js/contact.js"
click node_telegramfn "https://github.com/andriypuhalsky/ai-academy/blob/main/tg/telegram_index.ts"
click node_theme "https://github.com/andriypuhalsky/ai-academy/blob/main/js/tw-theme.js"
click node_motion "https://github.com/andriypuhalsky/ai-academy/blob/main/js/motion.js"
click node_mermaid "https://github.com/andriypuhalsky/ai-academy/blob/main/js/mermaid-init.js"

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_course,node_roadmap,node_quiz toneBlue
class node_progress,node_certificates,node_verification,node_authui,node_auth,node_supabase toneAmber
class node_roadmapmotion,node_theme,node_motion,node_mermaid toneMint
class node_contact,node_telegramfn toneRose
class node_learner,node_telegram,node_contactactor toneIndigo
```

## Components

### Learning experience

- [Course modules](https://github.com/andriypuhalsky/ai-academy/blob/main/js/module.js): `js/module.js`
- [Learning roadmap](https://github.com/andriypuhalsky/ai-academy/blob/main/js/roadmap-render.js): `js/roadmap-render.js`
- [Quizzes](https://github.com/andriypuhalsky/ai-academy/blob/main/js/quiz.js): `js/quiz.js`

### Account and records

- [Progress tracking](https://github.com/andriypuhalsky/ai-academy/blob/main/js/progress.js): `js/progress.js`
- [Certificates](https://github.com/andriypuhalsky/ai-academy/blob/main/js/certificate.js): `js/certificate.js`
- [Certificate verification](https://github.com/andriypuhalsky/ai-academy/blob/main/js/verify.js): `js/verify.js`
- [Authentication UI](https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth-ui.js): `js/auth-ui.js`
- [Authentication data](https://github.com/andriypuhalsky/ai-academy/blob/main/js/auth.js): `js/auth.js`

### Shared presentation

- [Roadmap motion](https://github.com/andriypuhalsky/ai-academy/blob/main/js/roadmap-motion.js): `js/roadmap-motion.js`
- [Theme utilities](https://github.com/andriypuhalsky/ai-academy/blob/main/js/tw-theme.js): `js/tw-theme.js`
- [Motion utilities](https://github.com/andriypuhalsky/ai-academy/blob/main/js/motion.js): `js/motion.js`
- [Diagram rendering](https://github.com/andriypuhalsky/ai-academy/blob/main/js/mermaid-init.js): `js/mermaid-init.js`

### Admin operations

- [Contact form](https://github.com/andriypuhalsky/ai-academy/blob/main/js/contact.js): `js/contact.js`
- [Telegram function](https://github.com/andriypuhalsky/ai-academy/blob/main/tg/telegram_index.ts): `tg/telegram_index.ts`

### Other components

- **Learner**
- **Supabase**
- **Telegram**
- **Contact sender**

## Connections

- Learner → Course modules: browses
- Learner → Learning roadmap: views
- Learner → Quizzes: uses
- Learner → Authentication UI: opens account
- Authentication UI → Authentication data: dispatches handlers
- Authentication data → Supabase: auth and profile requests
- Learner → Certificate verification: checks certificate
- Contact sender → Contact form: submits message
- Telegram → Telegram function: sends updates
- Telegram function → Supabase: queries admin report
- Telegram function → Telegram: sends messages
- Learning roadmap → Roadmap motion: animates
