# barrato14/test-systeml architecture

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

- Interactive diagram: https://gitdiagram.com/barrato14/test-systeml
- Repository: https://github.com/barrato14/test-systeml

## Overview

EMIS is a PHP event-management system with participant and administrator workflows: users authenticate, browse/register for events, manage equipment borrowing, and record attendance; administrators manage events, users, equipment, and attendance. Supabase REST is the shared persistence layer, with optional face-recognition and email integrations. The graph emphasizes relationships visible in excerpts or the source index; unsampled capabilities are represented without speculative call edges.

Main entry points: [`config/database.php`](https://github.com/barrato14/test-systeml/blob/main/config/database.php) (Supabase REST), [`includes/mail.php`](https://github.com/barrato14/test-systeml/blob/main/includes/mail.php) (Email Delivery), [`login.php`](https://github.com/barrato14/test-systeml/blob/main/login.php) (Sign-in), [`set-session.php`](https://github.com/barrato14/test-systeml/blob/main/set-session.php) (Social Session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity &amp; Access"]
  node_login["Sign-in<br/>[login.php]"]
  node_social["Social Session<br/>[set-session.php]"]
  node_registration["Registration<br/>[register.php]"]
  node_profile["Profile Completion"]
end

subgraph group_participant["Participant Portal"]
  node_participant_dashboard["Participant Dashboard<br/>[dashboard.php]"]
  node_event_browse["Browse Events<br/>[browse-events.php]"]
  node_my_events["My Events<br/>[my-events.php]"]
  node_equipment_borrow["Equipment Borrowing<br/>[equipment.php]"]
  node_borrowings["My Borrowings<br/>[my-borrowings.php]"]
  node_attendance["Check-in &amp; Timeout"]
  node_face_registration["Face Registration"]
  node_qr["Event QR<br/>[my-qr.php]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[dashboard.php]"]
  node_event_admin["Event Management<br/>[events.php]"]
  node_equipment_admin["Equipment Management<br/>[equipment.php]"]
  node_user_admin["User Management<br/>[users.php]"]
  node_attendance_logs["Attendance Logs"]
end

subgraph group_services["Shared Services"]
  node_database[("Supabase REST<br/>[database.php]")]
  node_auth_helper["Session &amp; Roles<br/>[auth.php]"]
  node_face_helper["Face Client<br/>[face-service.php]"]
  node_face_service["Face Service<br/>[app.py]"]
  node_mail["Email Delivery<br/>[mail.php]"]
  node_weather["Weather Widget<br/>[weather-widget.php]"]
end

node_user(("User"))
node_supabase[("Supabase")]
node_brevo["Brevo"]

node_user -->|"signs in"| node_login
node_user -.->|"registers"| node_registration
node_user -->|"authenticates"| node_social
node_social -->|"routes new users"| node_profile
node_login -->|"queries profiles"| node_database
node_registration -->|"stores profile"| node_database
node_registration -->|"sends verification"| node_mail
node_social -->|"queries profiles"| node_database
node_profile -->|"updates profile"| node_database
node_login -->|"uses sessions"| node_auth_helper
node_participant_dashboard -->|"loads dashboard data"| node_database
node_participant_dashboard -->|"renders weather"| node_weather
node_event_browse -->|"loads events"| node_database
node_my_events -->|"loads registrations"| node_database
node_equipment_borrow -->|"requests equipment"| node_database
node_borrowings -->|"loads requests"| node_database
node_attendance -->|"records attendance"| node_database
node_attendance -->|"checks face"| node_face_helper
node_face_registration -->|"loads registration data"| node_database
node_face_helper -->|"posts recognition request"| node_face_service
node_qr -->|"sends QR email"| node_mail
node_admin_dashboard -->|"loads metrics"| node_database
node_admin_dashboard -->|"renders weather"| node_weather
node_event_admin -->|"manages events"| node_database
node_event_admin -->|"sends announcements"| node_mail
node_equipment_admin -->|"manages equipment"| node_database
node_user_admin -->|"manages users"| node_database
node_attendance_logs -->|"loads attendance"| node_database
node_mail -->|"sends email"| node_brevo
node_face_service -.->|"processes face data"| node_user
node_database -->|"REST requests"| node_supabase

click node_login "https://github.com/barrato14/test-systeml/blob/main/login.php"
click node_social "https://github.com/barrato14/test-systeml/blob/main/set-session.php"
click node_registration "https://github.com/barrato14/test-systeml/blob/main/register.php"
click node_profile "https://github.com/barrato14/test-systeml/blob/main/complete-google-profile.php"
click node_participant_dashboard "https://github.com/barrato14/test-systeml/blob/main/participant/dashboard.php"
click node_event_browse "https://github.com/barrato14/test-systeml/blob/main/participant/browse-events.php"
click node_my_events "https://github.com/barrato14/test-systeml/blob/main/participant/my-events.php"
click node_equipment_borrow "https://github.com/barrato14/test-systeml/blob/main/participant/equipment.php"
click node_borrowings "https://github.com/barrato14/test-systeml/blob/main/participant/my-borrowings.php"
click node_attendance "https://github.com/barrato14/test-systeml/blob/main/participant/process-check-in.php"
click node_face_registration "https://github.com/barrato14/test-systeml/blob/main/participant/face-registration.php"
click node_qr "https://github.com/barrato14/test-systeml/blob/main/participant/my-qr.php"
click node_admin_dashboard "https://github.com/barrato14/test-systeml/blob/main/admin/dashboard.php"
click node_event_admin "https://github.com/barrato14/test-systeml/blob/main/admin/events.php"
click node_equipment_admin "https://github.com/barrato14/test-systeml/blob/main/admin/equipment.php"
click node_user_admin "https://github.com/barrato14/test-systeml/blob/main/admin/users.php"
click node_attendance_logs "https://github.com/barrato14/test-systeml/blob/main/admin/attendance-logs.php"
click node_database "https://github.com/barrato14/test-systeml/blob/main/config/database.php"
click node_auth_helper "https://github.com/barrato14/test-systeml/blob/main/includes/auth.php"
click node_face_helper "https://github.com/barrato14/test-systeml/blob/main/includes/face-service.php"
click node_face_service "https://github.com/barrato14/test-systeml/blob/main/face-service/app.py"
click node_mail "https://github.com/barrato14/test-systeml/blob/main/includes/mail.php"
click node_weather "https://github.com/barrato14/test-systeml/blob/main/includes/weather-widget.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_login,node_social,node_registration,node_profile,node_user toneBlue
class node_participant_dashboard,node_event_browse,node_my_events,node_equipment_borrow,node_borrowings,node_attendance,node_face_registration,node_qr,node_supabase toneAmber
class node_admin_dashboard,node_event_admin,node_equipment_admin,node_user_admin,node_attendance_logs toneMint
class node_database,node_auth_helper,node_face_helper,node_face_service,node_mail,node_weather toneRose
class node_brevo toneIndigo
```

## Components

### Identity & Access

- [Sign-in](https://github.com/barrato14/test-systeml/blob/main/login.php): `login.php`
- [Social Session](https://github.com/barrato14/test-systeml/blob/main/set-session.php): `set-session.php`
- [Registration](https://github.com/barrato14/test-systeml/blob/main/register.php): `register.php`
- [Profile Completion](https://github.com/barrato14/test-systeml/blob/main/complete-google-profile.php): `complete-google-profile.php`

### Participant Portal

- [Participant Dashboard](https://github.com/barrato14/test-systeml/blob/main/participant/dashboard.php): `participant/dashboard.php`
- [Browse Events](https://github.com/barrato14/test-systeml/blob/main/participant/browse-events.php): `participant/browse-events.php`
- [My Events](https://github.com/barrato14/test-systeml/blob/main/participant/my-events.php): `participant/my-events.php`
- [Equipment Borrowing](https://github.com/barrato14/test-systeml/blob/main/participant/equipment.php): `participant/equipment.php`
- [My Borrowings](https://github.com/barrato14/test-systeml/blob/main/participant/my-borrowings.php): `participant/my-borrowings.php`
- [Check-in & Timeout](https://github.com/barrato14/test-systeml/blob/main/participant/process-check-in.php): `participant/process-check-in.php`
- [Face Registration](https://github.com/barrato14/test-systeml/blob/main/participant/face-registration.php): `participant/face-registration.php`
- [Event QR](https://github.com/barrato14/test-systeml/blob/main/participant/my-qr.php): `participant/my-qr.php`

### Administration

- [Admin Dashboard](https://github.com/barrato14/test-systeml/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [Event Management](https://github.com/barrato14/test-systeml/blob/main/admin/events.php): `admin/events.php`
- [Equipment Management](https://github.com/barrato14/test-systeml/blob/main/admin/equipment.php): `admin/equipment.php`
- [User Management](https://github.com/barrato14/test-systeml/blob/main/admin/users.php): `admin/users.php`
- [Attendance Logs](https://github.com/barrato14/test-systeml/blob/main/admin/attendance-logs.php): `admin/attendance-logs.php`

### Shared Services

- [Supabase REST](https://github.com/barrato14/test-systeml/blob/main/config/database.php): `config/database.php`
- [Session & Roles](https://github.com/barrato14/test-systeml/blob/main/includes/auth.php): `includes/auth.php`
- [Face Client](https://github.com/barrato14/test-systeml/blob/main/includes/face-service.php): `includes/face-service.php`
- [Face Service](https://github.com/barrato14/test-systeml/blob/main/face-service/app.py): `face-service/app.py`
- [Email Delivery](https://github.com/barrato14/test-systeml/blob/main/includes/mail.php): `includes/mail.php`
- [Weather Widget](https://github.com/barrato14/test-systeml/blob/main/includes/weather-widget.php): `includes/weather-widget.php`

### Other components

- **User**
- **Supabase**
- **Brevo**

## Connections

- User → Sign-in: signs in (evidence: `login.php`)
- User → Registration: registers
- User → Social Session: authenticates (evidence: `set-session.php`)
- Social Session → Profile Completion: routes new users (evidence: `set-session.php`)
- Sign-in → Supabase REST: queries profiles (evidence: `login.php`)
- Registration → Supabase REST: stores profile (evidence: `register.php`)
- Registration → Email Delivery: sends verification (evidence: `register.php`)
- Social Session → Supabase REST: queries profiles (evidence: `set-session.php`)
- Profile Completion → Supabase REST: updates profile (evidence: `complete-google-profile.php`)
- Sign-in → Session & Roles: uses sessions (evidence: `login.php`)
- Participant Dashboard → Supabase REST: loads dashboard data (evidence: `participant/dashboard.php`)
- Participant Dashboard → Weather Widget: renders weather (evidence: `participant/dashboard.php`)
- Browse Events → Supabase REST: loads events (evidence: `participant/browse-events.php`)
- My Events → Supabase REST: loads registrations (evidence: `participant/my-events.php`)
- Equipment Borrowing → Supabase REST: requests equipment (evidence: `participant/equipment.php`)
- My Borrowings → Supabase REST: loads requests (evidence: `participant/my-borrowings.php`)
- Check-in & Timeout → Supabase REST: records attendance (evidence: `participant/process-check-in.php`)
- Check-in & Timeout → Face Client: checks face (evidence: `participant/process-check-in.php`)
- Face Registration → Supabase REST: loads registration data (evidence: `participant/face-registration.php`)
- Face Client → Face Service: posts recognition request (evidence: `includes/face-service.php`)
- Event QR → Email Delivery: sends QR email (evidence: `participant/my-qr.php`)
- Admin Dashboard → Supabase REST: loads metrics (evidence: `admin/dashboard.php`)
- Admin Dashboard → Weather Widget: renders weather (evidence: `admin/dashboard.php`)
- Event Management → Supabase REST: manages events (evidence: `admin/events.php`)
- Event Management → Email Delivery: sends announcements (evidence: `admin/events.php`)
- Equipment Management → Supabase REST: manages equipment (evidence: `admin/equipment.php`)
- User Management → Supabase REST: manages users (evidence: `admin/users.php`)
- Attendance Logs → Supabase REST: loads attendance (evidence: `admin/attendance-logs.php`)
- Email Delivery → Brevo: sends email (evidence: `includes/mail.php`)
- Face Service → User: processes face data
- Supabase REST → Supabase: REST requests (evidence: `config/database.php`)
