# hmsmiraz/techedu architecture

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

- Interactive diagram: https://gitdiagram.com/hmsmiraz/techedu
- Repository: https://github.com/hmsmiraz/techedu

## Overview

TechEdu is an LMS with a public signup site, an admin console for account and course-content management, and a student portal for approved learners. The main workflow is signup and login, admin approval, then authenticated module access; administrators also manage users, modules, and resources. Two FastAPI services provide these domain stages and persist data separately in MySQL. The README documents a shared Nginx gateway and a self-hosted metrics, logs, and traces stack. Deployment and infrastructure files are absent from the supplied tree, so those documented components have no repository paths; unsampled connections are omitted or marked unverified.

Main entry points: [`services/auth-service/app/routers/auth.py`](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/routers/auth.py) (Auth API), [`services/auth-service/app/main.py`](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/main.py) (Auth service entry), [`services/content-service/app/main.py`](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/main.py) (Content service entry), [`services/auth-service/app/database.py`](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/database.py) (Auth persistence)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web applications"]
  node_landing["Landing and signup<br/>[page.tsx]"]
  node_landing_login["Landing login<br/>[page.tsx]"]
  node_admin["Admin console<br/>[page.tsx]"]
  node_admin_content["Content editor<br/>[page.tsx]"]
  node_portal["Student portal<br/>[page.tsx]"]
end

subgraph group_auth["Identity service"]
  node_auth_api["Auth API<br/>[auth.py]"]
  node_user_admin["User administration<br/>[admin_users.py]"]
  node_auth_security["Password and JWT security<br/>[security.py]"]
  node_auth_db[("Auth persistence<br/>[database.py]")]
  node_auth_entry["Auth service entry<br/>[main.py]"]
end

subgraph group_content["Learning content"]
  node_content_api["Module API<br/>[modules.py]"]
  node_content_admin["Module and resource management<br/>[admin_content.py]"]
  node_content_db[("Content persistence<br/>[database.py]")]
  node_content_entry["Content service entry<br/>[main.py]"]
end

subgraph group_telemetry["Observability"]
  node_auth_telemetry["Auth instrumentation<br/>[telemetry.py]"]
  node_content_telemetry["Content instrumentation<br/>[telemetry.py]"]
  node_observability["Metrics, logs, traces"]
end

node_visitor(("Learner or admin"))
node_gateway{{"Nginx gateway"}}
node_mysql[("MySQL")]

node_visitor -->|"visits"| node_gateway
node_gateway -->|"routes requests"| node_landing
node_gateway -->|"routes requests"| node_admin
node_gateway -->|"routes requests"| node_portal
node_landing -.->|"submits signup"| node_auth_api
node_landing_login -.->|"submits login"| node_auth_api
node_admin -->|"manages accounts"| node_user_admin
node_admin_content -->|"manages courses"| node_content_admin
node_portal -->|"requests modules"| node_content_api
node_auth_entry -->|"registers router"| node_auth_api
node_auth_entry -->|"registers router"| node_user_admin
node_auth_entry -->|"sets up telemetry"| node_auth_telemetry
node_content_entry -->|"registers router"| node_content_api
node_content_entry -->|"registers router"| node_content_admin
node_content_entry -->|"sets up telemetry"| node_content_telemetry
node_auth_api -->|"hashes and issues tokens"| node_auth_security
node_auth_api -->|"reads and writes"| node_auth_db
node_user_admin -->|"reads and writes"| node_auth_db
node_content_api -->|"reads modules"| node_content_db
node_content_admin -->|"reads and writes"| node_content_db
node_auth_entry -->|"waits and creates tables"| node_auth_db
node_content_entry -->|"waits and creates tables"| node_content_db
node_auth_db -.->|"connects to database"| node_mysql
node_content_db -.->|"connects to database"| node_mysql
node_auth_telemetry -->|"emits telemetry"| node_observability
node_content_telemetry -->|"emits telemetry"| node_observability

