# misterizraiah/gestion-stages-php architecture

> Architecture diagram of the GitHub repository misterizraiah/gestion-stages-php, 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/misterizraiah/gestion-stages-php
- Repository: https://github.com/misterizraiah/gestion-stages-php

## Overview

This is a small PHP internship-management application. Users submit credentials, which are checked against the users table; successful login stores the user in the session and routes admins to the stage overview or students to their own stage dashboard. Admin review and student viewing are distinct workflows. The supplied admin page offers validation/rejection forms, but their target handler is absent from the tree; the entreprise, etudiants and stages files are empty in the supplied excerpts, so their behavior cannot be mapped.

Main entry points: [`public/login.php`](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/login.php) (Sign in), [`public/admin.php`](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/admin.php) (Admin overview), [`public/dashboard.php`](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/dashboard.php) (Student dashboard), [`public/logout.php`](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/logout.php) (Sign out)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_login["Sign in<br/>[login.php]"]
  node_session[("PHP session")]
  node_users_db[("Users table")]
  node_logout["Sign out<br/>[logout.php]"]
end

subgraph group_stages["Stage workflows"]
  node_admin["Admin overview<br/>[admin.php]"]
  node_dashboard["Student dashboard<br/>[dashboard.php]"]
  node_stages_db[("Stages table")]
end

subgraph group_ui["Presentation"]
  node_stylesheet["Stylesheet<br/>[style.css]"]
end

node_user(("User"))

node_user -->|"submits credentials"| node_login
node_login -->|"checks credentials"| node_users_db
node_login -->|"stores user"| node_session
node_login -->|"redirects admin"| node_admin
node_login -->|"redirects student"| node_dashboard
node_admin -->|"checks role"| node_session
node_admin -->|"reads all stages"| node_stages_db
node_dashboard -->|"checks role"| node_session
node_dashboard -->|"reads user stages"| node_stages_db
node_user -->|"requests sign out"| node_logout
node_logout -->|"destroys session"| node_session
node_logout -->|"redirects"| node_login
node_login -->|"loads"| node_stylesheet
node_admin -->|"loads"| node_stylesheet
node_dashboard -->|"loads"| node_stylesheet

click node_login "https://github.com/misterizraiah/gestion-stages-php/blob/main/public/login.php"
click node_admin "https://github.com/misterizraiah/gestion-stages-php/blob/main/public/admin.php"
click node_dashboard "https://github.com/misterizraiah/gestion-stages-php/blob/main/public/dashboard.php"
click node_logout "https://github.com/misterizraiah/gestion-stages-php/blob/main/public/logout.php"
click node_stylesheet "https://github.com/misterizraiah/gestion-stages-php/blob/main/public/css/style.css"

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_session,node_users_db,node_logout,node_user toneBlue
class node_admin,node_dashboard,node_stages_db toneAmber
class node_stylesheet toneMint
```

## Components

### Authentication

- [Sign in](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/login.php): `public/login.php`
- **PHP session**
- **Users table**
- [Sign out](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/logout.php): `public/logout.php`

### Stage workflows

- [Admin overview](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/admin.php): `public/admin.php`
- [Student dashboard](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/dashboard.php): `public/dashboard.php`
- **Stages table**

### Presentation

- [Stylesheet](https://github.com/misterizraiah/gestion-stages-php/blob/main/public/css/style.css): `public/css/style.css`

### Other components

- **User**

## Connections

- User → Sign in: submits credentials
- Sign in → Users table: checks credentials
- Sign in → PHP session: stores user
- Sign in → Admin overview: redirects admin
- Sign in → Student dashboard: redirects student
- Admin overview → PHP session: checks role
- Admin overview → Stages table: reads all stages
- Student dashboard → PHP session: checks role
- Student dashboard → Stages table: reads user stages
- User → Sign out: requests sign out
- Sign out → PHP session: destroys session
- Sign out → Sign in: redirects
- Sign in → Stylesheet: loads
- Admin overview → Stylesheet: loads
- Student dashboard → Stylesheet: loads
