# dushu2006/dropzone architecture

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

- Interactive diagram: https://gitdiagram.com/dushu2006/dropzone
- Repository: https://github.com/dushu2006/dropzone

## Overview

DropZone is an event-scoped community and operations app: members authenticate, load trusted event memberships, enter a role-appropriate workspace, and use event workflows backed by Supabase operations. Its major branches cover community posts and safety, private messaging, staff and roster management, zones, attachments, and notifications. The sampled API invokes database RPCs; documented policies and storage behavior come from the README. Hosted integration is explicitly unverified, so external service links describe the documented design, not a verified deployment.

Main entry points: [`src/phase2/Workbench.tsx`](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Workbench.tsx) (Workflow hub), [`src/phase2/api.ts`](https://github.com/dushu2006/dropzone/blob/main/src/phase2/api.ts) (Event RPC client), [`src/phase2/Feed.tsx`](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Feed.tsx) (Feed and threads), [`src/App.tsx`](https://github.com/dushu2006/dropzone/blob/main/src/App.tsx) (App routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and access"]
  node_app["App routing<br/>[App.tsx]"]
  node_auth["Auth pages<br/>[AuthPages.tsx]"]
  node_authstate["Auth session<br/>[AuthProvider.tsx]"]
  node_access["Membership access<br/>[AccessProvider.tsx]"]
end

subgraph group_workspace["Event workspace"]
  node_workspaces["Event workspaces<br/>[Workspaces.tsx]"]
  node_workbench["Workflow hub<br/>[Workbench.tsx]"]
  node_prototype["Development preview"]
end

subgraph group_community["Community workflows"]
  node_feed["Feed and threads<br/>[Feed.tsx]"]
  node_safety["Reports and safety<br/>[Safety.tsx]"]
  node_messaging["Private messaging<br/>[Messaging.tsx]"]
  node_templates["Post templates<br/>[templates.ts]"]
  node_attachments["Private attachments<br/>[Attachments.tsx]"]
end

subgraph group_operations["Staff and event operations"]
  node_staff["Staff management<br/>[Staff.tsx]"]
  node_roster["Roster imports<br/>[roster.ts]"]
  node_zones["Interactive zones<br/>[ZoneMap.tsx]"]
  node_location["Location checks<br/>[location.ts]"]
  node_notifications["In-app notifications<br/>[Workbench.tsx]"]
end

subgraph group_services["Supabase services"]
  node_api["Event RPC client<br/>[api.ts]"]
  node_database[("Postgres and PostGIS")]
  node_storage[("Private Storage")]
  node_verify["Attachment verification<br/>[index.ts]"]
  node_image["Image signature check<br/>[image.ts]"]
  node_maintenance["File cleanup<br/>[index.ts]"]
end

node_member(("Event member"))

node_member -->|"opens app"| node_app
node_app -->|"routes auth"| node_auth
node_app -->|"provides session"| node_authstate
node_app -->|"guards private pages"| node_access
node_auth -->|"uses auth state"| node_authstate
node_access -->|"reads session"| node_authstate
node_access -->|"loads trusted access"| node_database
node_workspaces -->|"opens event tools"| node_workbench
node_workbench -->|"renders feed"| node_feed
node_workbench -->|"renders conversations"| node_messaging
node_workbench -->|"renders safety tools"| node_safety
node_workbench -->|"renders staff tools"| node_staff
node_workbench -->|"renders zones"| node_zones
node_feed -->|"reads and commands"| node_api
node_feed -->|"validates templates"| node_templates
node_feed -->|"uses attachments"| node_attachments
node_feed -->|"shows revision history"| node_safety
node_messaging -->|"reads and commands"| node_api
node_safety -->|"reads and commands"| node_api
node_staff -->|"reads and commands"| node_api
node_staff -->|"parses roster files"| node_roster
node_zones -->|"reads and commands"| node_api
node_zones -->|"checks device location"| node_location
node_api -->|"calls event RPCs"| node_database
node_database -->|"stores private images"| node_storage
node_attachments -->|"uses event operations"| node_api
node_attachments -->|"requests verification"| node_verify
node_verify -->|"checks image signature"| node_image
node_verify -->|"verifies stored image"| node_storage
node_maintenance -->|"cleans expired files"| node_storage
node_workbench -->|"provides notifications"| node_notifications
node_member -.->|"opts into preview"| node_prototype

click node_app "https://github.com/dushu2006/dropzone/blob/main/src/App.tsx"
click node_auth "https://github.com/dushu2006/dropzone/blob/main/src/auth/AuthPages.tsx"
click node_authstate "https://github.com/dushu2006/dropzone/blob/main/src/auth/AuthProvider.tsx"
click node_access "https://github.com/dushu2006/dropzone/blob/main/src/phase1/AccessProvider.tsx"
click node_workspaces "https://github.com/dushu2006/dropzone/blob/main/src/phase1/Workspaces.tsx"
click node_workbench "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Workbench.tsx"
click node_feed "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Feed.tsx"
click node_safety "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Safety.tsx"
click node_messaging "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Messaging.tsx"
click node_staff "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Staff.tsx"
click node_roster "https://github.com/dushu2006/dropzone/blob/main/src/phase2/roster.ts"
click node_zones "https://github.com/dushu2006/dropzone/blob/main/src/phase2/ZoneMap.tsx"
click node_location "https://github.com/dushu2006/dropzone/blob/main/src/phase2/location.ts"
click node_templates "https://github.com/dushu2006/dropzone/blob/main/src/phase2/templates.ts"
click node_attachments "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Attachments.tsx"
click node_api "https://github.com/dushu2006/dropzone/blob/main/src/phase2/api.ts"
click node_database "https://github.com/dushu2006/dropzone/tree/main/supabase/migrations"
click node_storage "https://github.com/dushu2006/dropzone/tree/main/supabase/migrations"
click node_verify "https://github.com/dushu2006/dropzone/blob/main/supabase/functions/verify-attachment/index.ts"
click node_image "https://github.com/dushu2006/dropzone/blob/main/supabase/functions/_shared/image.ts"
click node_maintenance "https://github.com/dushu2006/dropzone/blob/main/supabase/functions/maintenance/index.ts"
click node_notifications "https://github.com/dushu2006/dropzone/blob/main/src/phase2/Workbench.tsx"
click node_prototype "https://github.com/dushu2006/dropzone/blob/main/src/PrototypePreview.tsx"

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_auth,node_authstate,node_access toneBlue
class node_workspaces,node_workbench,node_prototype toneAmber
class node_feed,node_safety,node_messaging,node_templates,node_attachments toneMint
class node_staff,node_roster,node_zones,node_location,node_notifications toneRose
class node_api,node_database,node_storage,node_verify,node_image,node_maintenance,node_member toneIndigo
```

## Components

### Identity and access

- [App routing](https://github.com/dushu2006/dropzone/blob/main/src/App.tsx): `src/App.tsx`
- [Auth pages](https://github.com/dushu2006/dropzone/blob/main/src/auth/AuthPages.tsx): `src/auth/AuthPages.tsx`
- [Auth session](https://github.com/dushu2006/dropzone/blob/main/src/auth/AuthProvider.tsx): `src/auth/AuthProvider.tsx`
- [Membership access](https://github.com/dushu2006/dropzone/blob/main/src/phase1/AccessProvider.tsx): `src/phase1/AccessProvider.tsx`

### Event workspace

- [Event workspaces](https://github.com/dushu2006/dropzone/blob/main/src/phase1/Workspaces.tsx): `src/phase1/Workspaces.tsx`
- [Workflow hub](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Workbench.tsx): `src/phase2/Workbench.tsx`
- [Development preview](https://github.com/dushu2006/dropzone/blob/main/src/PrototypePreview.tsx): `src/PrototypePreview.tsx`

### Community workflows

- [Feed and threads](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Feed.tsx): `src/phase2/Feed.tsx`
- [Reports and safety](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Safety.tsx): `src/phase2/Safety.tsx`
- [Private messaging](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Messaging.tsx): `src/phase2/Messaging.tsx`
- [Post templates](https://github.com/dushu2006/dropzone/blob/main/src/phase2/templates.ts): `src/phase2/templates.ts`
- [Private attachments](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Attachments.tsx): `src/phase2/Attachments.tsx`

### Staff and event operations

- [Staff management](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Staff.tsx): `src/phase2/Staff.tsx`
- [Roster imports](https://github.com/dushu2006/dropzone/blob/main/src/phase2/roster.ts): `src/phase2/roster.ts`
- [Interactive zones](https://github.com/dushu2006/dropzone/blob/main/src/phase2/ZoneMap.tsx): `src/phase2/ZoneMap.tsx`
- [Location checks](https://github.com/dushu2006/dropzone/blob/main/src/phase2/location.ts): `src/phase2/location.ts`
- [In-app notifications](https://github.com/dushu2006/dropzone/blob/main/src/phase2/Workbench.tsx): `src/phase2/Workbench.tsx`

### Supabase services

- [Event RPC client](https://github.com/dushu2006/dropzone/blob/main/src/phase2/api.ts): `src/phase2/api.ts`
- [Postgres and PostGIS](https://github.com/dushu2006/dropzone/tree/main/supabase/migrations): `supabase/migrations`
- [Private Storage](https://github.com/dushu2006/dropzone/tree/main/supabase/migrations): `supabase/migrations`
- [Attachment verification](https://github.com/dushu2006/dropzone/blob/main/supabase/functions/verify-attachment/index.ts): `supabase/functions/verify-attachment/index.ts`
- [Image signature check](https://github.com/dushu2006/dropzone/blob/main/supabase/functions/_shared/image.ts): `supabase/functions/_shared/image.ts`
- [File cleanup](https://github.com/dushu2006/dropzone/blob/main/supabase/functions/maintenance/index.ts): `supabase/functions/maintenance/index.ts`

### Other components

- **Event member**

## Connections

- Event member → App routing: opens app (evidence: `src/App.tsx`)
- App routing → Auth pages: routes auth (evidence: `src/App.tsx`)
- App routing → Auth session: provides session (evidence: `src/App.tsx`)
- App routing → Membership access: guards private pages (evidence: `src/App.tsx`)
- Auth pages → Auth session: uses auth state (evidence: `src/auth/AuthPages.tsx`)
- Membership access → Auth session: reads session (evidence: `src/phase1/AccessProvider.tsx`)
- Membership access → Postgres and PostGIS: loads trusted access (evidence: `README.md`)
- Event workspaces → Workflow hub: opens event tools (evidence: `src/phase1/Workspaces.tsx`)
- Workflow hub → Feed and threads: renders feed (evidence: `README.md`)
- Workflow hub → Private messaging: renders conversations (evidence: `README.md`)
- Workflow hub → Reports and safety: renders safety tools (evidence: `README.md`)
- Workflow hub → Staff management: renders staff tools (evidence: `README.md`)
- Workflow hub → Interactive zones: renders zones (evidence: `README.md`)
- Feed and threads → Event RPC client: reads and commands (evidence: `src/phase2/Feed.tsx`)
- Feed and threads → Post templates: validates templates (evidence: `src/phase2/Feed.tsx`)
- Feed and threads → Private attachments: uses attachments (evidence: `src/phase2/Feed.tsx`)
- Feed and threads → Reports and safety: shows revision history (evidence: `src/phase2/Feed.tsx`)
- Private messaging → Event RPC client: reads and commands (evidence: `README.md`)
- Reports and safety → Event RPC client: reads and commands (evidence: `README.md`)
- Staff management → Event RPC client: reads and commands (evidence: `README.md`)
- Staff management → Roster imports: parses roster files (evidence: `src/phase2/Staff.tsx`)
- Interactive zones → Event RPC client: reads and commands (evidence: `README.md`)
- Interactive zones → Location checks: checks device location (evidence: `README.md`)
- Event RPC client → Postgres and PostGIS: calls event RPCs (evidence: `src/phase2/api.ts`)
- Postgres and PostGIS → Private Storage: stores private images (evidence: `README.md`)
- Private attachments → Event RPC client: uses event operations (evidence: `src/phase2/Attachments.tsx`)
- Private attachments → Attachment verification: requests verification (evidence: `src/phase2/Attachments.tsx`)
- Attachment verification → Image signature check: checks image signature (evidence: `supabase/functions/verify-attachment/index.ts`)
- Attachment verification → Private Storage: verifies stored image (evidence: `README.md`)
- File cleanup → Private Storage: cleans expired files (evidence: `README.md`)
- Workflow hub → In-app notifications: provides notifications (evidence: `README.md`)
- Event member → Development preview: opts into preview (evidence: `README.md`)
