# mahlatse007/devanttechnologies-learnhub architecture

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

- Interactive diagram: https://gitdiagram.com/mahlatse007/devanttechnologies-learnhub
- Repository: https://github.com/mahlatse007/devanttechnologies-learnhub

## Overview

LearnHub is a static tutoring-site frontend. In the active static mode, visitors can use the contact form to open an email app and use a lesson cost estimator; account forms are disabled. Student and tutor booking workflows and an admin dashboard remain represented in the code, but the README says dashboards redirect to login and accounts are switched off. The sampled JavaScript shows browser requests to API endpoints, but no backend implementation is present in the tree, so those endpoints are represented as an external service.

Main entry points: [`static/script.js`](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/script.js) (Site behavior), [`static/student.js`](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js) (Subject selection), [`staticwebapp.config.json`](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/staticwebapp.config.json) (Dashboard redirects), [`student.html`](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/student.html) (Student dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_home["Home and contact<br/>[index.html]"]
  node_account_pages["Account pages<br/>[login.html]"]
  node_legal_pages["Legal pages<br/>[privacy.html]"]
  node_terms["Terms page<br/>[terms.html]"]
end

subgraph group_shared["Shared frontend"]
  node_shared_script["Site behavior<br/>[script.js]"]
  node_styles["Site styles<br/>[styles.css]"]
  node_routing["Dashboard redirects"]
end

subgraph group_learning["Lesson workflows"]
  node_student_page["Student dashboard<br/>[student.html]"]
  node_subject_choice["Subject selection<br/>[student.js]"]
  node_tutor_choice["Tutor selection<br/>[student.js]"]
  node_slot_choice["Time selection<br/>[student.js]"]
  node_booking["Booking confirmation<br/>[student.js]"]
  node_lessons["My lessons<br/>[student.js]"]
end

subgraph group_operations["Tutor and admin"]
  node_tutor_page["Tutor dashboard<br/>[tutor.html]"]
  node_tutor_subjects["Tutor subjects<br/>[tutor.js]"]
  node_availability["Availability slots<br/>[tutor.js]"]
  node_schedule["Tutor schedule<br/>[tutor.js]"]
  node_admin_page["Admin dashboard<br/>[admin.html]"]
  node_admin_tools["User and message admin<br/>[script.js]"]
end

node_visitor(("Visitor"))
node_email_app(("Email app"))
node_api_service{{"API service"}}

node_visitor -->|"visits"| node_home
node_home -.->|"runs scripts"| node_shared_script
node_shared_script -->|"opens email"| node_email_app
node_shared_script -->|"requests API"| node_api_service
node_student_page -.->|"hosts workflow"| node_subject_choice
node_subject_choice -->|"loads subjects"| node_api_service
node_subject_choice -->|"loads tutors"| node_tutor_choice
node_tutor_choice -->|"loads tutors"| node_api_service
node_tutor_choice -->|"loads times"| node_slot_choice
node_slot_choice -->|"loads slots"| node_api_service
node_slot_choice -->|"confirms choice"| node_booking
node_booking -->|"submits booking"| node_api_service
node_booking -->|"reloads lessons"| node_lessons
node_lessons -->|"loads bookings"| node_api_service
node_tutor_page -.->|"hosts controls"| node_tutor_subjects
node_tutor_subjects -->|"reads and saves"| node_api_service
node_availability -->|"adds slots"| node_api_service
node_availability -->|"reloads schedule"| node_schedule
node_schedule -->|"loads and removes"| node_api_service
node_admin_page -.->|"hosts dashboard"| node_admin_tools
node_admin_tools -->|"loads admin data"| node_api_service
node_admin_page -->|"redirected by config"| node_routing
node_student_page -->|"redirected by config"| node_routing
node_tutor_page -->|"redirected by config"| node_routing

click node_home "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/index.html"
click node_account_pages "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/login.html"
click node_legal_pages "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/privacy.html"
click node_terms "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/terms.html"
click node_shared_script "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/script.js"
click node_styles "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/styles.css"
click node_student_page "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/student.html"
click node_subject_choice "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js"
click node_tutor_choice "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js"
click node_slot_choice "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js"
click node_booking "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js"
click node_lessons "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js"
click node_tutor_page "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/tutor.html"
click node_tutor_subjects "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js"
click node_availability "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js"
click node_schedule "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js"
click node_admin_page "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/admin.html"
click node_admin_tools "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/script.js"
click node_routing "https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/staticwebapp.config.json"

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_home,node_account_pages,node_legal_pages,node_terms toneBlue
class node_shared_script,node_styles,node_routing toneAmber
class node_student_page,node_subject_choice,node_tutor_choice,node_slot_choice,node_booking,node_lessons,node_api_service toneMint
class node_tutor_page,node_tutor_subjects,node_availability,node_schedule,node_admin_page,node_admin_tools toneRose
class node_visitor,node_email_app toneIndigo
```

## Components

### Public site

- [Home and contact](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/index.html): `index.html`
- [Account pages](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/login.html): `login.html`
- [Legal pages](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/privacy.html): `privacy.html`
- [Terms page](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/terms.html): `terms.html`

### Shared frontend

- [Site behavior](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/script.js): `static/script.js`
- [Site styles](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/styles.css): `static/styles.css`
- [Dashboard redirects](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/staticwebapp.config.json): `staticwebapp.config.json`

### Lesson workflows

- [Student dashboard](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/student.html): `student.html`
- [Subject selection](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js): `static/student.js`
- [Tutor selection](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js): `static/student.js`
- [Time selection](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js): `static/student.js`
- [Booking confirmation](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js): `static/student.js`
- [My lessons](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/student.js): `static/student.js`

### Tutor and admin

- [Tutor dashboard](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/tutor.html): `tutor.html`
- [Tutor subjects](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js): `static/tutor.js`
- [Availability slots](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js): `static/tutor.js`
- [Tutor schedule](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/tutor.js): `static/tutor.js`
- [Admin dashboard](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/admin.html): `admin.html`
- [User and message admin](https://github.com/mahlatse007/devanttechnologies-learnhub/blob/main/static/script.js): `static/script.js`

### Other components

- **Visitor**
- **Email app**
- **API service**

## Connections

- Visitor → Home and contact: visits
- Home and contact → Site behavior: runs scripts
- Site behavior → Email app: opens email (evidence: `static/script.js`)
- Site behavior → API service: requests API (evidence: `static/script.js`)
- Student dashboard → Subject selection: hosts workflow
- Subject selection → API service: loads subjects (evidence: `static/student.js`)
- Subject selection → Tutor selection: loads tutors (evidence: `static/student.js`)
- Tutor selection → API service: loads tutors (evidence: `static/student.js`)
- Tutor selection → Time selection: loads times (evidence: `static/student.js`)
- Time selection → API service: loads slots (evidence: `static/student.js`)
- Time selection → Booking confirmation: confirms choice (evidence: `static/student.js`)
- Booking confirmation → API service: submits booking (evidence: `static/student.js`)
- Booking confirmation → My lessons: reloads lessons (evidence: `static/student.js`)
- My lessons → API service: loads bookings (evidence: `static/student.js`)
- Tutor dashboard → Tutor subjects: hosts controls
- Tutor subjects → API service: reads and saves (evidence: `static/tutor.js`)
- Availability slots → API service: adds slots (evidence: `static/tutor.js`)
- Availability slots → Tutor schedule: reloads schedule (evidence: `static/tutor.js`)
- Tutor schedule → API service: loads and removes (evidence: `static/tutor.js`)
- Admin dashboard → User and message admin: hosts dashboard
- User and message admin → API service: loads admin data (evidence: `static/script.js`)
- Admin dashboard → Dashboard redirects: redirected by config (evidence: `README.md`)
- Student dashboard → Dashboard redirects: redirected by config (evidence: `README.md`)
- Tutor dashboard → Dashboard redirects: redirected by config (evidence: `README.md`)
