# ababdelo/centre-formation architecture

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

- Interactive diagram: https://gitdiagram.com/ababdelo/centre-formation
- Repository: https://github.com/ababdelo/centre-formation

## Overview

Centre Formation is a PHP/MySQL training-centre management application. The visible workflow is an administrator signing in, then managing students, groups, modules, trainers, and their assignments. The README also describes planned trainer and student spaces for sessions, attendance, evaluations, grades, profiles, and results; their directories are present, but no implementation was sampled. Edges reflect shown calls, imports, SQL access, or README statements; unsampled features are represented without asserting internal wiring.

Main entry points: [`classes/etudiant.php`](https://github.com/ababdelo/centre-formation/blob/dev/classes/etudiant.php) (Student model), [`index.php`](https://github.com/ababdelo/centre-formation/blob/dev/index.php) (Sign-in page), [`includes/checkuser.php`](https://github.com/ababdelo/centre-formation/blob/dev/includes/checkuser.php) (Login check), [`config/connection.php`](https://github.com/ababdelo/centre-formation/blob/dev/config/connection.php) (DB connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and access"]
  node_login["Sign-in page<br/>[index.php]"]
  node_auth["Login check<br/>[checkuser.php]"]
  node_connection["DB connection<br/>[connection.php]"]
end

subgraph group_admin["Administration"]
  node_adminhome["Admin dashboard<br/>[dashboard.php]"]
  node_students["Student management"]
  node_studentedit["Student editing"]
  node_groups["Group management<br/>[creer_groupe.php]"]
  node_groupstudents["Group membership"]
  node_trainers["Trainer management<br/>[formateur_int.php]"]
  node_modules["Module management<br/>[module_int.php]"]
  node_assignments["Assignment management"]
end

subgraph group_domain["Domain models"]
  node_studentmodel["Student model<br/>[etudiant.php]"]
  node_groupmodel["Group model<br/>[groupe.php]"]
  node_modulemodel["Module model<br/>[module.php]"]
  node_assignmentmodel["Assignment model<br/>[affectation.php]"]
  node_dbschema["Database schema<br/>[schema.sql]"]
end

subgraph group_planned["Planned user spaces"]
  node_trainer["Trainer space"]
  node_student["Student space"]
end

node_visitor(("User"))
node_mysql[("MySQL database")]

node_visitor -->|"opens"| node_login
node_login -->|"submits credentials"| node_auth
node_login -->|"loads"| node_connection
node_auth -->|"loads"| node_connection
node_auth -->|"redirects admin"| node_adminhome
node_connection -->|"connects"| node_mysql
node_students -->|"uses"| node_studentmodel
node_studentedit -->|"updates via"| node_studentmodel
node_groupstudents -->|"loads group"| node_groupmodel
node_groupstudents -->|"manages membership"| node_studentmodel
node_groups -->|"uses"| node_groupmodel
node_modules -->|"uses"| node_modulemodel
node_assignments -->|"uses"| node_assignmentmodel
node_studentmodel -->|"queries and writes"| node_mysql
node_groupmodel -->|"queries and writes"| node_mysql
node_modulemodel -->|"queries and writes"| node_mysql
node_assignmentmodel -->|"queries and writes"| node_mysql
node_dbschema -->|"defines tables"| node_mysql
node_visitor -.->|"planned access"| node_trainer
node_visitor -.->|"planned access"| node_student

click node_login "https://github.com/ababdelo/centre-formation/blob/dev/index.php"
click node_auth "https://github.com/ababdelo/centre-formation/blob/dev/includes/checkuser.php"
click node_connection "https://github.com/ababdelo/centre-formation/blob/dev/config/connection.php"
click node_adminhome "https://github.com/ababdelo/centre-formation/blob/dev/admin/dashboard.php"
click node_students "https://github.com/ababdelo/centre-formation/blob/dev/admin/ajouter-etudiant.php"
click node_studentedit "https://github.com/ababdelo/centre-formation/blob/dev/admin/modifier-etudiant.php"
click node_groups "https://github.com/ababdelo/centre-formation/blob/dev/admin/creer_groupe.php"
click node_groupstudents "https://github.com/ababdelo/centre-formation/blob/dev/admin/consulter_etudiants_groupe.php"
click node_trainers "https://github.com/ababdelo/centre-formation/blob/dev/admin/formateur_int.php"
click node_modules "https://github.com/ababdelo/centre-formation/blob/dev/admin/module_int.php"
click node_assignments "https://github.com/ababdelo/centre-formation/blob/dev/admin/affectation_int.php"
click node_studentmodel "https://github.com/ababdelo/centre-formation/blob/dev/classes/etudiant.php"
click node_groupmodel "https://github.com/ababdelo/centre-formation/blob/dev/classes/groupe.php"
click node_modulemodel "https://github.com/ababdelo/centre-formation/blob/dev/classes/module.php"
click node_assignmentmodel "https://github.com/ababdelo/centre-formation/blob/dev/classes/affectation.php"
click node_dbschema "https://github.com/ababdelo/centre-formation/blob/dev/database/schema.sql"
click node_trainer "https://github.com/ababdelo/centre-formation/tree/dev/formateur"
click node_student "https://github.com/ababdelo/centre-formation/tree/dev/etudiant"

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_login,node_auth,node_connection,node_visitor toneBlue
class node_adminhome,node_students,node_studentedit,node_groups,node_groupstudents,node_trainers,node_modules,node_assignments,node_mysql toneAmber
class node_studentmodel,node_groupmodel,node_modulemodel,node_assignmentmodel,node_dbschema toneMint
class node_trainer,node_student toneRose
```

## Components

### Entry and access

- [Sign-in page](https://github.com/ababdelo/centre-formation/blob/dev/index.php): `index.php`
- [Login check](https://github.com/ababdelo/centre-formation/blob/dev/includes/checkuser.php): `includes/checkuser.php`
- [DB connection](https://github.com/ababdelo/centre-formation/blob/dev/config/connection.php): `config/connection.php`

### Administration

- [Admin dashboard](https://github.com/ababdelo/centre-formation/blob/dev/admin/dashboard.php): `admin/dashboard.php`
- [Student management](https://github.com/ababdelo/centre-formation/blob/dev/admin/ajouter-etudiant.php): `admin/ajouter-etudiant.php`
- [Student editing](https://github.com/ababdelo/centre-formation/blob/dev/admin/modifier-etudiant.php): `admin/modifier-etudiant.php`
- [Group management](https://github.com/ababdelo/centre-formation/blob/dev/admin/creer_groupe.php): `admin/creer_groupe.php`
- [Group membership](https://github.com/ababdelo/centre-formation/blob/dev/admin/consulter_etudiants_groupe.php): `admin/consulter_etudiants_groupe.php`
- [Trainer management](https://github.com/ababdelo/centre-formation/blob/dev/admin/formateur_int.php): `admin/formateur_int.php`
- [Module management](https://github.com/ababdelo/centre-formation/blob/dev/admin/module_int.php): `admin/module_int.php`
- [Assignment management](https://github.com/ababdelo/centre-formation/blob/dev/admin/affectation_int.php): `admin/affectation_int.php`

### Domain models

- [Student model](https://github.com/ababdelo/centre-formation/blob/dev/classes/etudiant.php): `classes/etudiant.php`
- [Group model](https://github.com/ababdelo/centre-formation/blob/dev/classes/groupe.php): `classes/groupe.php`
- [Module model](https://github.com/ababdelo/centre-formation/blob/dev/classes/module.php): `classes/module.php`
- [Assignment model](https://github.com/ababdelo/centre-formation/blob/dev/classes/affectation.php): `classes/affectation.php`
- [Database schema](https://github.com/ababdelo/centre-formation/blob/dev/database/schema.sql): `database/schema.sql`

### Planned user spaces

- [Trainer space](https://github.com/ababdelo/centre-formation/tree/dev/formateur): `formateur`
- [Student space](https://github.com/ababdelo/centre-formation/tree/dev/etudiant): `etudiant`

### Other components

- **User**
- **MySQL database**

## Connections

- User → Sign-in page: opens (evidence: `README.md`)
- Sign-in page → Login check: submits credentials (evidence: `index.php`)
- Sign-in page → DB connection: loads (evidence: `index.php`)
- Login check → DB connection: loads (evidence: `includes/checkuser.php`)
- Login check → Admin dashboard: redirects admin (evidence: `includes/checkuser.php`)
- DB connection → MySQL database: connects (evidence: `config/connection.php`)
- Student management → Student model: uses (evidence: `admin/ajouter-etudiant.php`)
- Student editing → Student model: updates via (evidence: `admin/modifier-etudiant.php`)
- Group membership → Group model: loads group (evidence: `admin/consulter_etudiants_groupe.php`)
- Group membership → Student model: manages membership (evidence: `admin/consulter_etudiants_groupe.php`)
- Group management → Group model: uses (evidence: `admin/creer_groupe.php`)
- Module management → Module model: uses (evidence: `admin/module_int.php`)
- Assignment management → Assignment model: uses (evidence: `admin/affectation_int.php`)
- Student model → MySQL database: queries and writes (evidence: `classes/etudiant.php`)
- Group model → MySQL database: queries and writes (evidence: `classes/groupe.php`)
- Module model → MySQL database: queries and writes (evidence: `classes/module.php`)
- Assignment model → MySQL database: queries and writes (evidence: `classes/affectation.php`)
- Database schema → MySQL database: defines tables (evidence: `README.md`)
- User → Trainer space: planned access (evidence: `README.md`)
- User → Student space: planned access (evidence: `README.md`)