click node_landing "https://github.com/hmsmiraz/techedu/blob/main/apps/landing/src/app/signup/page.tsx"
click node_landing_login "https://github.com/hmsmiraz/techedu/blob/main/apps/landing/src/app/login/page.tsx"
click node_admin "https://github.com/hmsmiraz/techedu/blob/main/apps/admin/src/app/users/page.tsx"
click node_admin_content "https://github.com/hmsmiraz/techedu/blob/main/apps/admin/src/app/content/page.tsx"
click node_portal "https://github.com/hmsmiraz/techedu/blob/main/apps/learning-portal/src/app/page.tsx"
click node_auth_api "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/routers/auth.py"
click node_user_admin "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/routers/admin_users.py"
click node_auth_security "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/security.py"
click node_auth_db "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/database.py"
click node_content_api "https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/routers/modules.py"
click node_content_admin "https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/routers/admin_content.py"
click node_content_db "https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/database.py"
click node_auth_entry "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/main.py"
click node_content_entry "https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/main.py"
click node_auth_telemetry "https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/telemetry.py"
click node_content_telemetry "https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/telemetry.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_landing,node_landing_login,node_admin,node_admin_content,node_portal toneBlue
class node_auth_api,node_user_admin,node_auth_security,node_auth_db,node_auth_entry,node_mysql toneAmber
class node_content_api,node_content_admin,node_content_db,node_content_entry toneMint
class node_auth_telemetry,node_content_telemetry,node_observability toneRose
class node_visitor,node_gateway toneIndigo
```

## Components

### Web applications

- [Landing and signup](https://github.com/hmsmiraz/techedu/blob/main/apps/landing/src/app/signup/page.tsx): `apps/landing/src/app/signup/page.tsx`
- [Landing login](https://github.com/hmsmiraz/techedu/blob/main/apps/landing/src/app/login/page.tsx): `apps/landing/src/app/login/page.tsx`
- [Admin console](https://github.com/hmsmiraz/techedu/blob/main/apps/admin/src/app/users/page.tsx): `apps/admin/src/app/users/page.tsx`
- [Content editor](https://github.com/hmsmiraz/techedu/blob/main/apps/admin/src/app/content/page.tsx): `apps/admin/src/app/content/page.tsx`
- [Student portal](https://github.com/hmsmiraz/techedu/blob/main/apps/learning-portal/src/app/page.tsx): `apps/learning-portal/src/app/page.tsx`

### Identity service

- [Auth API](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/routers/auth.py): `services/auth-service/app/routers/auth.py`
- [User administration](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/routers/admin_users.py): `services/auth-service/app/routers/admin_users.py`
- [Password and JWT security](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/security.py): `services/auth-service/app/security.py`
- [Auth persistence](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/database.py): `services/auth-service/app/database.py`
- [Auth service entry](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/main.py): `services/auth-service/app/main.py`

### Learning content

- [Module API](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/routers/modules.py): `services/content-service/app/routers/modules.py`
- [Module and resource management](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/routers/admin_content.py): `services/content-service/app/routers/admin_content.py`
- [Content persistence](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/database.py): `services/content-service/app/database.py`
- [Content service entry](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/main.py): `services/content-service/app/main.py`

### Observability

- [Auth instrumentation](https://github.com/hmsmiraz/techedu/blob/main/services/auth-service/app/telemetry.py): `services/auth-service/app/telemetry.py`
- [Content instrumentation](https://github.com/hmsmiraz/techedu/blob/main/services/content-service/app/telemetry.py): `services/content-service/app/telemetry.py`
- **Metrics, logs, traces**

### Other components

- **Learner or admin**
- **Nginx gateway**
- **MySQL**

## Connections

- Learner or admin → Nginx gateway: visits (evidence: `README.md`)
- Nginx gateway → Landing and signup: routes requests (evidence: `README.md`)
- Nginx gateway → Admin console: routes requests (evidence: `README.md`)
- Nginx gateway → Student portal: routes requests (evidence: `README.md`)
- Landing and signup → Auth API: submits signup
- Landing login → Auth API: submits login
- Admin console → User administration: manages accounts (evidence: `README.md`)
- Content editor → Module and resource management: manages courses (evidence: `README.md`)
- Student portal → Module API: requests modules (evidence: `README.md`)
- Auth service entry → Auth API: registers router (evidence: `services/auth-service/app/main.py`)
- Auth service entry → User administration: registers router (evidence: `services/auth-service/app/main.py`)
- Auth service entry → Auth instrumentation: sets up telemetry (evidence: `services/auth-service/app/main.py`)
- Content service entry → Module API: registers router (evidence: `services/content-service/app/main.py`)
- Content service entry → Module and resource management: registers router (evidence: `services/content-service/app/main.py`)
- Content service entry → Content instrumentation: sets up telemetry (evidence: `services/content-service/app/main.py`)
- Auth API → Password and JWT security: hashes and issues tokens (evidence: `services/auth-service/app/routers/auth.py`)
- Auth API → Auth persistence: reads and writes (evidence: `services/auth-service/app/routers/auth.py`)
- User administration → Auth persistence: reads and writes (evidence: `services/auth-service/app/routers/admin_users.py`)
- Module API → Content persistence: reads modules (evidence: `services/content-service/app/routers/modules.py`)
- Module and resource management → Content persistence: reads and writes (evidence: `services/content-service/app/routers/admin_content.py`)
- Auth service entry → Auth persistence: waits and creates tables (evidence: `services/auth-service/app/main.py`)
- Content service entry → Content persistence: waits and creates tables (evidence: `services/content-service/app/main.py`)
- Auth persistence → MySQL: connects to database
- Content persistence → MySQL: connects to database
- Auth instrumentation → Metrics, logs, traces: emits telemetry (evidence: `README.md`)
- Content instrumentation → Metrics, logs, traces: emits telemetry (evidence: `README.md`)
