# blackdadgamer/parent architecture

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

- Interactive diagram: https://gitdiagram.com/blackdadgamer/parent
- Repository: https://github.com/blackdadgamer/parent

## Overview

Everest AI’s repository implements an educator-focused web portal: visitors encounter the product landing page, users can sign up or sign in, then manage an account, view a dashboard, and redeem access codes. The broader Chat, QGen, and PPTgen products are linked as external services rather than implemented here. Supabase supplies browser/server authentication and account data; redemption also invokes a database RPC. The graph follows documented imports and visible calls; several page implementations are only sampled, so uncertain runtime links are omitted.

Main entry points: [`lib/supabase/server.ts`](https://github.com/blackdadgamer/parent/blob/main/lib/supabase/server.ts) (Server Supabase client), [`app/page.tsx`](https://github.com/blackdadgamer/parent/blob/main/app/page.tsx) (Landing page), [`lib/supabase/client.ts`](https://github.com/blackdadgamer/parent/blob/main/lib/supabase/client.ts) (Browser Supabase client), [`app/signup/page.tsx`](https://github.com/blackdadgamer/parent/blob/main/app/signup/page.tsx) (Sign up)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_navbar["Site navigation<br/>[Navbar.tsx]"]
  node_legal["Legal pages<br/>[LegalLayout.tsx]"]
end

subgraph group_identity["Identity and access"]
  node_signup["Sign up<br/>[page.tsx]"]
  node_login["Sign in<br/>[page.tsx]"]
  node_callback["Auth callback<br/>[route.ts]"]
  node_logout["Sign out<br/>[route.ts]"]
  node_middleware["Session middleware<br/>[middleware.ts]"]
end

subgraph group_account["Account portal"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_accountpage["Account settings<br/>[page.tsx]"]
  node_accountupdate["Profile update<br/>[route.ts]"]
  node_redeempage["Redeem page<br/>[page.tsx]"]
  node_redeemapi["Redemption API<br/>[route.ts]"]
end

subgraph group_shared["Shared services"]
  node_footer["Site footer<br/>[SiteFooter.tsx]"]
  node_browserclient["Browser Supabase client<br/>[client.ts]"]
  node_serverclient["Server Supabase client<br/>[server.ts]"]
end

node_visitor(("Visitor"))
node_supabase[("Supabase platform")]
node_chat["Everest Chat"]
node_qgen["QGen"]
node_pptgen["PPTgen"]

node_visitor -->|"browses"| node_landing
node_landing -->|"renders"| node_navbar
node_visitor -->|"registers"| node_signup
node_visitor -->|"signs in"| node_login
node_signup -->|"authenticates"| node_browserclient
node_login -->|"authenticates"| node_browserclient
node_callback -->|"exchanges code"| node_serverclient
node_logout -->|"signs out"| node_serverclient
node_dashboard -->|"loads portal data"| node_browserclient
node_accountpage -->|"reads account"| node_serverclient
node_accountupdate -->|"updates profile"| node_serverclient
node_redeempage -->|"uses auth"| node_browserclient
node_redeemapi -->|"checks user"| node_serverclient
node_redeemapi -->|"calls redemption RPC"| node_supabase
node_browserclient -->|"connects"| node_supabase
node_serverclient -->|"connects"| node_supabase
node_landing -->|"links to"| node_chat
node_landing -->|"links to"| node_qgen
node_landing -->|"links to"| node_pptgen
node_dashboard -->|"renders"| node_footer
node_signup -->|"renders"| node_footer
node_legal --> node_supabase

click node_landing "https://github.com/blackdadgamer/parent/blob/main/app/page.tsx"
click node_navbar "https://github.com/blackdadgamer/parent/blob/main/components/Navbar.tsx"
click node_legal "https://github.com/blackdadgamer/parent/blob/main/components/LegalLayout.tsx"
click node_signup "https://github.com/blackdadgamer/parent/blob/main/app/signup/page.tsx"
click node_login "https://github.com/blackdadgamer/parent/blob/main/app/login/page.tsx"
click node_callback "https://github.com/blackdadgamer/parent/blob/main/app/auth/callback/route.ts"
click node_logout "https://github.com/blackdadgamer/parent/blob/main/app/logout/route.ts"
click node_middleware "https://github.com/blackdadgamer/parent/blob/main/middleware.ts"
click node_dashboard "https://github.com/blackdadgamer/parent/blob/main/app/dashboard/page.tsx"
click node_accountpage "https://github.com/blackdadgamer/parent/blob/main/app/account/page.tsx"
click node_accountupdate "https://github.com/blackdadgamer/parent/blob/main/app/api/account/update/route.ts"
click node_redeempage "https://github.com/blackdadgamer/parent/blob/main/app/redeem/page.tsx"
click node_redeemapi "https://github.com/blackdadgamer/parent/blob/main/app/api/redeem/route.ts"
click node_footer "https://github.com/blackdadgamer/parent/blob/main/components/SiteFooter.tsx"
click node_browserclient "https://github.com/blackdadgamer/parent/blob/main/lib/supabase/client.ts"
click node_serverclient "https://github.com/blackdadgamer/parent/blob/main/lib/supabase/server.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_landing,node_navbar,node_legal toneBlue
class node_signup,node_login,node_callback,node_logout,node_middleware,node_supabase toneAmber
class node_dashboard,node_accountpage,node_accountupdate,node_redeempage,node_redeemapi toneMint
class node_footer,node_browserclient,node_serverclient toneRose
class node_visitor,node_chat,node_qgen,node_pptgen toneIndigo
```

## Components

### Public site

- [Landing page](https://github.com/blackdadgamer/parent/blob/main/app/page.tsx): `app/page.tsx`
- [Site navigation](https://github.com/blackdadgamer/parent/blob/main/components/Navbar.tsx): `components/Navbar.tsx`
- [Legal pages](https://github.com/blackdadgamer/parent/blob/main/components/LegalLayout.tsx): `components/LegalLayout.tsx`

### Identity and access

- [Sign up](https://github.com/blackdadgamer/parent/blob/main/app/signup/page.tsx): `app/signup/page.tsx`
- [Sign in](https://github.com/blackdadgamer/parent/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Auth callback](https://github.com/blackdadgamer/parent/blob/main/app/auth/callback/route.ts): `app/auth/callback/route.ts`
- [Sign out](https://github.com/blackdadgamer/parent/blob/main/app/logout/route.ts): `app/logout/route.ts`
- [Session middleware](https://github.com/blackdadgamer/parent/blob/main/middleware.ts): `middleware.ts`

### Account portal

- [Dashboard](https://github.com/blackdadgamer/parent/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Account settings](https://github.com/blackdadgamer/parent/blob/main/app/account/page.tsx): `app/account/page.tsx`
- [Profile update](https://github.com/blackdadgamer/parent/blob/main/app/api/account/update/route.ts): `app/api/account/update/route.ts`
- [Redeem page](https://github.com/blackdadgamer/parent/blob/main/app/redeem/page.tsx): `app/redeem/page.tsx`
- [Redemption API](https://github.com/blackdadgamer/parent/blob/main/app/api/redeem/route.ts): `app/api/redeem/route.ts`

### Shared services

- [Site footer](https://github.com/blackdadgamer/parent/blob/main/components/SiteFooter.tsx): `components/SiteFooter.tsx`
- [Browser Supabase client](https://github.com/blackdadgamer/parent/blob/main/lib/supabase/client.ts): `lib/supabase/client.ts`
- [Server Supabase client](https://github.com/blackdadgamer/parent/blob/main/lib/supabase/server.ts): `lib/supabase/server.ts`

### Other components

- **Visitor**
- **Supabase platform**
- **Everest Chat**
- **QGen**
- **PPTgen**

## Connections

- Visitor → Landing page: browses (evidence: `app/page.tsx`)
- Landing page → Site navigation: renders (evidence: `app/page.tsx`)
- Visitor → Sign up: registers (evidence: `app/signup/page.tsx`)
- Visitor → Sign in: signs in (evidence: `app/login/page.tsx`)
- Sign up → Browser Supabase client: authenticates (evidence: `app/signup/page.tsx`)
- Sign in → Browser Supabase client: authenticates (evidence: `app/login/page.tsx`)
- Auth callback → Server Supabase client: exchanges code (evidence: `app/auth/callback/route.ts`)
- Sign out → Server Supabase client: signs out (evidence: `app/logout/route.ts`)
- Dashboard → Browser Supabase client: loads portal data (evidence: `app/dashboard/page.tsx`)
- Account settings → Server Supabase client: reads account (evidence: `app/account/page.tsx`)
- Profile update → Server Supabase client: updates profile (evidence: `app/api/account/update/route.ts`)
- Redeem page → Browser Supabase client: uses auth (evidence: `app/redeem/page.tsx`)
- Redemption API → Server Supabase client: checks user (evidence: `app/api/redeem/route.ts`)
- Redemption API → Supabase platform: calls redemption RPC (evidence: `app/api/redeem/route.ts`)
- Browser Supabase client → Supabase platform: connects (evidence: `lib/supabase/client.ts`)
- Server Supabase client → Supabase platform: connects (evidence: `lib/supabase/server.ts`)
- Landing page → Everest Chat: links to (evidence: `app/page.tsx`)
- Landing page → QGen: links to (evidence: `app/page.tsx`)
- Landing page → PPTgen: links to (evidence: `app/page.tsx`)
- Dashboard → Site footer: renders (evidence: `app/dashboard/page.tsx`)
- Sign up → Site footer: renders (evidence: `app/signup/page.tsx`)
- Legal pages → Supabase platform
