# hadeli/mvc-explication architecture

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

- Interactive diagram: https://gitdiagram.com/hadeli/mvc-explication
- Repository: https://github.com/hadeli/mvc-explication

## Overview

This is a French teaching project that guides learners from three procedural PHP pages toward an MVC application, while preserving the same registration, login, authenticated-home, and logout behavior. The sampled executable code is only the classic first stage: its pages directly manage validation, SQLite access, sessions, and HTML. Later stages are documented learning milestones rather than implemented modules in this tree, so their documented capabilities are shown as curriculum progression, not as verified runtime calls.

Main entry points: [`index.php`](https://github.com/hadeli/mvc-explication/blob/master/index.php) (Home page), [`login.php`](https://github.com/hadeli/mvc-explication/blob/master/login.php) (Login page), [`register.php`](https://github.com/hadeli/mvc-explication/blob/master/register.php) (Registration page), [`etapes/03-env/README.md`](https://github.com/hadeli/mvc-explication/blob/master/etapes/03-env/README.md) (Environment config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Classic application"]
  node_home["Home page<br/>[index.php]"]
  node_login["Login page<br/>[login.php]"]
  node_register["Registration page<br/>[register.php]"]
end

subgraph group_state["Application state"]
  node_sqlite[("SQLite users")]
  node_session["PHP session"]
end

subgraph group_curriculum["MVC progression"]
  node_includes["Shared includes<br/>[README.md]"]
  node_configuration["Environment config<br/>[README.md]"]
  node_views["Views<br/>[README.md]"]
  node_model["User model<br/>[README.md]"]
  node_autoload["Autoloading<br/>[README.md]"]
  node_front["Front controller<br/>[README.md]"]
  node_controllers["Controllers<br/>[README.md]"]
  node_http["Request response<br/>[README.md]"]
  node_core["Reusable core<br/>[README.md]"]
  node_components["View components<br/>[README.md]"]
end

subgraph group_advanced["Bonus concepts"]
  node_interfaces["Interfaces traits<br/>[README.md]"]
  node_router["Standalone router<br/>[README.md]"]
  node_cache["Core cache<br/>[README.md]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests"| node_home
node_visitor -->|"requests"| node_login
node_visitor -->|"requests"| node_register
node_home -->|"reads"| node_session
node_home -->|"destroys on logout"| node_session
node_home -->|"links to"| node_login
node_home -->|"links to"| node_register
node_login -->|"reads and writes"| node_session
node_login -->|"queries users"| node_sqlite
node_register -->|"checks and inserts"| node_sqlite
node_register -->|"links after signup"| node_login
node_includes -->|"advances to"| node_configuration
node_configuration -->|"advances to"| node_views
node_views -->|"advances to"| node_model
node_model -->|"advances to"| node_autoload
node_autoload -->|"advances to"| node_front
node_front -->|"advances to"| node_controllers
node_controllers -->|"advances to"| node_http
node_http -->|"advances to"| node_core
node_core -->|"advances to"| node_components
node_components -.->|"bonus stage"| node_interfaces
node_interfaces -.->|"bonus stage"| node_router
node_router -.->|"bonus stage"| node_cache

click node_home "https://github.com/hadeli/mvc-explication/blob/master/index.php"
click node_login "https://github.com/hadeli/mvc-explication/blob/master/login.php"
click node_register "https://github.com/hadeli/mvc-explication/blob/master/register.php"
click node_includes "https://github.com/hadeli/mvc-explication/blob/master/etapes/02-includes/README.md"
click node_configuration "https://github.com/hadeli/mvc-explication/blob/master/etapes/03-env/README.md"
click node_views "https://github.com/hadeli/mvc-explication/blob/master/etapes/04-vues/README.md"
click node_model "https://github.com/hadeli/mvc-explication/blob/master/etapes/05-modele/README.md"
click node_autoload "https://github.com/hadeli/mvc-explication/blob/master/etapes/06-autoloader/README.md"
click node_front "https://github.com/hadeli/mvc-explication/blob/master/etapes/07-front-controller/README.md"
click node_controllers "https://github.com/hadeli/mvc-explication/blob/master/etapes/08-controleurs/README.md"
click node_http "https://github.com/hadeli/mvc-explication/blob/master/etapes/09-requete-reponse/README.md"
click node_core "https://github.com/hadeli/mvc-explication/blob/master/etapes/10-noyau/README.md"
click node_components "https://github.com/hadeli/mvc-explication/blob/master/etapes/11-composants/README.md"
click node_interfaces "https://github.com/hadeli/mvc-explication/blob/master/etapes/12-interfaces/README.md"
click node_router "https://github.com/hadeli/mvc-explication/blob/master/etapes/13-routeur-autonome/README.md"
click node_cache "https://github.com/hadeli/mvc-explication/blob/master/etapes/14-cache-noyau/README.md"

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_login,node_register toneBlue
class node_sqlite,node_session toneAmber
class node_includes,node_configuration,node_views,node_model,node_autoload,node_front,node_controllers,node_http,node_core,node_components toneMint
class node_interfaces,node_router,node_cache toneRose
class node_visitor toneIndigo
```

## Components

### Classic application

- [Home page](https://github.com/hadeli/mvc-explication/blob/master/index.php): `index.php`
- [Login page](https://github.com/hadeli/mvc-explication/blob/master/login.php): `login.php`
- [Registration page](https://github.com/hadeli/mvc-explication/blob/master/register.php): `register.php`

### Application state

- **SQLite users**
- **PHP session**

### MVC progression

- [Shared includes](https://github.com/hadeli/mvc-explication/blob/master/etapes/02-includes/README.md): `etapes/02-includes/README.md`
- [Environment config](https://github.com/hadeli/mvc-explication/blob/master/etapes/03-env/README.md): `etapes/03-env/README.md`
- [Views](https://github.com/hadeli/mvc-explication/blob/master/etapes/04-vues/README.md): `etapes/04-vues/README.md`
- [User model](https://github.com/hadeli/mvc-explication/blob/master/etapes/05-modele/README.md): `etapes/05-modele/README.md`
- [Autoloading](https://github.com/hadeli/mvc-explication/blob/master/etapes/06-autoloader/README.md): `etapes/06-autoloader/README.md`
- [Front controller](https://github.com/hadeli/mvc-explication/blob/master/etapes/07-front-controller/README.md): `etapes/07-front-controller/README.md`
- [Controllers](https://github.com/hadeli/mvc-explication/blob/master/etapes/08-controleurs/README.md): `etapes/08-controleurs/README.md`
- [Request response](https://github.com/hadeli/mvc-explication/blob/master/etapes/09-requete-reponse/README.md): `etapes/09-requete-reponse/README.md`
- [Reusable core](https://github.com/hadeli/mvc-explication/blob/master/etapes/10-noyau/README.md): `etapes/10-noyau/README.md`
- [View components](https://github.com/hadeli/mvc-explication/blob/master/etapes/11-composants/README.md): `etapes/11-composants/README.md`

### Bonus concepts

- [Interfaces traits](https://github.com/hadeli/mvc-explication/blob/master/etapes/12-interfaces/README.md): `etapes/12-interfaces/README.md`
- [Standalone router](https://github.com/hadeli/mvc-explication/blob/master/etapes/13-routeur-autonome/README.md): `etapes/13-routeur-autonome/README.md`
- [Core cache](https://github.com/hadeli/mvc-explication/blob/master/etapes/14-cache-noyau/README.md): `etapes/14-cache-noyau/README.md`

### Other components

- **Visitor**

## Connections

- Visitor → Home page: requests
- Visitor → Login page: requests
- Visitor → Registration page: requests
- Home page → PHP session: reads
- Home page → PHP session: destroys on logout
- Home page → Login page: links to
- Home page → Registration page: links to
- Login page → PHP session: reads and writes
- Login page → SQLite users: queries users
- Registration page → SQLite users: checks and inserts
- Registration page → Login page: links after signup
- Shared includes → Environment config: advances to
- Environment config → Views: advances to
- Views → User model: advances to
- User model → Autoloading: advances to
- Autoloading → Front controller: advances to
- Front controller → Controllers: advances to
- Controllers → Request response: advances to
- Request response → Reusable core: advances to
- Reusable core → View components: advances to
- View components → Interfaces traits: bonus stage
- Interfaces traits → Standalone router: bonus stage
- Standalone router → Core cache: bonus stage
