# shanker-debug/campaign-charcoal-glow architecture

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

- Interactive diagram: https://gitdiagram.com/shanker-debug/campaign-charcoal-glow
- Repository: https://github.com/shanker-debug/campaign-charcoal-glow

## Overview

Launchly is a crowdfunding website for discovering causes, creating campaigns, and tracking or moderating activity. Visitors browse featured campaigns, explore listings, and open campaign details; registered users can create campaigns and use role-aware dashboards. Supabase backs campaign data and authentication, while shared campaign utilities assemble campaign totals for display. The index supports the route and component relationships shown; several route bodies were not sampled, so their detailed behavior is summarized cautiously.

Main entry points: [`src/integrations/supabase/client.ts`](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/components/launchly/auth.tsx`](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/auth.tsx) (Auth context), [`src/lib/launchly.ts`](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/lib/launchly.ts) (Campaign queries), [`src/routes/__root.tsx`](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/__root.tsx) (App root)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_router["Router setup<br/>[router.tsx]"]
  node_route_tree["Route registry<br/>[routeTree.gen.ts]"]
  node_root["App root<br/>[__root.tsx]"]
  node_shell["Site shell<br/>[shell.tsx]"]
end

subgraph group_campaigns["Campaign journeys"]
  node_home["Home page<br/>[index.tsx]"]
  node_explore["Campaign discovery<br/>[explore.tsx]"]
  node_campaign_detail["Campaign details<br/>[campaign.$id.tsx]"]
  node_campaign_card["Campaign card<br/>[campaign-card.tsx]"]
  node_campaign_data["Campaign queries<br/>[launchly.ts]"]
  node_create["Campaign creation<br/>[create.tsx]"]
  node_about["About and guidance<br/>[about.tsx]"]
  node_how_it_works["How it works<br/>[how-it-works.tsx]"]
end

subgraph group_identity["Identity and backend"]
  node_login["Login<br/>[login.tsx]"]
  node_register["Registration<br/>[register.tsx]"]
  node_auth["Auth context<br/>[auth.tsx]"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_preview_storage["Preview auth storage"]
end

subgraph group_workspace["User workspace"]
  node_dashboard["Role dashboards<br/>[dashboard.tsx]"]
end

node_visitor(("Visitor / user"))
node_supabase[("Supabase backend")]

node_visitor -->|"opens app"| node_router
node_router -->|"uses routes"| node_route_tree
node_route_tree -->|"registers root"| node_root
node_root -->|"renders shell"| node_shell
node_root -->|"provides auth"| node_auth
node_visitor -->|"browses"| node_home
node_home -->|"loads campaigns"| node_campaign_data
node_home -->|"renders cards"| node_campaign_card
node_explore -->|"loads campaigns"| node_campaign_data
node_explore -->|"renders cards"| node_campaign_card
node_campaign_detail -->|"uses campaign data"| node_campaign_data
node_campaign_detail -->|"renders card"| node_campaign_card
node_create -->|"checks identity"| node_auth
node_create -->|"submits campaign"| node_supabase_client
node_login -->|"uses auth context"| node_auth
node_register -->|"uses auth context"| node_auth
node_auth -->|"loads session and profile"| node_supabase_client
node_supabase_client -->|"configures storage"| node_preview_storage
node_campaign_data -->|"queries campaigns"| node_supabase_client
node_supabase_client -->|"connects backend"| node_supabase
node_dashboard -->|"checks user profile"| node_auth
node_dashboard -->|"loads workspace data"| node_supabase_client
node_visitor -->|"opens workspace"| node_dashboard
node_visitor -->|"discovers causes"| node_explore
node_visitor -->|"starts campaign"| node_create
node_visitor -->|"signs in"| node_login
node_visitor -->|"creates account"| node_register

click node_router "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/router.tsx"
click node_route_tree "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routeTree.gen.ts"
click node_root "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/__root.tsx"
click node_shell "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/shell.tsx"
click node_home "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/index.tsx"
click node_explore "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/explore.tsx"
click node_campaign_detail "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/campaign.%24id.tsx"
click node_campaign_card "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/campaign-card.tsx"
click node_campaign_data "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/lib/launchly.ts"
click node_create "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/create.tsx"
click node_about "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/about.tsx"
click node_how_it_works "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/how-it-works.tsx"
click node_login "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/login.tsx"
click node_register "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/register.tsx"
click node_auth "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/auth.tsx"
click node_supabase_client "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/integrations/supabase/client.ts"
click node_preview_storage "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/integrations/supabase/previewAuthStorage.ts"
click node_dashboard "https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/dashboard.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_router,node_route_tree,node_root,node_shell,node_visitor toneBlue
class node_home,node_explore,node_campaign_detail,node_campaign_card,node_campaign_data,node_create,node_about,node_how_it_works,node_supabase toneAmber
class node_login,node_register,node_auth,node_supabase_client,node_preview_storage toneMint
class node_dashboard toneRose
```

## Components

### Web experience

- [Router setup](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/router.tsx): `src/router.tsx`
- [Route registry](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routeTree.gen.ts): `src/routeTree.gen.ts`
- [App root](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/__root.tsx): `src/routes/__root.tsx`
- [Site shell](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/shell.tsx): `src/components/launchly/shell.tsx`

### Campaign journeys

- [Home page](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Campaign discovery](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/explore.tsx): `src/routes/explore.tsx`
- [Campaign details](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/campaign.%24id.tsx): `src/routes/campaign.$id.tsx`
- [Campaign card](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/campaign-card.tsx): `src/components/launchly/campaign-card.tsx`
- [Campaign queries](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/lib/launchly.ts): `src/lib/launchly.ts`
- [Campaign creation](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/create.tsx): `src/routes/create.tsx`
- [About and guidance](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/about.tsx): `src/routes/about.tsx`
- [How it works](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/how-it-works.tsx): `src/routes/how-it-works.tsx`

### Identity and backend

- [Login](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/login.tsx): `src/routes/login.tsx`
- [Registration](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/register.tsx): `src/routes/register.tsx`
- [Auth context](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/components/launchly/auth.tsx): `src/components/launchly/auth.tsx`
- [Supabase client](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Preview auth storage](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/integrations/supabase/previewAuthStorage.ts): `src/integrations/supabase/previewAuthStorage.ts`

### User workspace

- [Role dashboards](https://github.com/shanker-debug/campaign-charcoal-glow/blob/main/src/routes/dashboard.tsx): `src/routes/dashboard.tsx`

### Other components

- **Visitor / user**
- **Supabase backend**

## Connections

- Visitor / user → Router setup: opens app
- Router setup → Route registry: uses routes (evidence: `src/router.tsx`)
- Route registry → App root: registers root (evidence: `src/routeTree.gen.ts`)
- App root → Site shell: renders shell (evidence: `src/routes/__root.tsx`)
- App root → Auth context: provides auth (evidence: `src/routes/__root.tsx`)
- Visitor / user → Home page: browses
- Home page → Campaign queries: loads campaigns (evidence: `src/routes/index.tsx`)
- Home page → Campaign card: renders cards (evidence: `src/routes/index.tsx`)
- Campaign discovery → Campaign queries: loads campaigns (evidence: `src/routes/explore.tsx`)
- Campaign discovery → Campaign card: renders cards (evidence: `src/routes/explore.tsx`)
- Campaign details → Campaign queries: uses campaign data (evidence: `src/routes/campaign.$id.tsx`)
- Campaign details → Campaign card: renders card (evidence: `src/routes/campaign.$id.tsx`)
- Campaign creation → Auth context: checks identity (evidence: `src/routes/create.tsx`)
- Campaign creation → Supabase client: submits campaign (evidence: `src/routes/create.tsx`)
- Login → Auth context: uses auth context (evidence: `src/routes/login.tsx`)
- Registration → Auth context: uses auth context (evidence: `src/routes/register.tsx`)
- Auth context → Supabase client: loads session and profile (evidence: `src/components/launchly/auth.tsx`)
- Supabase client → Preview auth storage: configures storage (evidence: `src/integrations/supabase/client.ts`)
- Campaign queries → Supabase client: queries campaigns (evidence: `src/lib/launchly.ts`)
- Supabase client → Supabase backend: connects backend (evidence: `src/integrations/supabase/client.ts`)
- Role dashboards → Auth context: checks user profile (evidence: `src/routes/dashboard.tsx`)
- Role dashboards → Supabase client: loads workspace data (evidence: `src/routes/dashboard.tsx`)
- Visitor / user → Role dashboards: opens workspace
- Visitor / user → Campaign discovery: discovers causes
- Visitor / user → Campaign creation: starts campaign
- Visitor / user → Login: signs in
- Visitor / user → Registration: creates account
