# imondol41/ielts-demo architecture

> Architecture diagram of the GitHub repository imondol41/ielts-demo, 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/imondol41/ielts-demo
- Repository: https://github.com/imondol41/ielts-demo

## Overview

This is a PHP MVC IELTS preparation platform: users enter through routed web requests, access account and dashboard features, and practice Reading, Writing, Listening, and Speaking. The documented core workflow includes selecting a practice item, completing it, and reviewing progress or results. The README describes Reading scoring and Writing submissions; Listening and Speaking are listed as coming soon despite having controllers and views in the tree. Controller-to-model wiring is not established by the sampled excerpts, so those links are omitted.

Main entry points: [`core/App.php`](https://github.com/imondol41/ielts-demo/blob/main/core/App.php) (Request router), [`index.php`](https://github.com/imondol41/ielts-demo/blob/main/index.php) (HTTP entry), [`core/Database.php`](https://github.com/imondol41/ielts-demo/blob/main/core/Database.php) (PDO database), [`controllers/Auth.php`](https://github.com/imondol41/ielts-demo/blob/main/controllers/Auth.php) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_entrypoint["HTTP entry<br/>[index.php]"]
end

subgraph group_account["Account and progress"]
  node_auth["Authentication<br/>[Auth.php]"]
  node_authview["Login and registration<br/>[login.php]"]
  node_user_model["User account model<br/>[User.php]"]
  node_dashboard["Progress dashboard<br/>[Dashboard.php]"]
  node_dashboardview["Progress summary<br/>[index.php]"]
  node_profile["Profile and history<br/>[Profile.php]"]
  node_profileview["Profile pages<br/>[index.php]"]
end

subgraph group_practice["IELTS practice"]
  node_reading["Reading practice<br/>[Reading.php]"]
  node_readingmodel["Reading data and scoring<br/>[ReadingModel.php]"]
  node_readingview["Passages and results<br/>[index.php]"]
  node_writing["Writing practice<br/>[Writing.php]"]
  node_writingmodel["Writing task data<br/>[WritingModel.php]"]
  node_writingview["Writing tasks<br/>[index.php]"]
  node_listening["Listening practice<br/>[Listening.php]"]
  node_listeningmodel["Listening data<br/>[ListeningModel.php]"]
  node_listeningview["Listening tests<br/>[index.php]"]
  node_speaking["Speaking practice<br/>[Speaking.php]"]
  node_speakingmodel["Speaking data<br/>[SpeakingModel.php]"]
  node_speakingview["Speaking topics<br/>[index.php]"]
end

subgraph group_content["Practice management"]
  node_admin["Content administration<br/>[Admin.php]"]
  node_adminmodel["Admin content model<br/>[AdminModel.php]"]
  node_adminview["Admin pages<br/>[dashboard.php]"]
end

subgraph group_runtime["MVC runtime"]
  node_router["Request router<br/>[App.php]"]
  node_basecontroller["Controller base<br/>[Controller.php]"]
  node_database["PDO database<br/>[Database.php]"]
  node_layout["Shared page layout<br/>[main.php]"]
end

node_learner(("Learner"))
node_mysql[("MySQL")]

node_learner -->|"sends request"| node_entrypoint
node_entrypoint -->|"starts app"| node_router
node_router -->|"dispatches"| node_auth
node_router -->|"dispatches"| node_dashboard
node_router -->|"dispatches"| node_profile
node_router -->|"dispatches"| node_reading
node_router -->|"dispatches"| node_writing
node_router -->|"dispatches"| node_listening
node_router -->|"dispatches"| node_speaking
node_router -->|"dispatches"| node_admin
node_database -->|"connects"| node_mysql

click node_entrypoint "https://github.com/imondol41/ielts-demo/blob/main/index.php"
click node_router "https://github.com/imondol41/ielts-demo/blob/main/core/App.php"
click node_basecontroller "https://github.com/imondol41/ielts-demo/blob/main/core/Controller.php"
click node_database "https://github.com/imondol41/ielts-demo/blob/main/core/Database.php"
click node_auth "https://github.com/imondol41/ielts-demo/blob/main/controllers/Auth.php"
click node_authview "https://github.com/imondol41/ielts-demo/blob/main/views/auth/login.php"
click node_user_model "https://github.com/imondol41/ielts-demo/blob/main/models/User.php"
click node_dashboard "https://github.com/imondol41/ielts-demo/blob/main/controllers/Dashboard.php"
click node_dashboardview "https://github.com/imondol41/ielts-demo/blob/main/views/dashboard/index.php"
click node_profile "https://github.com/imondol41/ielts-demo/blob/main/controllers/Profile.php"
click node_profileview "https://github.com/imondol41/ielts-demo/blob/main/views/profile/index.php"
click node_reading "https://github.com/imondol41/ielts-demo/blob/main/controllers/Reading.php"
click node_readingmodel "https://github.com/imondol41/ielts-demo/blob/main/models/ReadingModel.php"
click node_readingview "https://github.com/imondol41/ielts-demo/blob/main/views/reading/index.php"
click node_writing "https://github.com/imondol41/ielts-demo/blob/main/controllers/Writing.php"
click node_writingmodel "https://github.com/imondol41/ielts-demo/blob/main/models/WritingModel.php"
click node_writingview "https://github.com/imondol41/ielts-demo/blob/main/views/writing/index.php"
click node_listening "https://github.com/imondol41/ielts-demo/blob/main/controllers/Listening.php"
click node_listeningmodel "https://github.com/imondol41/ielts-demo/blob/main/models/ListeningModel.php"
click node_listeningview "https://github.com/imondol41/ielts-demo/blob/main/views/listening/index.php"
click node_speaking "https://github.com/imondol41/ielts-demo/blob/main/controllers/Speaking.php"
click node_speakingmodel "https://github.com/imondol41/ielts-demo/blob/main/models/SpeakingModel.php"
click node_speakingview "https://github.com/imondol41/ielts-demo/blob/main/views/speaking/index.php"
click node_admin "https://github.com/imondol41/ielts-demo/blob/main/controllers/Admin.php"
click node_adminmodel "https://github.com/imondol41/ielts-demo/blob/main/models/AdminModel.php"
click node_adminview "https://github.com/imondol41/ielts-demo/blob/main/views/admin/dashboard.php"
click node_layout "https://github.com/imondol41/ielts-demo/blob/main/views/layouts/main.php"

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_entrypoint toneBlue
class node_auth,node_authview,node_user_model,node_dashboard,node_dashboardview,node_profile,node_profileview,node_mysql toneAmber
class node_reading,node_readingmodel,node_readingview,node_writing,node_writingmodel,node_writingview,node_listening,node_listeningmodel,node_listeningview,node_speaking,node_speakingmodel,node_speakingview toneMint
class node_admin,node_adminmodel,node_adminview toneRose
class node_router,node_basecontroller,node_database,node_layout,node_learner toneIndigo
```

## Components

### Web entry

- [HTTP entry](https://github.com/imondol41/ielts-demo/blob/main/index.php): `index.php`

### Account and progress

- [Authentication](https://github.com/imondol41/ielts-demo/blob/main/controllers/Auth.php): `controllers/Auth.php`
- [Login and registration](https://github.com/imondol41/ielts-demo/blob/main/views/auth/login.php): `views/auth/login.php`
- [User account model](https://github.com/imondol41/ielts-demo/blob/main/models/User.php): `models/User.php`
- [Progress dashboard](https://github.com/imondol41/ielts-demo/blob/main/controllers/Dashboard.php): `controllers/Dashboard.php`
- [Progress summary](https://github.com/imondol41/ielts-demo/blob/main/views/dashboard/index.php): `views/dashboard/index.php`
- [Profile and history](https://github.com/imondol41/ielts-demo/blob/main/controllers/Profile.php): `controllers/Profile.php`
- [Profile pages](https://github.com/imondol41/ielts-demo/blob/main/views/profile/index.php): `views/profile/index.php`

### IELTS practice

- [Reading practice](https://github.com/imondol41/ielts-demo/blob/main/controllers/Reading.php): `controllers/Reading.php`
- [Reading data and scoring](https://github.com/imondol41/ielts-demo/blob/main/models/ReadingModel.php): `models/ReadingModel.php`
- [Passages and results](https://github.com/imondol41/ielts-demo/blob/main/views/reading/index.php): `views/reading/index.php`
- [Writing practice](https://github.com/imondol41/ielts-demo/blob/main/controllers/Writing.php): `controllers/Writing.php`
- [Writing task data](https://github.com/imondol41/ielts-demo/blob/main/models/WritingModel.php): `models/WritingModel.php`
- [Writing tasks](https://github.com/imondol41/ielts-demo/blob/main/views/writing/index.php): `views/writing/index.php`
- [Listening practice](https://github.com/imondol41/ielts-demo/blob/main/controllers/Listening.php): `controllers/Listening.php`
- [Listening data](https://github.com/imondol41/ielts-demo/blob/main/models/ListeningModel.php): `models/ListeningModel.php`
- [Listening tests](https://github.com/imondol41/ielts-demo/blob/main/views/listening/index.php): `views/listening/index.php`
- [Speaking practice](https://github.com/imondol41/ielts-demo/blob/main/controllers/Speaking.php): `controllers/Speaking.php`
- [Speaking data](https://github.com/imondol41/ielts-demo/blob/main/models/SpeakingModel.php): `models/SpeakingModel.php`
- [Speaking topics](https://github.com/imondol41/ielts-demo/blob/main/views/speaking/index.php): `views/speaking/index.php`

### Practice management

- [Content administration](https://github.com/imondol41/ielts-demo/blob/main/controllers/Admin.php): `controllers/Admin.php`
- [Admin content model](https://github.com/imondol41/ielts-demo/blob/main/models/AdminModel.php): `models/AdminModel.php`
- [Admin pages](https://github.com/imondol41/ielts-demo/blob/main/views/admin/dashboard.php): `views/admin/dashboard.php`

### MVC runtime

- [Request router](https://github.com/imondol41/ielts-demo/blob/main/core/App.php): `core/App.php`
- [Controller base](https://github.com/imondol41/ielts-demo/blob/main/core/Controller.php): `core/Controller.php`
- [PDO database](https://github.com/imondol41/ielts-demo/blob/main/core/Database.php): `core/Database.php`
- [Shared page layout](https://github.com/imondol41/ielts-demo/blob/main/views/layouts/main.php): `views/layouts/main.php`

### Other components

- **Learner**
- **MySQL**

## Connections

- Learner → HTTP entry: sends request
- HTTP entry → Request router: starts app
- Request router → Authentication: dispatches
- Request router → Progress dashboard: dispatches
- Request router → Profile and history: dispatches
- Request router → Reading practice: dispatches
- Request router → Writing practice: dispatches
- Request router → Listening practice: dispatches
- Request router → Speaking practice: dispatches
- Request router → Content administration: dispatches
- PDO database → MySQL: connects
