# nabilsharudin/airost-intern architecture

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

- Interactive diagram: https://gitdiagram.com/nabilsharudin/airost-intern
- Repository: https://github.com/nabilsharudin/airost-intern

## Overview

ClubLedger is a campus-society budget and expense tracker. Members sign in, complete onboarding, then submit claims against projects; treasurers and admins review claims and manage budgets, while members can track spending and update their profiles. The dashboard route authenticates users, loads role-specific data and selects the relevant workspace; project pages provide a detailed ledger and activity view. README-described realtime updates and private receipt storage are included, though their backend implementation is not in the supplied tree. Some component links rely on the SOURCE INDEX or README rather than inspected implementations.

Main entry points: [`app/dashboard/page.tsx`](https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/page.tsx) (Dashboard router), [`lib/supabase/supabaseClient.ts`](https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/supabaseClient.ts) (Browser client), [`lib/supabase/server.ts`](https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/server.ts) (Server client), [`app/dashboard/projects/[id]/page.tsx`](https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/projects/%5Bid%5D/page.tsx) (Project detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_login["Login page<br/>[page.tsx]"]
  node_signup["Signup page<br/>[page.tsx]"]
  node_authform["Auth form<br/>[auth-form.tsx]"]
  node_authshell["Auth shell<br/>[auth-shell.tsx]"]
  node_confirm["Email confirmation<br/>[route.ts]"]
end

subgraph group_account["Member account"]
  node_onboarding["Onboarding route<br/>[page.tsx]"]
  node_onboardflow["Onboarding flow"]
  node_profile["Profile route<br/>[page.tsx]"]
  node_profileform["Profile form<br/>[profile-form.tsx]"]
  node_roles["Role manager"]
end

subgraph group_finance["Claims and budgets"]
  node_dashboard["Dashboard router<br/>[page.tsx]"]
  node_demo["Demo dashboard<br/>[demo-dashboard.tsx]"]
  node_member["Member workspace"]
  node_treasurer["Treasurer workspace"]
  node_admin["Admin workspace"]
  node_approval["Approval workspace"]
  node_claims["Claims tracker<br/>[claims-tracker.tsx]"]
  node_expenseform["Expense form<br/>[expense-form.tsx]"]
  node_ledger["Expense ledger<br/>[expense-ledger.tsx]"]
  node_review["Expense review"]
end

subgraph group_projects["Project management"]
  node_projectpage["Project detail<br/>[page.tsx]"]
  node_projectform["Project form<br/>[project-form.tsx]"]
  node_projectedit["Project editing"]
  node_archive["Project archive"]
  node_activity["Project activity"]
end

subgraph group_platform["Supabase access"]
  node_realtime["Realtime refresh"]
  node_serverclient["Server client<br/>[server.ts]"]
  node_browserclient["Browser client<br/>[supabaseClient.ts]"]
  node_supabase["Supabase"]
  node_database[("ClubLedger data")]
  node_receipts[("Private receipts")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_login
node_visitor -->|"opens"| node_signup
node_login -->|"renders"| node_authform
node_signup -->|"renders"| node_authform
node_login -->|"renders"| node_authshell
node_signup -->|"renders"| node_authshell
node_authform -->|"authenticates"| node_browserclient
node_authform -->|"redirects"| node_dashboard
node_authform -->|"requests confirmation"| node_confirm
node_confirm -->|"uses"| node_serverclient
node_visitor -->|"completes setup"| node_onboarding
node_onboarding -->|"renders"| node_onboardflow
node_onboarding -->|"loads account"| node_serverclient
node_onboardflow -->|"updates account"| node_browserclient
node_visitor -->|"manages profile"| node_profile
node_profile -->|"renders"| node_profileform
node_profile -->|"loads account"| node_serverclient
node_profileform -->|"updates profile"| node_browserclient
node_visitor -->|"opens"| node_dashboard
node_dashboard -->|"loads session and data"| node_serverclient
node_dashboard -->|"selects demo"| node_demo
node_dashboard -->|"dispatches member"| node_member
node_dashboard -->|"dispatches treasurer"| node_treasurer
node_dashboard -->|"dispatches admin"| node_admin
node_dashboard -->|"renders"| node_realtime
node_admin -->|"renders"| node_roles
node_admin -->|"renders"| node_member
node_admin -->|"renders"| node_treasurer
node_member -->|"renders"| node_expenseform
node_treasurer -->|"renders"| node_approval
node_treasurer -->|"renders"| node_claims
node_treasurer -->|"renders"| node_projectform
node_ledger -->|"renders"| node_review
node_projectpage -->|"loads project data"| node_serverclient
node_projectpage -->|"renders"| node_ledger
node_projectpage -->|"renders"| node_activity
node_projectpage -->|"renders"| node_projectedit
node_projectpage -->|"renders"| node_archive
node_projectedit -->|"updates project"| node_browserclient
node_archive -->|"archives project"| node_browserclient
node_roles -->|"changes roles"| node_browserclient
node_serverclient -->|"connects"| node_supabase
node_browserclient -->|"connects"| node_supabase
node_supabase -->|"reads and writes"| node_database
node_supabase -->|"stores and signs"| node_receipts
node_realtime -->|"subscribes"| node_browserclient

click node_login "https://github.com/nabilsharudin/airost-intern/blob/main/app/(auth)/login/page.tsx"
click node_signup "https://github.com/nabilsharudin/airost-intern/blob/main/app/(auth)/signup/page.tsx"
click node_authform "https://github.com/nabilsharudin/airost-intern/blob/main/components/auth/auth-form.tsx"
click node_authshell "https://github.com/nabilsharudin/airost-intern/blob/main/components/auth/auth-shell.tsx"
click node_confirm "https://github.com/nabilsharudin/airost-intern/blob/main/app/auth/confirm/route.ts"
click node_onboarding "https://github.com/nabilsharudin/airost-intern/blob/main/app/onboarding/page.tsx"
click node_onboardflow "https://github.com/nabilsharudin/airost-intern/blob/main/components/onboarding/onboarding-flow.tsx"
click node_profile "https://github.com/nabilsharudin/airost-intern/blob/main/app/profile/page.tsx"
click node_profileform "https://github.com/nabilsharudin/airost-intern/blob/main/components/profile/profile-form.tsx"
click node_dashboard "https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/page.tsx"
click node_demo "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/demo-dashboard.tsx"
click node_member "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/member-dashboard.tsx"
click node_treasurer "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/treasurer-dashboard.tsx"
click node_admin "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/admin-dashboard.tsx"
click node_approval "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/approval-workspace.tsx"
click node_claims "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/claims-tracker.tsx"
click node_expenseform "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-form.tsx"
click node_ledger "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-ledger.tsx"
click node_review "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-review-control.tsx"
click node_projectpage "https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/projects/%5Bid%5D/page.tsx"
click node_projectform "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-form.tsx"
click node_projectedit "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-edit-control.tsx"
click node_archive "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-archive-control.tsx"
click node_activity "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-activity-list.tsx"
click node_roles "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/user-role-manager.tsx"
click node_realtime "https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/realtime-refresh.tsx"
click node_serverclient "https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/server.ts"
click node_browserclient "https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/supabaseClient.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_login,node_signup,node_authform,node_authshell,node_confirm toneBlue
class node_onboarding,node_onboardflow,node_profile,node_profileform,node_roles toneAmber
class node_dashboard,node_demo,node_member,node_treasurer,node_admin,node_approval,node_claims,node_expenseform,node_ledger,node_review toneMint
class node_projectpage,node_projectform,node_projectedit,node_archive,node_activity toneRose
class node_realtime,node_serverclient,node_browserclient,node_supabase,node_database,node_receipts,node_visitor toneIndigo
```

## Components

### Entry and identity

- [Login page](https://github.com/nabilsharudin/airost-intern/blob/main/app/(auth)/login/page.tsx): `app/(auth)/login/page.tsx`
- [Signup page](https://github.com/nabilsharudin/airost-intern/blob/main/app/(auth)/signup/page.tsx): `app/(auth)/signup/page.tsx`
- [Auth form](https://github.com/nabilsharudin/airost-intern/blob/main/components/auth/auth-form.tsx): `components/auth/auth-form.tsx`
- [Auth shell](https://github.com/nabilsharudin/airost-intern/blob/main/components/auth/auth-shell.tsx): `components/auth/auth-shell.tsx`
- [Email confirmation](https://github.com/nabilsharudin/airost-intern/blob/main/app/auth/confirm/route.ts): `app/auth/confirm/route.ts`

### Member account

- [Onboarding route](https://github.com/nabilsharudin/airost-intern/blob/main/app/onboarding/page.tsx): `app/onboarding/page.tsx`
- [Onboarding flow](https://github.com/nabilsharudin/airost-intern/blob/main/components/onboarding/onboarding-flow.tsx): `components/onboarding/onboarding-flow.tsx`
- [Profile route](https://github.com/nabilsharudin/airost-intern/blob/main/app/profile/page.tsx): `app/profile/page.tsx`
- [Profile form](https://github.com/nabilsharudin/airost-intern/blob/main/components/profile/profile-form.tsx): `components/profile/profile-form.tsx`
- [Role manager](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/user-role-manager.tsx): `components/dashboard/user-role-manager.tsx`

### Claims and budgets

- [Dashboard router](https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Demo dashboard](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/demo-dashboard.tsx): `components/dashboard/demo-dashboard.tsx`
- [Member workspace](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/member-dashboard.tsx): `components/dashboard/member-dashboard.tsx`
- [Treasurer workspace](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/treasurer-dashboard.tsx): `components/dashboard/treasurer-dashboard.tsx`
- [Admin workspace](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/admin-dashboard.tsx): `components/dashboard/admin-dashboard.tsx`
- [Approval workspace](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/approval-workspace.tsx): `components/dashboard/approval-workspace.tsx`
- [Claims tracker](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/claims-tracker.tsx): `components/dashboard/claims-tracker.tsx`
- [Expense form](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-form.tsx): `components/dashboard/expense-form.tsx`
- [Expense ledger](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-ledger.tsx): `components/dashboard/expense-ledger.tsx`
- [Expense review](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/expense-review-control.tsx): `components/dashboard/expense-review-control.tsx`

### Project management

- [Project detail](https://github.com/nabilsharudin/airost-intern/blob/main/app/dashboard/projects/%5Bid%5D/page.tsx): `app/dashboard/projects/[id]/page.tsx`
- [Project form](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-form.tsx): `components/dashboard/project-form.tsx`
- [Project editing](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-edit-control.tsx): `components/dashboard/project-edit-control.tsx`
- [Project archive](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-archive-control.tsx): `components/dashboard/project-archive-control.tsx`
- [Project activity](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/project-activity-list.tsx): `components/dashboard/project-activity-list.tsx`

### Supabase access

- [Realtime refresh](https://github.com/nabilsharudin/airost-intern/blob/main/components/dashboard/realtime-refresh.tsx): `components/dashboard/realtime-refresh.tsx`
- [Server client](https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/server.ts): `lib/supabase/server.ts`
- [Browser client](https://github.com/nabilsharudin/airost-intern/blob/main/lib/supabase/supabaseClient.ts): `lib/supabase/supabaseClient.ts`
- **Supabase**
- **ClubLedger data**
- **Private receipts**

### Other components

- **Visitor**

## Connections

- Visitor → Login page: opens (evidence: `README.md`)
- Visitor → Signup page: opens (evidence: `README.md`)
- Login page → Auth form: renders (evidence: `app/(auth)/login/page.tsx`)
- Signup page → Auth form: renders (evidence: `app/(auth)/signup/page.tsx`)
- Login page → Auth shell: renders (evidence: `app/(auth)/login/page.tsx`)
- Signup page → Auth shell: renders (evidence: `app/(auth)/signup/page.tsx`)
- Auth form → Browser client: authenticates (evidence: `components/auth/auth-form.tsx`)
- Auth form → Dashboard router: redirects (evidence: `components/auth/auth-form.tsx`)
- Auth form → Email confirmation: requests confirmation (evidence: `components/auth/auth-form.tsx`)
- Email confirmation → Server client: uses (evidence: `app/auth/confirm/route.ts`)
- Visitor → Onboarding route: completes setup (evidence: `README.md`)
- Onboarding route → Onboarding flow: renders (evidence: `app/onboarding/page.tsx`)
- Onboarding route → Server client: loads account (evidence: `app/onboarding/page.tsx`)
- Onboarding flow → Browser client: updates account (evidence: `components/onboarding/onboarding-flow.tsx`)
- Visitor → Profile route: manages profile (evidence: `README.md`)
- Profile route → Profile form: renders (evidence: `app/profile/page.tsx`)
- Profile route → Server client: loads account (evidence: `app/profile/page.tsx`)
- Profile form → Browser client: updates profile (evidence: `components/profile/profile-form.tsx`)
- Visitor → Dashboard router: opens (evidence: `README.md`)
- Dashboard router → Server client: loads session and data (evidence: `app/dashboard/page.tsx`)
- Dashboard router → Demo dashboard: selects demo (evidence: `app/dashboard/page.tsx`)
- Dashboard router → Member workspace: dispatches member (evidence: `app/dashboard/page.tsx`)
- Dashboard router → Treasurer workspace: dispatches treasurer (evidence: `app/dashboard/page.tsx`)
- Dashboard router → Admin workspace: dispatches admin (evidence: `app/dashboard/page.tsx`)
- Dashboard router → Realtime refresh: renders (evidence: `app/dashboard/page.tsx`)
- Admin workspace → Role manager: renders (evidence: `components/dashboard/admin-dashboard.tsx`)
- Admin workspace → Member workspace: renders (evidence: `components/dashboard/admin-dashboard.tsx`)
- Admin workspace → Treasurer workspace: renders (evidence: `components/dashboard/admin-dashboard.tsx`)
- Member workspace → Expense form: renders (evidence: `components/dashboard/member-dashboard.tsx`)
- Treasurer workspace → Approval workspace: renders (evidence: `components/dashboard/treasurer-dashboard.tsx`)
- Treasurer workspace → Claims tracker: renders (evidence: `components/dashboard/treasurer-dashboard.tsx`)
- Treasurer workspace → Project form: renders (evidence: `components/dashboard/treasurer-dashboard.tsx`)
- Expense ledger → Expense review: renders (evidence: `components/dashboard/expense-ledger.tsx`)
- Project detail → Server client: loads project data (evidence: `app/dashboard/projects/[id]/page.tsx`)
- Project detail → Expense ledger: renders (evidence: `app/dashboard/projects/[id]/page.tsx`)
- Project detail → Project activity: renders (evidence: `app/dashboard/projects/[id]/page.tsx`)
- Project detail → Project editing: renders (evidence: `app/dashboard/projects/[id]/page.tsx`)
- Project detail → Project archive: renders (evidence: `app/dashboard/projects/[id]/page.tsx`)
- Project editing → Browser client: updates project (evidence: `components/dashboard/project-edit-control.tsx`)
- Project archive → Browser client: archives project (evidence: `components/dashboard/project-archive-control.tsx`)
- Role manager → Browser client: changes roles (evidence: `components/dashboard/user-role-manager.tsx`)
- Server client → Supabase: connects (evidence: `lib/supabase/server.ts`)
- Browser client → Supabase: connects (evidence: `lib/supabase/supabaseClient.ts`)
- Supabase → ClubLedger data: reads and writes (evidence: `README.md`)
- Supabase → Private receipts: stores and signs (evidence: `README.md`)
- Realtime refresh → Browser client: subscribes (evidence: `components/dashboard/realtime-refresh.tsx`)
