# joannacodes/giftroll architecture

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

- Interactive diagram: https://gitdiagram.com/joannacodes/giftroll
- Repository: https://github.com/joannacodes/giftroll

## Overview

GiftRoll is an accountless gift-exchange website. Hosts create an exchange and share its invite link and creator code; participants join by invite, then receive private reveal links. A creator verifies access, closes sign-ups by drawing assignments, and participants use their reveal links to see recipients. The controller excerpt shows database reads/writes and view selection; the README identifies hosted Supabase Postgres. The graph preserves the documented capabilities, but does not infer unsampled integration details.

Main entry points: [`routes/web.php`](https://github.com/joannacodes/giftroll/blob/main/routes/web.php) (Web Routes), [`resources/views/giftroll`](https://github.com/joannacodes/giftroll/tree/main/resources/views/giftroll) (Exchange Pages), [`app/Http/Controllers/ExchangeController.php`](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php) (Create Exchange), [`public/index.php`](https://github.com/joannacodes/giftroll/blob/main/public/index.php) (Laravel Front Controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Entry"]
  node_front["Laravel Front Controller<br/>[index.php]"]
  node_bootstrap["Application Bootstrap<br/>[app.php]"]
  node_routes["Web Routes<br/>[web.php]"]
end

subgraph group_exchange["Exchange Workflow"]
  node_create["Create Exchange"]
  node_join["Join Exchange"]
  node_creator["Creator Access"]
  node_draw["Assignment Draw"]
  node_reveal["Recipient Reveal"]
  node_exchangeviews["Exchange Pages"]
end

subgraph group_persistence["Persistence"]
  node_database[("Supabase Postgres")]
  node_schema["Exchange Schema"]
end

node_host(("Host"))
node_participant(("Participant"))

node_front -->|"loads app"| node_bootstrap
node_bootstrap -->|"registers routes"| node_routes
node_host -.->|"sends requests"| node_front
node_participant -.->|"sends requests"| node_front
node_routes -->|"dispatches"| node_create
node_routes -->|"dispatches"| node_join
node_routes -->|"dispatches"| node_creator
node_routes -->|"dispatches"| node_draw
node_routes -->|"dispatches"| node_reveal
node_create -->|"writes exchange"| node_database
node_join -->|"reads and writes"| node_database
node_creator -->|"reads exchange"| node_database
node_draw -->|"assigns recipients"| node_database
node_reveal -->|"reads assignment"| node_database
node_create -->|"renders pages"| node_exchangeviews
node_join -->|"renders pages"| node_exchangeviews
node_creator -->|"renders pages"| node_exchangeviews
node_draw -->|"renders manager"| node_exchangeviews
node_reveal -->|"renders reveal"| node_exchangeviews
node_schema -.->|"defines tables"| node_database

click node_front "https://github.com/joannacodes/giftroll/blob/main/public/index.php"
click node_bootstrap "https://github.com/joannacodes/giftroll/blob/main/bootstrap/app.php"
click node_routes "https://github.com/joannacodes/giftroll/blob/main/routes/web.php"
click node_create "https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php"
click node_join "https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php"
click node_creator "https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php"
click node_draw "https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php"
click node_reveal "https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php"
click node_exchangeviews "https://github.com/joannacodes/giftroll/tree/main/resources/views/giftroll"
click node_schema "https://github.com/joannacodes/giftroll/blob/main/database/migrations/2026_11_21_000003_create_giftroll_exchanges.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_front,node_bootstrap,node_routes toneBlue
class node_create,node_join,node_creator,node_draw,node_reveal,node_exchangeviews toneAmber
class node_database,node_schema toneMint
class node_host,node_participant toneIndigo
```

## Components

### Web Entry

- [Laravel Front Controller](https://github.com/joannacodes/giftroll/blob/main/public/index.php): `public/index.php`
- [Application Bootstrap](https://github.com/joannacodes/giftroll/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Web Routes](https://github.com/joannacodes/giftroll/blob/main/routes/web.php): `routes/web.php`

### Exchange Workflow

- [Create Exchange](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php): `app/Http/Controllers/ExchangeController.php`
- [Join Exchange](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php): `app/Http/Controllers/ExchangeController.php`
- [Creator Access](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php): `app/Http/Controllers/ExchangeController.php`
- [Assignment Draw](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php): `app/Http/Controllers/ExchangeController.php`
- [Recipient Reveal](https://github.com/joannacodes/giftroll/blob/main/app/Http/Controllers/ExchangeController.php): `app/Http/Controllers/ExchangeController.php`
- [Exchange Pages](https://github.com/joannacodes/giftroll/tree/main/resources/views/giftroll): `resources/views/giftroll`

### Persistence

- **Supabase Postgres**
- [Exchange Schema](https://github.com/joannacodes/giftroll/blob/main/database/migrations/2026_11_21_000003_create_giftroll_exchanges.php): `database/migrations/2026_11_21_000003_create_giftroll_exchanges.php`

### Other components

- **Host**
- **Participant**

## Connections

- Laravel Front Controller → Application Bootstrap: loads app (evidence: `public/index.php`)
- Application Bootstrap → Web Routes: registers routes (evidence: `bootstrap/app.php`)
- Host → Laravel Front Controller: sends requests
- Participant → Laravel Front Controller: sends requests
- Web Routes → Create Exchange: dispatches (evidence: `routes/web.php`)
- Web Routes → Join Exchange: dispatches (evidence: `routes/web.php`)
- Web Routes → Creator Access: dispatches (evidence: `routes/web.php`)
- Web Routes → Assignment Draw: dispatches (evidence: `routes/web.php`)
- Web Routes → Recipient Reveal: dispatches (evidence: `routes/web.php`)
- Create Exchange → Supabase Postgres: writes exchange (evidence: `app/Http/Controllers/ExchangeController.php`)
- Join Exchange → Supabase Postgres: reads and writes (evidence: `app/Http/Controllers/ExchangeController.php`)
- Creator Access → Supabase Postgres: reads exchange (evidence: `app/Http/Controllers/ExchangeController.php`)
- Assignment Draw → Supabase Postgres: assigns recipients (evidence: `app/Http/Controllers/ExchangeController.php`)
- Recipient Reveal → Supabase Postgres: reads assignment (evidence: `app/Http/Controllers/ExchangeController.php`)
- Create Exchange → Exchange Pages: renders pages (evidence: `app/Http/Controllers/ExchangeController.php`)
- Join Exchange → Exchange Pages: renders pages (evidence: `app/Http/Controllers/ExchangeController.php`)
- Creator Access → Exchange Pages: renders pages (evidence: `app/Http/Controllers/ExchangeController.php`)
- Assignment Draw → Exchange Pages: renders manager (evidence: `app/Http/Controllers/ExchangeController.php`)
- Recipient Reveal → Exchange Pages: renders reveal (evidence: `app/Http/Controllers/ExchangeController.php`)
- Exchange Schema → Supabase Postgres: defines tables
