# florianpetiot/hub-fiches-event architecture

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

- Interactive diagram: https://gitdiagram.com/florianpetiot/hub-fiches-event
- Repository: https://github.com/florianpetiot/hub-fiches-event

## Overview

Hub Fiches Event is an internal event-request and approval platform for Polytech Nantes clubs and administrators. Clubs create or duplicate event forms, save drafts, submit them for review, and exchange messages; administrators review, sign, refuse, or request revisions through a configurable signature workflow. The README also documents calendar views, file uploads, and super-admin management of users and event settings. Route excerpts show Supabase-backed form actions and approvals; other capability links are documented in the README, so unsampled implementation details are not inferred.

Main entry points: [`src/routes/parametres/+page.server.ts`](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/parametres/%2Bpage.server.ts) (Settings actions), [`src/routes/fiche-event/[id]/edition/+page.svelte`](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/edition/%2Bpage.svelte) (Event editor), [`src/routes/dashboard/+page.server.ts`](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/dashboard/%2Bpage.server.ts) (Event dashboard), [`src/routes/login/+page.svelte`](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/login/%2Bpage.svelte) (Sign in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_login["Sign in<br/>[+page.svelte]"]
  node_auth["Auth callbacks<br/>[+server.ts]"]
  node_guard["Auth guard<br/>[+layout.server.ts]"]
end

subgraph group_event["Event requests"]
  node_dashboard["Event dashboard<br/>[+page.server.ts]"]
  node_editor["Event editor<br/>[+page.svelte]"]
  node_validation["Form validation<br/>[validateFiche.ts]"]
  node_calendar["Event calendar<br/>[+page.server.ts]"]
  node_upload["Document uploads<br/>[FileUpload.svelte]"]
  node_pdf["PDF viewer<br/>[PdfViewer.svelte]"]
end

subgraph group_review["Review and communication"]
  node_summary["Review and signatures<br/>[+page.server.ts]"]
  node_messages["Event messaging<br/>[+page.server.ts]"]
end

subgraph group_admin["Administration"]
  node_settings["Settings actions<br/>[+page.server.ts]"]
  node_clubs["Club management"]
  node_admins["Admin management"]
  node_eventsettings["Event configuration"]
  node_workflow["Signature workflow<br/>[+page.server.ts]"]
end

subgraph group_shared["Shared services"]
  node_supabase[("Supabase platform")]
  node_types["Database types<br/>[database.types.ts]"]
  node_app_types["Domain types<br/>[app.types.ts]"]
  node_offline["Offline fallback<br/>[service-worker.ts]"]
end

node_club(("Club user"))
node_adminuser(("Administrator"))

node_club -->|"signs in"| node_login
node_adminuser -->|"signs in"| node_login
node_login -.->|"authenticates"| node_auth
node_auth -.->|"uses auth"| node_supabase
node_guard -.->|"loads profile"| node_supabase
node_dashboard -->|"queries forms"| node_supabase
node_dashboard -->|"opens form"| node_editor
node_club -->|"manages requests"| node_dashboard
node_editor -.->|"validates submit"| node_validation
node_validation -.->|"reports errors"| node_editor
node_editor -.->|"saves form"| node_supabase
node_calendar -->|"queries events"| node_supabase
node_club -->|"views events"| node_calendar
node_adminuser -->|"views events"| node_calendar
node_summary -->|"updates signatures"| node_supabase
node_adminuser -->|"reviews requests"| node_summary
node_club -->|"chats on request"| node_messages
node_adminuser -->|"chats on request"| node_messages
node_messages -.->|"stores messages"| node_supabase
node_upload -->|"stores documents"| node_supabase
node_upload -->|"renders viewer"| node_pdf
node_pdf -->|"creates signed URL"| node_supabase
node_settings -->|"manages settings"| node_supabase
node_settings -.->|"renders controls"| node_clubs
node_settings -.->|"renders controls"| node_admins
node_settings -.->|"renders controls"| node_eventsettings
node_settings -->|"configures steps"| node_workflow
node_adminuser -->|"administers platform"| node_settings
node_types -->|"types domain data"| node_app_types
node_offline -.-> node_supabase

click node_login "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/login/%2Bpage.svelte"
click node_auth "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/auth/callback/%2Bserver.ts"
click node_guard "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/%2Blayout.server.ts"
click node_dashboard "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/dashboard/%2Bpage.server.ts"
click node_editor "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/edition/%2Bpage.svelte"
click node_validation "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/validateFiche.ts"
click node_calendar "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/calendrier/%2Bpage.server.ts"
click node_summary "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/resume/%2Bpage.server.ts"
click node_messages "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/messagerie/%2Bpage.server.ts"
click node_upload "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/FileUpload.svelte"
click node_pdf "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/PdfViewer.svelte"
click node_settings "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/parametres/%2Bpage.server.ts"
click node_clubs "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/ClubsSettings.svelte"
click node_admins "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/AdminsSettings.svelte"
click node_eventsettings "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/EventSettings.svelte"
click node_workflow "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/parametres/%2Bpage.server.ts"
click node_types "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/types/database.types.ts"
click node_app_types "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/types/app.types.ts"
click node_offline "https://github.com/florianpetiot/hub-fiches-event/blob/main/src/service-worker.ts"

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_auth,node_guard,node_club toneBlue
class node_dashboard,node_editor,node_validation,node_calendar,node_upload,node_pdf toneAmber
class node_summary,node_messages toneMint
class node_settings,node_clubs,node_admins,node_eventsettings,node_workflow toneRose
class node_supabase,node_types,node_app_types,node_offline,node_adminuser toneIndigo
```

## Components

### Access and navigation

- [Sign in](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/login/%2Bpage.svelte): `src/routes/login/+page.svelte`
- [Auth callbacks](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/auth/callback/%2Bserver.ts): `src/routes/auth/callback/+server.ts`
- [Auth guard](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/%2Blayout.server.ts): `src/routes/+layout.server.ts`

### Event requests

- [Event dashboard](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/dashboard/%2Bpage.server.ts): `src/routes/dashboard/+page.server.ts`
- [Event editor](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/edition/%2Bpage.svelte): `src/routes/fiche-event/[id]/edition/+page.svelte`
- [Form validation](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/validateFiche.ts): `src/lib/validateFiche.ts`
- [Event calendar](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/calendrier/%2Bpage.server.ts): `src/routes/calendrier/+page.server.ts`
- [Document uploads](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/FileUpload.svelte): `src/lib/components/FileUpload.svelte`
- [PDF viewer](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/PdfViewer.svelte): `src/lib/components/PdfViewer.svelte`

### Review and communication

- [Review and signatures](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/resume/%2Bpage.server.ts): `src/routes/fiche-event/[id]/resume/+page.server.ts`
- [Event messaging](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/fiche-event/%5Bid%5D/messagerie/%2Bpage.server.ts): `src/routes/fiche-event/[id]/messagerie/+page.server.ts`

### Administration

- [Settings actions](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/parametres/%2Bpage.server.ts): `src/routes/parametres/+page.server.ts`
- [Club management](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/ClubsSettings.svelte): `src/lib/components/settings/ClubsSettings.svelte`
- [Admin management](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/AdminsSettings.svelte): `src/lib/components/settings/AdminsSettings.svelte`
- [Event configuration](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/components/settings/EventSettings.svelte): `src/lib/components/settings/EventSettings.svelte`
- [Signature workflow](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/routes/parametres/%2Bpage.server.ts): `src/routes/parametres/+page.server.ts`

### Shared services

- **Supabase platform**
- [Database types](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/types/database.types.ts): `src/lib/types/database.types.ts`
- [Domain types](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/lib/types/app.types.ts): `src/lib/types/app.types.ts`
- [Offline fallback](https://github.com/florianpetiot/hub-fiches-event/blob/main/src/service-worker.ts): `src/service-worker.ts`

### Other components

- **Club user**
- **Administrator**

## Connections

- Club user → Sign in: signs in
- Administrator → Sign in: signs in
- Sign in → Auth callbacks: authenticates
- Auth callbacks → Supabase platform: uses auth
- Auth guard → Supabase platform: loads profile
- Event dashboard → Supabase platform: queries forms (evidence: `src/routes/dashboard/+page.server.ts`)
- Event dashboard → Event editor: opens form (evidence: `src/routes/dashboard/+page.server.ts`)
- Club user → Event dashboard: manages requests
- Event editor → Form validation: validates submit
- Form validation → Event editor: reports errors
- Event editor → Supabase platform: saves form
- Event calendar → Supabase platform: queries events (evidence: `src/routes/calendrier/+page.server.ts`)
- Club user → Event calendar: views events
- Administrator → Event calendar: views events
- Review and signatures → Supabase platform: updates signatures (evidence: `src/routes/fiche-event/[id]/resume/+page.server.ts`)
- Administrator → Review and signatures: reviews requests
- Club user → Event messaging: chats on request
- Administrator → Event messaging: chats on request
- Event messaging → Supabase platform: stores messages
- Document uploads → Supabase platform: stores documents (evidence: `src/lib/components/FileUpload.svelte`)
- Document uploads → PDF viewer: renders viewer (evidence: `src/lib/components/FileUpload.svelte`)
- PDF viewer → Supabase platform: creates signed URL (evidence: `src/lib/components/PdfViewer.svelte`)
- Settings actions → Supabase platform: manages settings (evidence: `src/routes/parametres/+page.server.ts`)
- Settings actions → Club management: renders controls
- Settings actions → Admin management: renders controls
- Settings actions → Event configuration: renders controls
- Settings actions → Signature workflow: configures steps (evidence: `src/routes/parametres/+page.server.ts`)
- Administrator → Settings actions: administers platform
- Database types → Domain types: types domain data (evidence: `src/lib/types/app.types.ts`)
- Offline fallback → Supabase platform
