# kizo19/kc_sma architecture

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

- Interactive diagram: https://gitdiagram.com/kizo19/kc_sma
- Repository: https://github.com/kizo19/kc_sma

## Overview

This is a French-language school-management web application covering school administration, enrollment, student records, fees and payments, teaching workflows, and reporting. The principal workflow is school staff enrolling a student, associating the student with a class and parent, then managing fees and payments; role-based access and school subscriptions provide the surrounding administration. The README contains no usable product description, so capabilities are inferred from the repository tree and sampled source. Unsampled controller routing and several feature implementations are represented only where their paths are clear; uncertain links are omitted or marked dashed.

Main entry points: [`app/Core/Router.php`](https://github.com/kizo19/kc_sma/blob/main/app/Core/Router.php) (Request router), [`app/Controllers/InscriptionsController.php`](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/InscriptionsController.php) (Enrollment), [`app/Controllers/EcolesController.php`](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/EcolesController.php) (School administration), [`app/Controllers/PaiementsController.php`](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/PaiementsController.php) (Payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and schools"]
  node_auth["Authentication and roles<br/>[Auth.php]"]
  node_users["User accounts<br/>[User.php]"]
  node_rolefactory["Role factory<br/>[RoleFactory.php]"]
  node_schools["School administration"]
  node_schooldata["Schools and subscriptions<br/>[Ecole.php]"]
end

subgraph group_school["School operations"]
  node_dashboard["Dashboard"]
  node_enrollment["Enrollment"]
  node_students["Student records<br/>[Eleve.php]"]
  node_classes["Classes<br/>[Classe.php]"]
end

subgraph group_finance["Finance"]
  node_fees["School fees"]
  node_fee_records["Fee records<br/>[FraisScolaire.php]"]
  node_payments["Payments"]
  node_debts["Student debts<br/>[DetteEleve.php]"]
  node_notifier["Parent payment notices"]
end

subgraph group_learning["Teaching and reporting"]
  node_teaching["Teaching workflows"]
  node_attendance["Attendance"]
  node_bulletins["Student bulletins"]
  node_reports["Reports and statistics"]
end

subgraph group_runtime["Application runtime"]
  node_entry["Web entry<br/>[index.php]"]
  node_router["Request router<br/>[Router.php]"]
  node_database[("Database connection<br/>[Database.php]")]
  node_layout["Application layout<br/>[app_header.php]"]
end

node_staff(("School staff"))
node_families(("Families"))

node_staff -->|"uses"| node_entry
node_families -->|"uses"| node_entry
node_entry -->|"starts"| node_router
node_router -->|"checks access"| node_auth
node_router -.->|"routes to"| node_schools
node_router -.->|"routes to"| node_enrollment
node_router -.->|"routes to"| node_payments
node_router -.->|"routes to"| node_teaching
node_router -.->|"routes to"| node_attendance
node_router -.->|"routes to"| node_bulletins
node_router -.->|"routes to"| node_reports
node_auth -->|"loads users"| node_users
node_auth -->|"builds roles"| node_rolefactory
node_schools -->|"manages schools"| node_schooldata
node_schools -->|"manages accounts"| node_users
node_dashboard -->|"loads schools"| node_schooldata
node_dashboard -->|"loads users"| node_users
node_enrollment -->|"creates students"| node_students
node_enrollment -->|"checks classes"| node_classes
node_enrollment -->|"applies fees"| node_fee_records
node_fees -->|"manages fees"| node_fee_records
node_payments -->|"loads balances"| node_debts
node_payments -->|"notifies parents"| node_notifier
node_schools -.->|"queries through"| node_database
node_enrollment -->|"queries through"| node_database
node_payments -->|"queries through"| node_database
node_entry -.->|"renders"| node_layout

click node_entry "https://github.com/kizo19/kc_sma/blob/main/public/index.php"
click node_router "https://github.com/kizo19/kc_sma/blob/main/app/Core/Router.php"
click node_auth "https://github.com/kizo19/kc_sma/blob/main/app/Core/Auth.php"
click node_users "https://github.com/kizo19/kc_sma/blob/main/app/Models/User.php"
click node_rolefactory "https://github.com/kizo19/kc_sma/blob/main/app/Entities/RoleFactory.php"
click node_schools "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/EcolesController.php"
click node_schooldata "https://github.com/kizo19/kc_sma/blob/main/app/Models/Ecole.php"
click node_dashboard "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/DashboardController.php"
click node_enrollment "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/InscriptionsController.php"
click node_students "https://github.com/kizo19/kc_sma/blob/main/app/Models/Eleve.php"
click node_classes "https://github.com/kizo19/kc_sma/blob/main/app/Models/Classe.php"
click node_fees "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/FraisController.php"
click node_fee_records "https://github.com/kizo19/kc_sma/blob/main/app/Models/FraisScolaire.php"
click node_payments "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/PaiementsController.php"
click node_debts "https://github.com/kizo19/kc_sma/blob/main/app/Models/DetteEleve.php"
click node_notifier "https://github.com/kizo19/kc_sma/blob/main/app/Services/PaymentParentNotifier.php"
click node_teaching "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/NotesController.php"
click node_attendance "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/PresencesController.php"
click node_bulletins "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/BulletinsController.php"
click node_reports "https://github.com/kizo19/kc_sma/blob/main/app/Controllers/RapportsController.php"
click node_database "https://github.com/kizo19/kc_sma/blob/main/app/Core/Database.php"
click node_layout "https://github.com/kizo19/kc_sma/blob/main/app/Views/partials/app_header.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_auth,node_users,node_rolefactory,node_schools,node_schooldata toneBlue
class node_dashboard,node_enrollment,node_students,node_classes toneAmber
class node_fees,node_fee_records,node_payments,node_debts,node_notifier toneMint
class node_teaching,node_attendance,node_bulletins,node_reports toneRose
class node_entry,node_router,node_database,node_layout,node_staff,node_families toneIndigo
```

## Components

### Access and schools

- [Authentication and roles](https://github.com/kizo19/kc_sma/blob/main/app/Core/Auth.php): `app/Core/Auth.php`
- [User accounts](https://github.com/kizo19/kc_sma/blob/main/app/Models/User.php): `app/Models/User.php`
- [Role factory](https://github.com/kizo19/kc_sma/blob/main/app/Entities/RoleFactory.php): `app/Entities/RoleFactory.php`
- [School administration](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/EcolesController.php): `app/Controllers/EcolesController.php`
- [Schools and subscriptions](https://github.com/kizo19/kc_sma/blob/main/app/Models/Ecole.php): `app/Models/Ecole.php`

### School operations

- [Dashboard](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/DashboardController.php): `app/Controllers/DashboardController.php`
- [Enrollment](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/InscriptionsController.php): `app/Controllers/InscriptionsController.php`
- [Student records](https://github.com/kizo19/kc_sma/blob/main/app/Models/Eleve.php): `app/Models/Eleve.php`
- [Classes](https://github.com/kizo19/kc_sma/blob/main/app/Models/Classe.php): `app/Models/Classe.php`

### Finance

- [School fees](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/FraisController.php): `app/Controllers/FraisController.php`
- [Fee records](https://github.com/kizo19/kc_sma/blob/main/app/Models/FraisScolaire.php): `app/Models/FraisScolaire.php`
- [Payments](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/PaiementsController.php): `app/Controllers/PaiementsController.php`
- [Student debts](https://github.com/kizo19/kc_sma/blob/main/app/Models/DetteEleve.php): `app/Models/DetteEleve.php`
- [Parent payment notices](https://github.com/kizo19/kc_sma/blob/main/app/Services/PaymentParentNotifier.php): `app/Services/PaymentParentNotifier.php`

### Teaching and reporting

- [Teaching workflows](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/NotesController.php): `app/Controllers/NotesController.php`
- [Attendance](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/PresencesController.php): `app/Controllers/PresencesController.php`
- [Student bulletins](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/BulletinsController.php): `app/Controllers/BulletinsController.php`
- [Reports and statistics](https://github.com/kizo19/kc_sma/blob/main/app/Controllers/RapportsController.php): `app/Controllers/RapportsController.php`

### Application runtime

- [Web entry](https://github.com/kizo19/kc_sma/blob/main/public/index.php): `public/index.php`
- [Request router](https://github.com/kizo19/kc_sma/blob/main/app/Core/Router.php): `app/Core/Router.php`
- [Database connection](https://github.com/kizo19/kc_sma/blob/main/app/Core/Database.php): `app/Core/Database.php`
- [Application layout](https://github.com/kizo19/kc_sma/blob/main/app/Views/partials/app_header.php): `app/Views/partials/app_header.php`

### Other components

- **School staff**
- **Families**

## Connections

- School staff → Web entry: uses
- Families → Web entry: uses
- Web entry → Request router: starts (evidence: `public/index.php`)
- Request router → Authentication and roles: checks access (evidence: `app/Core/Router.php`)
- Request router → School administration: routes to
- Request router → Enrollment: routes to
- Request router → Payments: routes to
- Request router → Teaching workflows: routes to
- Request router → Attendance: routes to
- Request router → Student bulletins: routes to
- Request router → Reports and statistics: routes to
- Authentication and roles → User accounts: loads users (evidence: `app/Core/Auth.php`)
- Authentication and roles → Role factory: builds roles (evidence: `app/Core/Auth.php`)
- School administration → Schools and subscriptions: manages schools (evidence: `app/Controllers/EcolesController.php`)
- School administration → User accounts: manages accounts (evidence: `app/Controllers/EcolesController.php`)
- Dashboard → Schools and subscriptions: loads schools (evidence: `app/Controllers/DashboardController.php`)
- Dashboard → User accounts: loads users (evidence: `app/Controllers/DashboardController.php`)
- Enrollment → Student records: creates students (evidence: `app/Controllers/InscriptionsController.php`)
- Enrollment → Classes: checks classes (evidence: `app/Controllers/InscriptionsController.php`)
- Enrollment → Fee records: applies fees (evidence: `app/Controllers/InscriptionsController.php`)
- School fees → Fee records: manages fees (evidence: `app/Controllers/FraisController.php`)
- Payments → Student debts: loads balances (evidence: `app/Controllers/PaiementsController.php`)
- Payments → Parent payment notices: notifies parents (evidence: `app/Controllers/PaiementsController.php`)
- School administration → Database connection: queries through
- Enrollment → Database connection: queries through (evidence: `app/Controllers/InscriptionsController.php`)
- Payments → Database connection: queries through (evidence: `app/Controllers/PaiementsController.php`)
- Web entry → Application layout: renders
