# poqopo/poom architecture

> Architecture diagram of the GitHub repository poqopo/poom, 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/poqopo/poom
- Repository: https://github.com/poqopo/poom

## Overview

Poom is a React application for sign-in, profile onboarding, and a personalized home screen, with a Supabase-backed health check. The main flow routes a signed-in user through profile completion before home; query hooks and API modules provide the internal data layer. The README documents the health-check invocation, while several backend and database details are represented only by their tree paths, so uncertain connections are omitted.

Main entry points: [`src/App.tsx`](https://github.com/poqopo/poom/blob/main/src/App.tsx) (Route and access gates), [`src/lib/supabase.ts`](https://github.com/poqopo/poom/blob/main/src/lib/supabase.ts) (Supabase client), [`src/app/Providers.tsx`](https://github.com/poqopo/poom/blob/main/src/app/Providers.tsx) (Global providers), [`src/features/profile/NicknameOnboardingPage.tsx`](https://github.com/poqopo/poom/blob/main/src/features/profile/NicknameOnboardingPage.tsx) (Nickname onboarding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_providers["Global providers<br/>[Providers.tsx]"]
  node_routes["Route and access gates<br/>[App.tsx]"]
  node_brand["Brand identity<br/>[Brand.tsx]"]
end

subgraph group_identity["Identity and onboarding"]
  node_authprovider["Session provider<br/>[AuthProvider.tsx]"]
  node_authcontext["Auth context<br/>[authContext.ts]"]
  node_authhook["Auth hook<br/>[useAuth.ts]"]
  node_login["Login screen<br/>[LoginPage.tsx]"]
  node_onboarding["Nickname onboarding"]
  node_profilehook["Profile query<br/>[useProfile.ts]"]
  node_profileapi["Profile API<br/>[api.ts]"]
end

subgraph group_home["Home experience"]
  node_homeview["Home screen<br/>[HomePage.tsx]"]
  node_summaryhook["Home summary query<br/>[useHomeSummary.ts]"]
  node_summaryapi["Home summary API<br/>[api.ts]"]
end

subgraph group_health["Health check"]
  node_healthview["Health status card"]
  node_healthhook["Health check query<br/>[useHealthCheck.ts]"]
  node_healthfunction["Health-check function<br/>[index.ts]"]
end

subgraph group_platform["Data platform"]
  node_queryclient["Query client<br/>[queryClient.ts]"]
  node_supabaseclient["Supabase client<br/>[supabase.ts]"]
  node_summaryfunction["Home-summary function<br/>[index.ts]"]
  node_profileschema[("Profile schema and onboarding migrations")]
end

node_user(("User"))
node_supabase[("Supabase services")]

node_user -->|"opens app"| node_entry
node_entry -->|"mounts providers"| node_providers
node_providers -->|"wraps with"| node_authprovider
node_providers -->|"provides cache"| node_queryclient
node_providers -->|"wraps routes"| node_routes
node_routes -->|"checks session"| node_authhook
node_routes -->|"renders login"| node_login
node_routes -->|"loads profile"| node_profilehook
node_routes -->|"renders onboarding"| node_onboarding
node_routes -->|"renders home"| node_homeview
node_authprovider -->|"provides state"| node_authcontext
node_authhook -->|"reads context"| node_authcontext
node_authprovider -->|"uses client"| node_supabaseclient
node_login -->|"uses client"| node_supabaseclient
node_onboarding -->|"reads user"| node_authhook
node_onboarding -->|"updates profile"| node_profileapi
node_profilehook -->|"fetches profile"| node_profileapi
node_profileapi -->|"queries profile"| node_supabaseclient
node_profileapi -.->|"uses profile records"| node_profileschema
node_homeview -->|"reads user"| node_authhook
node_homeview -->|"loads summary"| node_summaryhook
node_summaryhook -->|"fetches summary"| node_summaryapi
node_summaryapi -->|"uses client"| node_supabaseclient
node_login -->|"renders brand"| node_brand
node_onboarding -->|"renders brand"| node_brand
node_homeview -->|"renders brand"| node_brand
node_healthview -->|"reads status"| node_healthhook
node_healthhook -->|"invokes function"| node_supabaseclient
node_healthhook -->|"calls function"| node_healthfunction
node_supabaseclient -.->|"connects to"| node_supabase
node_user -.->|"views status"| node_healthview

click node_entry "https://github.com/poqopo/poom/blob/main/src/main.tsx"
click node_providers "https://github.com/poqopo/poom/blob/main/src/app/Providers.tsx"
click node_routes "https://github.com/poqopo/poom/blob/main/src/App.tsx"
click node_brand "https://github.com/poqopo/poom/blob/main/src/components/Brand.tsx"
click node_authprovider "https://github.com/poqopo/poom/blob/main/src/features/auth/AuthProvider.tsx"
click node_authcontext "https://github.com/poqopo/poom/blob/main/src/features/auth/authContext.ts"
click node_authhook "https://github.com/poqopo/poom/blob/main/src/features/auth/useAuth.ts"
click node_login "https://github.com/poqopo/poom/blob/main/src/features/auth/LoginPage.tsx"
click node_onboarding "https://github.com/poqopo/poom/blob/main/src/features/profile/NicknameOnboardingPage.tsx"
click node_profilehook "https://github.com/poqopo/poom/blob/main/src/features/profile/useProfile.ts"
click node_profileapi "https://github.com/poqopo/poom/blob/main/src/features/profile/api.ts"
click node_homeview "https://github.com/poqopo/poom/blob/main/src/features/home/HomePage.tsx"
click node_summaryhook "https://github.com/poqopo/poom/blob/main/src/features/home/useHomeSummary.ts"
click node_summaryapi "https://github.com/poqopo/poom/blob/main/src/features/home/api.ts"
click node_healthview "https://github.com/poqopo/poom/blob/main/src/features/health-check/HealthCheckCard.tsx"
click node_healthhook "https://github.com/poqopo/poom/blob/main/src/features/health-check/useHealthCheck.ts"
click node_healthfunction "https://github.com/poqopo/poom/blob/main/supabase/functions/health-check/index.ts"
click node_queryclient "https://github.com/poqopo/poom/blob/main/src/lib/queryClient.ts"
click node_supabaseclient "https://github.com/poqopo/poom/blob/main/src/lib/supabase.ts"
click node_summaryfunction "https://github.com/poqopo/poom/blob/main/supabase/functions/home-summary/index.ts"
click node_profileschema "https://github.com/poqopo/poom/tree/main/supabase/migrations"

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_entry,node_providers,node_routes,node_brand,node_user toneBlue
class node_authprovider,node_authcontext,node_authhook,node_login,node_onboarding,node_profilehook,node_profileapi,node_supabase toneAmber
class node_homeview,node_summaryhook,node_summaryapi toneMint
class node_healthview,node_healthhook,node_healthfunction toneRose
class node_queryclient,node_supabaseclient,node_summaryfunction,node_profileschema toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/poqopo/poom/blob/main/src/main.tsx): `src/main.tsx`
- [Global providers](https://github.com/poqopo/poom/blob/main/src/app/Providers.tsx): `src/app/Providers.tsx`
- [Route and access gates](https://github.com/poqopo/poom/blob/main/src/App.tsx): `src/App.tsx`
- [Brand identity](https://github.com/poqopo/poom/blob/main/src/components/Brand.tsx): `src/components/Brand.tsx`

### Identity and onboarding

- [Session provider](https://github.com/poqopo/poom/blob/main/src/features/auth/AuthProvider.tsx): `src/features/auth/AuthProvider.tsx`
- [Auth context](https://github.com/poqopo/poom/blob/main/src/features/auth/authContext.ts): `src/features/auth/authContext.ts`
- [Auth hook](https://github.com/poqopo/poom/blob/main/src/features/auth/useAuth.ts): `src/features/auth/useAuth.ts`
- [Login screen](https://github.com/poqopo/poom/blob/main/src/features/auth/LoginPage.tsx): `src/features/auth/LoginPage.tsx`
- [Nickname onboarding](https://github.com/poqopo/poom/blob/main/src/features/profile/NicknameOnboardingPage.tsx): `src/features/profile/NicknameOnboardingPage.tsx`
- [Profile query](https://github.com/poqopo/poom/blob/main/src/features/profile/useProfile.ts): `src/features/profile/useProfile.ts`
- [Profile API](https://github.com/poqopo/poom/blob/main/src/features/profile/api.ts): `src/features/profile/api.ts`

### Home experience

- [Home screen](https://github.com/poqopo/poom/blob/main/src/features/home/HomePage.tsx): `src/features/home/HomePage.tsx`
- [Home summary query](https://github.com/poqopo/poom/blob/main/src/features/home/useHomeSummary.ts): `src/features/home/useHomeSummary.ts`
- [Home summary API](https://github.com/poqopo/poom/blob/main/src/features/home/api.ts): `src/features/home/api.ts`

### Health check

- [Health status card](https://github.com/poqopo/poom/blob/main/src/features/health-check/HealthCheckCard.tsx): `src/features/health-check/HealthCheckCard.tsx`
- [Health check query](https://github.com/poqopo/poom/blob/main/src/features/health-check/useHealthCheck.ts): `src/features/health-check/useHealthCheck.ts`
- [Health-check function](https://github.com/poqopo/poom/blob/main/supabase/functions/health-check/index.ts): `supabase/functions/health-check/index.ts`

### Data platform

- [Query client](https://github.com/poqopo/poom/blob/main/src/lib/queryClient.ts): `src/lib/queryClient.ts`
- [Supabase client](https://github.com/poqopo/poom/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Home-summary function](https://github.com/poqopo/poom/blob/main/supabase/functions/home-summary/index.ts): `supabase/functions/home-summary/index.ts`
- [Profile schema and onboarding migrations](https://github.com/poqopo/poom/tree/main/supabase/migrations): `supabase/migrations`

### Other components

- **User**
- **Supabase services**

## Connections

- User → React entry: opens app (evidence: `README.md`)
- React entry → Global providers: mounts providers (evidence: `src/main.tsx`)
- Global providers → Session provider: wraps with (evidence: `src/app/Providers.tsx`)
- Global providers → Query client: provides cache (evidence: `src/app/Providers.tsx`)
- Global providers → Route and access gates: wraps routes (evidence: `src/app/Providers.tsx`)
- Route and access gates → Auth hook: checks session (evidence: `src/App.tsx`)
- Route and access gates → Login screen: renders login (evidence: `src/App.tsx`)
- Route and access gates → Profile query: loads profile (evidence: `src/App.tsx`)
- Route and access gates → Nickname onboarding: renders onboarding (evidence: `src/App.tsx`)
- Route and access gates → Home screen: renders home (evidence: `src/App.tsx`)
- Session provider → Auth context: provides state (evidence: `src/features/auth/AuthProvider.tsx`)
- Auth hook → Auth context: reads context (evidence: `src/features/auth/useAuth.ts`)
- Session provider → Supabase client: uses client (evidence: `src/features/auth/AuthProvider.tsx`)
- Login screen → Supabase client: uses client (evidence: `src/features/auth/LoginPage.tsx`)
- Nickname onboarding → Auth hook: reads user (evidence: `src/features/profile/NicknameOnboardingPage.tsx`)
- Nickname onboarding → Profile API: updates profile (evidence: `src/features/profile/NicknameOnboardingPage.tsx`)
- Profile query → Profile API: fetches profile (evidence: `src/features/profile/useProfile.ts`)
- Profile API → Supabase client: queries profile (evidence: `src/features/profile/api.ts`)
- Profile API → Profile schema and onboarding migrations: uses profile records
- Home screen → Auth hook: reads user (evidence: `src/features/home/HomePage.tsx`)
- Home screen → Home summary query: loads summary (evidence: `src/features/home/HomePage.tsx`)
- Home summary query → Home summary API: fetches summary (evidence: `src/features/home/useHomeSummary.ts`)
- Home summary API → Supabase client: uses client (evidence: `src/features/home/api.ts`)
- Login screen → Brand identity: renders brand (evidence: `src/features/auth/LoginPage.tsx`)
- Nickname onboarding → Brand identity: renders brand (evidence: `src/features/profile/NicknameOnboardingPage.tsx`)
- Home screen → Brand identity: renders brand (evidence: `src/features/home/HomePage.tsx`)
- Health status card → Health check query: reads status (evidence: `src/features/health-check/HealthCheckCard.tsx`)
- Health check query → Supabase client: invokes function (evidence: `src/features/health-check/useHealthCheck.ts`)
- Health check query → Health-check function: calls function (evidence: `src/features/health-check/useHealthCheck.ts`)
- Supabase client → Supabase services: connects to
- User → Health status card: views status
