# hanzkassik/fila-digital-halloween architecture

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

- Interactive diagram: https://gitdiagram.com/hanzkassik/fila-digital-halloween
- Repository: https://github.com/hanzkassik/fila-digital-halloween

## Overview

Fila Digital Halloween is an event check-in and queue-management web app. Participants open an event’s public page, identify themselves by name and phone, join or look up a queue entry, then track their place and turn. Administrators authenticate and, after approval, manage events, queues, payments, and users; users can also maintain their profiles. The graph combines the documented capabilities with source-index and excerpt evidence. Some backend wiring is documented but not shown in sampled implementation, so uncertain links are omitted.

Main entry points: [`src/pages/admin/AdminDashboardPage.tsx`](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/AdminDashboardPage.tsx) (Event and queue management), [`src/App.tsx`](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/App.tsx) (Route and access control), [`src/pages/public/PublicEventPage.tsx`](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/public/PublicEventPage.tsx) (Public event and queue), [`src/lib/supabase.ts`](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/lib/supabase.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route and access control<br/>[App.tsx]"]
  node_public_event["Public event and queue"]
  node_phone_field["Phone input"]
  node_turnstile["CAPTCHA widget"]
end

subgraph group_identity["Identity and accounts"]
  node_auth["Sign-in and registration<br/>[AuthPage.tsx]"]
  node_approval["Approval screen<br/>[ApprovalPage.tsx]"]
  node_profile["Account profile<br/>[ProfilePage.tsx]"]
end

subgraph group_operations["Event operations"]
  node_admin_dashboard["Event and queue management"]
  node_add_queue["Add queue entry"]
  node_create_user["Create user"]
  node_users["User administration<br/>[UsersPage.tsx]"]
  node_event_qr["Event QR code<br/>[EventQrModal.tsx]"]
end

subgraph group_backend["Supabase backend"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_database[("Profiles events and queue")]
  node_public_signup["Public queue signup<br/>[index.ts]"]
  node_admin_create_fn["Admin user creation<br/>[index.ts]"]
  node_admin_update_fn["Admin user updates<br/>[index.ts]"]
end

subgraph group_integrations["External services"]
  node_supabase_auth["Supabase Auth"]
  node_turnstile_service["Cloudflare Turnstile"]
  node_storage[("Supabase Storage")]
  node_whatsapp["WhatsApp contact"]
end

node_participant(("Participant"))
node_administrator(("Administrator"))

node_participant -->|"opens event"| node_app
node_administrator -->|"opens panel"| node_app
node_app -->|"routes to"| node_public_event
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_approval
node_app -->|"routes to"| node_admin_dashboard
node_app -->|"renders"| node_profile
node_auth -->|"authenticates with"| node_supabase_client
node_profile -->|"updates account"| node_supabase_client
node_admin_dashboard -->|"manages events and queue"| node_supabase_client
node_admin_dashboard -->|"renders"| node_users
node_admin_dashboard -->|"opens"| node_add_queue
node_admin_dashboard -->|"opens"| node_create_user
node_admin_dashboard -->|"opens"| node_event_qr
node_add_queue -->|"adds queue entry"| node_supabase_client
node_users -->|"reads user data"| node_supabase_client
node_public_event -->|"renders"| node_phone_field
node_auth -->|"renders"| node_phone_field
node_profile -->|"renders"| node_phone_field
node_public_event -->|"renders"| node_turnstile
node_public_event -->|"submits signup"| node_public_signup
node_public_signup -->|"creates queue entry"| node_database
node_public_event -->|"reads event and queue"| node_database
node_turnstile -.->|"verifies challenge"| node_turnstile_service
node_admin_create_fn -.->|"creates account"| node_supabase_auth
node_admin_update_fn -.->|"updates account"| node_supabase_auth
node_admin_dashboard -.->|"uploads event images"| node_storage
node_admin_dashboard -.->|"contacts participant"| node_whatsapp

click node_app "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/App.tsx"
click node_public_event "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/public/PublicEventPage.tsx"
click node_phone_field "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/components/PhoneNumberField.tsx"
click node_turnstile "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/components/TurnstileWidget.tsx"
click node_auth "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/auth/AuthPage.tsx"
click node_approval "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/approval/ApprovalPage.tsx"
click node_profile "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/profile/ProfilePage.tsx"
click node_admin_dashboard "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/AdminDashboardPage.tsx"
click node_add_queue "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/AddToQueueModal.tsx"
click node_create_user "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/AdminCreateUserModal.tsx"
click node_users "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/UsersPage.tsx"
click node_event_qr "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/EventQrModal.tsx"
click node_supabase_client "https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/lib/supabase.ts"
click node_database "https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/migrations/20261029003226_create_database.sql"
click node_public_signup "https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/public-queue-signup/index.ts"
click node_admin_create_fn "https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/admin-create-user/index.ts"
click node_admin_update_fn "https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/admin-update-user/index.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_app,node_public_event,node_phone_field,node_turnstile toneBlue
class node_auth,node_approval,node_profile toneAmber
class node_admin_dashboard,node_add_queue,node_create_user,node_users,node_event_qr toneMint
class node_supabase_client,node_database,node_public_signup,node_admin_create_fn,node_admin_update_fn toneRose
class node_supabase_auth,node_turnstile_service,node_storage,node_whatsapp,node_participant,node_administrator toneIndigo
```

## Components

### Web application

- [Route and access control](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/App.tsx): `src/App.tsx`
- [Public event and queue](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/public/PublicEventPage.tsx): `src/pages/public/PublicEventPage.tsx`
- [Phone input](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/components/PhoneNumberField.tsx): `src/components/PhoneNumberField.tsx`
- [CAPTCHA widget](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/components/TurnstileWidget.tsx): `src/components/TurnstileWidget.tsx`

### Identity and accounts

- [Sign-in and registration](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/auth/AuthPage.tsx): `src/pages/auth/AuthPage.tsx`
- [Approval screen](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/approval/ApprovalPage.tsx): `src/pages/approval/ApprovalPage.tsx`
- [Account profile](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/profile/ProfilePage.tsx): `src/pages/profile/ProfilePage.tsx`

### Event operations

- [Event and queue management](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/AdminDashboardPage.tsx): `src/pages/admin/AdminDashboardPage.tsx`
- [Add queue entry](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/AddToQueueModal.tsx): `src/pages/admin/components/AddToQueueModal.tsx`
- [Create user](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/AdminCreateUserModal.tsx): `src/pages/admin/components/AdminCreateUserModal.tsx`
- [User administration](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/UsersPage.tsx): `src/pages/admin/UsersPage.tsx`
- [Event QR code](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/pages/admin/components/EventQrModal.tsx): `src/pages/admin/components/EventQrModal.tsx`

### Supabase backend

- [Supabase client](https://github.com/hanzkassik/fila-digital-halloween/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Profiles events and queue](https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/migrations/20261029003226_create_database.sql): `supabase/migrations/20261029003226_create_database.sql`
- [Public queue signup](https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/public-queue-signup/index.ts): `supabase/functions/public-queue-signup/index.ts`
- [Admin user creation](https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/admin-create-user/index.ts): `supabase/functions/admin-create-user/index.ts`
- [Admin user updates](https://github.com/hanzkassik/fila-digital-halloween/blob/main/supabase/functions/admin-update-user/index.ts): `supabase/functions/admin-update-user/index.ts`

### External services

- **Supabase Auth**
- **Cloudflare Turnstile**
- **Supabase Storage**
- **WhatsApp contact**

### Other components

- **Participant**
- **Administrator**

## Connections

- Participant → Route and access control: opens event (evidence: `README.md`)
- Administrator → Route and access control: opens panel (evidence: `README.md`)
- Route and access control → Public event and queue: routes to (evidence: `src/App.tsx`)
- Route and access control → Sign-in and registration: routes to (evidence: `src/App.tsx`)
- Route and access control → Approval screen: routes to (evidence: `src/App.tsx`)
- Route and access control → Event and queue management: routes to (evidence: `src/App.tsx`)
- Route and access control → Account profile: renders (evidence: `src/App.tsx`)
- Sign-in and registration → Supabase client: authenticates with (evidence: `src/pages/auth/AuthPage.tsx`)
- Account profile → Supabase client: updates account (evidence: `src/pages/profile/ProfilePage.tsx`)
- Event and queue management → Supabase client: manages events and queue (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Event and queue management → User administration: renders (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Event and queue management → Add queue entry: opens (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Event and queue management → Create user: opens (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Event and queue management → Event QR code: opens (evidence: `src/pages/admin/AdminDashboardPage.tsx`)
- Add queue entry → Supabase client: adds queue entry (evidence: `src/pages/admin/components/AddToQueueModal.tsx`)
- User administration → Supabase client: reads user data (evidence: `src/pages/admin/UsersPage.tsx`)
- Public event and queue → Phone input: renders (evidence: `src/pages/public/PublicEventPage.tsx`)
- Sign-in and registration → Phone input: renders (evidence: `src/pages/auth/AuthPage.tsx`)
- Account profile → Phone input: renders (evidence: `src/pages/profile/ProfilePage.tsx`)
- Public event and queue → CAPTCHA widget: renders (evidence: `src/pages/public/PublicEventPage.tsx`)
- Public event and queue → Public queue signup: submits signup (evidence: `README.md`)
- Public queue signup → Profiles events and queue: creates queue entry (evidence: `README.md`)
- Public event and queue → Profiles events and queue: reads event and queue (evidence: `README.md`)
- CAPTCHA widget → Cloudflare Turnstile: verifies challenge (evidence: `README.md`)
- Admin user creation → Supabase Auth: creates account
- Admin user updates → Supabase Auth: updates account
- Event and queue management → Supabase Storage: uploads event images (evidence: `README.md`)
- Event and queue management → WhatsApp contact: contacts participant (evidence: `README.md`)
