# abdelhafid-cloud/etech-education architecture

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

- Interactive diagram: https://gitdiagram.com/abdelhafid-cloud/etech-education
- Repository: https://github.com/abdelhafid-cloud/etech-education

## Overview

E‑Tech Education is a multi-tenant education platform for Ministry, academy, school, teacher, student, and parent workspaces. A principal workflow is student learning: a student enters the web app, accesses courses and learning activities, and receives personalized content; the Flask API provides student and course services backed by MongoDB. The README also identifies authentication, administration, analytics, AI, and media as product capabilities. Some links are documented or indexed; unsampled frontend-to-API and domain internals are shown as unverified rather than asserted.

Main entry points: [`apps/api/app/modules/super_admin.py`](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/super_admin.py) (Platform administration), [`apps/web/src/app`](https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/app) (Web workspaces), [`apps/api/app/modules/student.py`](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/student.py) (Student services), [`apps/api/app/modules/auth.py`](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/auth.py) (Authentication API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web["Web workspaces"]
  node_student_ui["Student learning"]
  node_admin_ui["Admin console"]
  node_auth_ui["Auth screens"]
  node_design_system["Design system"]
end

subgraph group_services["Education services"]
  node_student_api["Student services<br/>[student.py]"]
  node_course_catalog["Course catalog<br/>[course_catalog.py]"]
  node_course_ai["AI learning agent<br/>[course_ai_agent.py]"]
  node_course_quizzes["Quizzes and exams<br/>[course_quizzes.py]"]
  node_course_files["Course files<br/>[course_files.py]"]
  node_student_seed["Learning content data<br/>[student_seed.py]"]
  node_academic_levels["Academic levels<br/>[academic_levels.py]"]
end

subgraph group_identity["Identity and tenancy"]
  node_auth_api["Authentication API<br/>[auth.py]"]
  node_tokens["Token sessions<br/>[tokens.py]"]
  node_activation["Account activation<br/>[activation.py]"]
  node_workspaces["Workspace management<br/>[workspaces.py]"]
  node_users["User management<br/>[users.py]"]
  node_super_admin_api["Platform administration<br/>[super_admin.py]"]
end

subgraph group_platform["Data and integrations"]
  node_mongo[("MongoDB access<br/>[extensions.py]")]
  node_mail["Email delivery<br/>[mail.py]"]
  node_media["Media service<br/>[media.py]"]
  node_analytics["National analytics<br/>[page.tsx]"]
end

node_student(("Student"))

node_student -.->|"uses"| node_web
node_web -.->|"renders"| node_student_ui
node_web -.->|"renders"| node_auth_ui
node_web -.->|"renders"| node_admin_ui
node_student_ui -.->|"requests data"| node_student_api
node_admin_ui -.->|"requests data"| node_super_admin_api
node_auth_ui -.->|"authenticates"| node_auth_api
node_web -.->|"uses"| node_design_system
node_student_api -.->|"loads learning data"| node_student_seed
node_course_catalog -->|"builds catalog from"| node_student_seed
node_course_catalog -->|"uses levels"| node_academic_levels
node_course_catalog -->|"reads and writes"| node_mongo
node_student_seed -->|"uses levels"| node_academic_levels
node_auth_api -->|"issues tokens"| node_tokens
node_auth_api -->|"checks activation"| node_activation
node_auth_api -->|"sends email"| node_mail
node_tokens -->|"stores sessions"| node_mongo
node_super_admin_api -->|"requires auth"| node_auth_api
node_super_admin_api -->|"manages courses"| node_course_catalog
node_super_admin_api -->|"uses files"| node_course_files
node_super_admin_api -->|"sends email"| node_mail
node_super_admin_api -.->|"reads and writes"| node_mongo
node_student_api -.->|"serves activities"| node_course_quizzes
node_student_api -.->|"supports AI learning"| node_course_ai
node_student_api -.->|"serves media"| node_media
node_admin_ui -.->|"shows analytics"| node_analytics
node_workspaces -.->|"manages tenancy"| node_mongo
node_users -.->|"manages users"| node_mongo

click node_web "https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/app"
click node_student_ui "https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/student"
click node_admin_ui "https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/super-admin"
click node_auth_ui "https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/auth"
click node_design_system "https://github.com/abdelhafid-cloud/etech-education/tree/prod/packages/ui/src/components"
click node_student_api "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/student.py"
click node_course_catalog "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_catalog.py"
click node_course_ai "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_ai_agent.py"
click node_course_quizzes "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_quizzes.py"
click node_course_files "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_files.py"
click node_student_seed "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/student_seed.py"
click node_auth_api "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/auth.py"
click node_tokens "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/security/tokens.py"
click node_activation "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/security/activation.py"
click node_workspaces "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/workspaces.py"
click node_users "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/users.py"
click node_super_admin_api "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/super_admin.py"
click node_mongo "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/extensions.py"
click node_mail "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/mail.py"
click node_media "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/media.py"
click node_analytics "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/web/src/app/super-admin/analytics/page.tsx"
click node_academic_levels "https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/academic_levels.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_web,node_student_ui,node_admin_ui,node_auth_ui,node_design_system toneBlue
class node_student_api,node_course_catalog,node_course_ai,node_course_quizzes,node_course_files,node_student_seed,node_academic_levels toneAmber
class node_auth_api,node_tokens,node_activation,node_workspaces,node_users,node_super_admin_api toneMint
class node_mongo,node_mail,node_media,node_analytics toneRose
class node_student toneIndigo
```

## Components

### Web experience

- [Web workspaces](https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/app): `apps/web/src/app`
- [Student learning](https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/student): `apps/web/src/components/student`
- [Admin console](https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/super-admin): `apps/web/src/components/super-admin`
- [Auth screens](https://github.com/abdelhafid-cloud/etech-education/tree/prod/apps/web/src/components/auth): `apps/web/src/components/auth`
- [Design system](https://github.com/abdelhafid-cloud/etech-education/tree/prod/packages/ui/src/components): `packages/ui/src/components`

### Education services

- [Student services](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/student.py): `apps/api/app/modules/student.py`
- [Course catalog](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_catalog.py): `apps/api/app/course_catalog.py`
- [AI learning agent](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_ai_agent.py): `apps/api/app/course_ai_agent.py`
- [Quizzes and exams](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_quizzes.py): `apps/api/app/course_quizzes.py`
- [Course files](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/course_files.py): `apps/api/app/course_files.py`
- [Learning content data](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/student_seed.py): `apps/api/app/student_seed.py`
- [Academic levels](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/academic_levels.py): `apps/api/app/academic_levels.py`

### Identity and tenancy

- [Authentication API](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/auth.py): `apps/api/app/modules/auth.py`
- [Token sessions](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/security/tokens.py): `apps/api/app/security/tokens.py`
- [Account activation](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/security/activation.py): `apps/api/app/security/activation.py`
- [Workspace management](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/workspaces.py): `apps/api/app/modules/workspaces.py`
- [User management](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/users.py): `apps/api/app/modules/users.py`
- [Platform administration](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/super_admin.py): `apps/api/app/modules/super_admin.py`

### Data and integrations

- [MongoDB access](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/extensions.py): `apps/api/app/extensions.py`
- [Email delivery](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/mail.py): `apps/api/app/mail.py`
- [Media service](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/api/app/modules/media.py): `apps/api/app/modules/media.py`
- [National analytics](https://github.com/abdelhafid-cloud/etech-education/blob/prod/apps/web/src/app/super-admin/analytics/page.tsx): `apps/web/src/app/super-admin/analytics/page.tsx`

### Other components

- **Student**

## Connections

- Student → Web workspaces: uses (evidence: `README.md`)
- Web workspaces → Student learning: renders
- Web workspaces → Auth screens: renders
- Web workspaces → Admin console: renders
- Student learning → Student services: requests data
- Admin console → Platform administration: requests data
- Auth screens → Authentication API: authenticates
- Web workspaces → Design system: uses (evidence: `README.md`)
- Student services → Learning content data: loads learning data
- Course catalog → Learning content data: builds catalog from (evidence: `apps/api/app/course_catalog.py`)
- Course catalog → Academic levels: uses levels (evidence: `apps/api/app/course_catalog.py`)
- Course catalog → MongoDB access: reads and writes (evidence: `apps/api/app/course_catalog.py`)
- Learning content data → Academic levels: uses levels (evidence: `apps/api/app/student_seed.py`)
- Authentication API → Token sessions: issues tokens (evidence: `apps/api/app/modules/auth.py`)
- Authentication API → Account activation: checks activation (evidence: `apps/api/app/modules/auth.py`)
- Authentication API → Email delivery: sends email (evidence: `apps/api/app/modules/auth.py`)
- Token sessions → MongoDB access: stores sessions (evidence: `apps/api/app/security/tokens.py`)
- Platform administration → Authentication API: requires auth (evidence: `apps/api/app/modules/super_admin.py`)
- Platform administration → Course catalog: manages courses (evidence: `apps/api/app/modules/super_admin.py`)
- Platform administration → Course files: uses files (evidence: `apps/api/app/modules/super_admin.py`)
- Platform administration → Email delivery: sends email (evidence: `apps/api/app/modules/super_admin.py`)
- Platform administration → MongoDB access: reads and writes (evidence: `apps/api/app/modules/super_admin.py`)
- Student services → Quizzes and exams: serves activities
- Student services → AI learning agent: supports AI learning
- Student services → Media service: serves media
- Admin console → National analytics: shows analytics
- Workspace management → MongoDB access: manages tenancy
- User management → MongoDB access: manages users
