# amarkarimmed-art/sortie-ecole architecture

> Architecture diagram of the GitHub repository amarkarimmed-art/sortie-ecole, 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/amarkarimmed-art/sortie-ecole
- Repository: https://github.com/amarkarimmed-art/sortie-ecole

## Overview

Sortie d'école is a school-pickup management product. The backend workflow covers parent authentication and arrival signaling, then school staff queue processing through class notification, departure, and child handover. The README also documents separate parent and school Flutter apps, with offline-first school sync, plus shared API and UI packages; those frontend implementations are not present in the supplied tree. Backend edges are limited to relationships documented in the README or visible in the supplied source index and excerpts.

Main entry points: [`backend/app/Http/Controllers/Api/QueueController.php`](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/QueueController.php) (Queue API), [`backend/app/Models`](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Models) (School and pickup models), [`backend/app/Repositories`](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Repositories) (Data repositories), [`backend/app/Http/Controllers/Api/ArrivalController.php`](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/ArrivalController.php) (Arrival API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API boundary"]
  node_auth_api["Auth API<br/>[AuthController.php]"]
  node_arrival_api["Arrival API"]
  node_queue_api["Queue API"]
  node_student_import_api["Student import API"]
end

subgraph group_identity["Identity and arrivals"]
  node_otp_actions["OTP actions"]
  node_sms_gateway["SMS gateway"]
  node_sms_drivers["SMS drivers"]
  node_student_import["Student import"]
  node_arrival_signaling["Arrival signaling"]
  node_arrival_status["Arrival status"]
end

subgraph group_queue["Pickup operations"]
  node_queue_listing["Queue listing"]
  node_class_call["Class notification"]
  node_departure["Mark departure"]
  node_presence["Confirm presence"]
  node_handover["Child handover<br/>[HandoverAction.php]"]
end

subgraph group_data["Domain and persistence"]
  node_domain_models["School and pickup models"]
  node_repositories["Data repositories"]
  node_handover_logs[("Handover log<br/>[HandoverLog.php]")]
  node_database[("PostgreSQL")]
end

node_parent(("Parent"))
node_school_staff(("School staff"))

node_parent -->|"requests access"| node_auth_api
node_parent -->|"signals arrival"| node_arrival_api
node_school_staff -->|"manages pickup"| node_queue_api
node_auth_api -->|"dispatches"| node_otp_actions
node_otp_actions -->|"sends OTP"| node_sms_gateway
node_sms_drivers -->|"implements"| node_sms_gateway
node_student_import_api -->|"dispatches"| node_student_import
node_arrival_api -->|"dispatches"| node_arrival_signaling
node_arrival_api -->|"dispatches"| node_arrival_status
node_arrival_signaling -->|"uses repositories"| node_repositories
node_arrival_status -->|"queries arrival"| node_repositories
node_queue_api -->|"dispatches"| node_queue_listing
node_queue_api -->|"dispatches"| node_class_call
node_queue_api -->|"dispatches"| node_departure
node_queue_api -->|"dispatches"| node_presence
node_queue_api -->|"dispatches"| node_handover
node_queue_listing -.->|"uses repositories"| node_repositories
node_class_call -.->|"updates request"| node_domain_models
node_departure -.->|"updates request"| node_domain_models
node_presence -.->|"updates request"| node_domain_models
node_handover -->|"records handover"| node_handover_logs
node_repositories -->|"accesses models"| node_domain_models
node_domain_models -->|"persists records"| node_database

click node_auth_api "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/AuthController.php"
click node_arrival_api "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/ArrivalController.php"
click node_queue_api "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/QueueController.php"
click node_student_import_api "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/StudentImportController.php"
click node_otp_actions "https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Actions/Auth"
click node_sms_gateway "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Contracts/SmsGatewayInterface.php"
click node_sms_drivers "https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Services/Sms"
click node_student_import "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Auth/ImportStudentsAction.php"
click node_arrival_signaling "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Arrival/SignalArrivalAction.php"
click node_arrival_status "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Arrival/GetArrivalStatusAction.php"
click node_queue_listing "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/ListActiveQueueAction.php"
click node_class_call "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/CallClassAction.php"
click node_departure "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/MarkDepartAction.php"
click node_presence "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/ConfirmPresenceAction.php"
click node_handover "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/HandoverAction.php"
click node_domain_models "https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Models"
click node_repositories "https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Repositories"
click node_handover_logs "https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Models/HandoverLog.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_api,node_arrival_api,node_queue_api,node_student_import_api toneBlue
class node_otp_actions,node_sms_gateway,node_sms_drivers,node_student_import,node_arrival_signaling,node_arrival_status toneAmber
class node_queue_listing,node_class_call,node_departure,node_presence,node_handover toneMint
class node_domain_models,node_repositories,node_handover_logs,node_database toneRose
class node_parent,node_school_staff toneIndigo
```

## Components

### API boundary

- [Auth API](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/AuthController.php): `backend/app/Http/Controllers/Api/AuthController.php`
- [Arrival API](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/ArrivalController.php): `backend/app/Http/Controllers/Api/ArrivalController.php`
- [Queue API](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/QueueController.php): `backend/app/Http/Controllers/Api/QueueController.php`
- [Student import API](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Http/Controllers/Api/StudentImportController.php): `backend/app/Http/Controllers/Api/StudentImportController.php`

### Identity and arrivals

- [OTP actions](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Actions/Auth): `backend/app/Actions/Auth`
- [SMS gateway](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Contracts/SmsGatewayInterface.php): `backend/app/Contracts/SmsGatewayInterface.php`
- [SMS drivers](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Services/Sms): `backend/app/Services/Sms`
- [Student import](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Auth/ImportStudentsAction.php): `backend/app/Actions/Auth/ImportStudentsAction.php`
- [Arrival signaling](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Arrival/SignalArrivalAction.php): `backend/app/Actions/Arrival/SignalArrivalAction.php`
- [Arrival status](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Arrival/GetArrivalStatusAction.php): `backend/app/Actions/Arrival/GetArrivalStatusAction.php`

### Pickup operations

- [Queue listing](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/ListActiveQueueAction.php): `backend/app/Actions/Queue/ListActiveQueueAction.php`
- [Class notification](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/CallClassAction.php): `backend/app/Actions/Queue/CallClassAction.php`
- [Mark departure](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/MarkDepartAction.php): `backend/app/Actions/Queue/MarkDepartAction.php`
- [Confirm presence](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/ConfirmPresenceAction.php): `backend/app/Actions/Queue/ConfirmPresenceAction.php`
- [Child handover](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Actions/Queue/HandoverAction.php): `backend/app/Actions/Queue/HandoverAction.php`

### Domain and persistence

- [School and pickup models](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Models): `backend/app/Models`
- [Data repositories](https://github.com/amarkarimmed-art/sortie-ecole/tree/main/backend/app/Repositories): `backend/app/Repositories`
- [Handover log](https://github.com/amarkarimmed-art/sortie-ecole/blob/main/backend/app/Models/HandoverLog.php): `backend/app/Models/HandoverLog.php`
- **PostgreSQL**

### Other components

- **Parent**
- **School staff**

## Connections

- Parent → Auth API: requests access (evidence: `README.md`)
- Parent → Arrival API: signals arrival (evidence: `backend/app/Http/Controllers/Api/ArrivalController.php`)
- School staff → Queue API: manages pickup (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Auth API → OTP actions: dispatches (evidence: `backend/app/Http/Controllers/Api/AuthController.php`)
- OTP actions → SMS gateway: sends OTP (evidence: `backend/app/Actions/Auth/SendOtpAction.php`)
- SMS drivers → SMS gateway: implements (evidence: `backend/app/Providers/AppServiceProvider.php`)
- Student import API → Student import: dispatches (evidence: `backend/app/Http/Controllers/Api/StudentImportController.php`)
- Arrival API → Arrival signaling: dispatches (evidence: `backend/app/Http/Controllers/Api/ArrivalController.php`)
- Arrival API → Arrival status: dispatches (evidence: `backend/app/Http/Controllers/Api/ArrivalController.php`)
- Arrival signaling → Data repositories: uses repositories (evidence: `backend/app/Actions/Arrival/SignalArrivalAction.php`)
- Arrival status → Data repositories: queries arrival (evidence: `backend/app/Actions/Arrival/GetArrivalStatusAction.php`)
- Queue API → Queue listing: dispatches (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Queue API → Class notification: dispatches (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Queue API → Mark departure: dispatches (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Queue API → Confirm presence: dispatches (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Queue API → Child handover: dispatches (evidence: `backend/app/Http/Controllers/Api/QueueController.php`)
- Queue listing → Data repositories: uses repositories
- Class notification → School and pickup models: updates request
- Mark departure → School and pickup models: updates request
- Confirm presence → School and pickup models: updates request
- Child handover → Handover log: records handover (evidence: `backend/app/Actions/Queue/HandoverAction.php`)
- Data repositories → School and pickup models: accesses models (evidence: `backend/app/Repositories/ArrivalRepository.php`)
- School and pickup models → PostgreSQL: persists records (evidence: `README.md`)
