# tmilefr/site_travaux architecture

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

- Interactive diagram: https://gitdiagram.com/tmilefr/site_travaux
- Repository: https://github.com/tmilefr/site_travaux

## Overview

site_travaux is a CodeIgniter application for managing family participation in association work sessions, validating participation credits, and coordinating related services. The main workflow runs from administrator-created sessions through family registration, referent validation, and administrative review. Separate capabilities cover lunch care, commissions and candidates, account and access management, REST access, and queued email notifications. The graph emphasizes documented product relationships; source excerpts are incomplete, so unsampled implementation links are omitted.

Main entry points: [`application/libraries/RefNotifier.php`](https://github.com/tmilefr/site_travaux/blob/main/application/libraries/RefNotifier.php) (Referent validation), [`application/controllers/Units_controller.php`](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Units_controller.php) (Unit review), [`application/core/MY_Controller.php`](https://github.com/tmilefr/site_travaux/blob/main/application/core/MY_Controller.php) (Generic CRUD), [`application/controllers/Cron.php`](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Cron.php) (Scheduled jobs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_participation["Work participation"]
  node_work_admin["Work sessions"]
  node_registrations["Work registration"]
  node_referent_validation["Referent validation<br/>[RefNotifier.php]"]
  node_unit_review["Unit review"]
  node_cantine["Lunch care"]
end

subgraph group_community["Family and community"]
  node_families["Family management"]
  node_commissions["Commissions"]
  node_candidates["Candidatures"]
end

subgraph group_platform["Application platform"]
  node_login["Login and account<br/>[Home.php]"]
  node_access_control["Access control<br/>[Acl.php]"]
  node_acl_gate["Request ACL hook<br/>[Loginchecker.php]"]
  node_generic_crud["Generic CRUD<br/>[MY_Controller.php]"]
  node_core_model["Schema-backed data model<br/>[Core_model.php]"]
  node_rendering["Schema-based rendering<br/>[Render_object.php]"]
end

subgraph group_communications["API and messaging"]
  node_rest_api["REST API<br/>[Api.php]"]
  node_cron["Scheduled jobs<br/>[Cron.php]"]
  node_email_queue["Email queue<br/>[Sendmail_model.php]"]
  node_mail_service["SMTP mail"]
end

node_admin(("Administrator"))
node_family_user(("Family user"))
node_referent(("Session referent"))
node_delta_sso["Delta Enfance SSO"]
node_database[("MySQL database")]

node_admin -->|"creates and publishes"| node_work_admin
node_family_user -->|"registers for work"| node_registrations
node_referent -->|"validates attendance"| node_referent_validation
node_referent_validation -->|"submits for review"| node_unit_review
node_admin -->|"reviews credits"| node_unit_review
node_family_user -->|"uses lunch care"| node_cantine
node_admin -->|"manages commissions"| node_commissions
node_admin -->|"manages candidates"| node_candidates
node_family_user -->|"signs in"| node_login
node_login -->|"checks credentials"| node_access_control
node_acl_gate -->|"checks each action"| node_access_control
node_admin -->|"requests protected action"| node_acl_gate
node_generic_crud -->|"reads and writes"| node_core_model
node_generic_crud -.->|"generates views"| node_rendering
node_work_admin -.->|"persists sessions"| node_database
node_registrations -.->|"stores registrations"| node_database
node_referent_validation -.->|"updates attendance"| node_database
node_unit_review -.->|"reviews participation data"| node_database
node_cron -->|"sends reminders"| node_referent_validation
node_cron -->|"processes queued mail"| node_email_queue
node_email_queue -->|"delivers messages"| node_mail_service
node_rest_api -->|"serves API requests"| node_family_user
node_family_user -.->|"authenticates via SSO"| node_delta_sso
node_delta_sso -.->|"synchronizes account"| node_families

click node_work_admin "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Admwork_controller.php"
click node_registrations "https://github.com/tmilefr/site_travaux/blob/main/application/models/Candidatures_model.php"
click node_referent_validation "https://github.com/tmilefr/site_travaux/blob/main/application/libraries/RefNotifier.php"
click node_unit_review "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Units_controller.php"
click node_cantine "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Cantine_controller.php"
click node_families "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Familys_controller.php"
click node_commissions "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Orgchart_controller.php"
click node_candidates "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Candidatures_controller.php"
click node_login "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Home.php"
click node_access_control "https://github.com/tmilefr/site_travaux/blob/main/application/libraries/Acl.php"
click node_acl_gate "https://github.com/tmilefr/site_travaux/blob/main/application/hooks/Loginchecker.php"
click node_generic_crud "https://github.com/tmilefr/site_travaux/blob/main/application/core/MY_Controller.php"
click node_core_model "https://github.com/tmilefr/site_travaux/blob/main/application/models/Core_model.php"
click node_rendering "https://github.com/tmilefr/site_travaux/blob/main/application/libraries/Render_object.php"
click node_rest_api "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Api.php"
click node_cron "https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Cron.php"
click node_email_queue "https://github.com/tmilefr/site_travaux/blob/main/application/models/Sendmail_model.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_work_admin,node_registrations,node_referent_validation,node_unit_review,node_cantine,node_family_user toneBlue
class node_families,node_commissions,node_candidates,node_database toneAmber
class node_login,node_access_control,node_acl_gate,node_generic_crud,node_core_model,node_rendering toneMint
class node_rest_api,node_cron,node_email_queue,node_mail_service toneRose
class node_admin,node_referent,node_delta_sso toneIndigo
```

## Components

### Work participation

- [Work sessions](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Admwork_controller.php): `application/controllers/Admwork_controller.php`
- [Work registration](https://github.com/tmilefr/site_travaux/blob/main/application/models/Candidatures_model.php): `application/models/Candidatures_model.php`
- [Referent validation](https://github.com/tmilefr/site_travaux/blob/main/application/libraries/RefNotifier.php): `application/libraries/RefNotifier.php`
- [Unit review](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Units_controller.php): `application/controllers/Units_controller.php`
- [Lunch care](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Cantine_controller.php): `application/controllers/Cantine_controller.php`

### Family and community

- [Family management](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Familys_controller.php): `application/controllers/Familys_controller.php`
- [Commissions](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Orgchart_controller.php): `application/controllers/Orgchart_controller.php`
- [Candidatures](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Candidatures_controller.php): `application/controllers/Candidatures_controller.php`

### Application platform

- [Login and account](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Home.php): `application/controllers/Home.php`
- [Access control](https://github.com/tmilefr/site_travaux/blob/main/application/libraries/Acl.php): `application/libraries/Acl.php`
- [Request ACL hook](https://github.com/tmilefr/site_travaux/blob/main/application/hooks/Loginchecker.php): `application/hooks/Loginchecker.php`
- [Generic CRUD](https://github.com/tmilefr/site_travaux/blob/main/application/core/MY_Controller.php): `application/core/MY_Controller.php`
- [Schema-backed data model](https://github.com/tmilefr/site_travaux/blob/main/application/models/Core_model.php): `application/models/Core_model.php`
- [Schema-based rendering](https://github.com/tmilefr/site_travaux/blob/main/application/libraries/Render_object.php): `application/libraries/Render_object.php`

### API and messaging

- [REST API](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Api.php): `application/controllers/Api.php`
- [Scheduled jobs](https://github.com/tmilefr/site_travaux/blob/main/application/controllers/Cron.php): `application/controllers/Cron.php`
- [Email queue](https://github.com/tmilefr/site_travaux/blob/main/application/models/Sendmail_model.php): `application/models/Sendmail_model.php`
- **SMTP mail**

### Other components

- **Administrator**
- **Family user**
- **Session referent**
- **Delta Enfance SSO**
- **MySQL database**

## Connections

- Administrator → Work sessions: creates and publishes (evidence: `README.md`)
- Family user → Work registration: registers for work (evidence: `README.md`)
- Session referent → Referent validation: validates attendance (evidence: `README.md`)
- Referent validation → Unit review: submits for review (evidence: `README.md`)
- Administrator → Unit review: reviews credits (evidence: `README.md`)
- Family user → Lunch care: uses lunch care (evidence: `README.md`)
- Administrator → Commissions: manages commissions (evidence: `README.md`)
- Administrator → Candidatures: manages candidates (evidence: `README.md`)
- Family user → Login and account: signs in (evidence: `application/controllers/Home.php`)
- Login and account → Access control: checks credentials (evidence: `application/controllers/Home.php`)
- Request ACL hook → Access control: checks each action (evidence: `README.md`)
- Administrator → Request ACL hook: requests protected action (evidence: `README.md`)
- Generic CRUD → Schema-backed data model: reads and writes (evidence: `application/core/MY_Controller.php`)
- Generic CRUD → Schema-based rendering: generates views (evidence: `README.md`)
- Work sessions → MySQL database: persists sessions (evidence: `README.md`)
- Work registration → MySQL database: stores registrations (evidence: `README.md`)
- Referent validation → MySQL database: updates attendance (evidence: `README.md`)
- Unit review → MySQL database: reviews participation data (evidence: `README.md`)
- Scheduled jobs → Referent validation: sends reminders (evidence: `README.md`)
- Scheduled jobs → Email queue: processes queued mail (evidence: `README.md`)
- Email queue → SMTP mail: delivers messages (evidence: `README.md`)
- REST API → Family user: serves API requests (evidence: `README.md`)
- Family user → Delta Enfance SSO: authenticates via SSO (evidence: `README.md`)
- Delta Enfance SSO → Family management: synchronizes account (evidence: `README.md`)
