# chinmayikc/vertex architecture

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

## Overview

Vertex is a technical-club website with public event and member discovery, authenticated member access, and an internal Smart India Hackathon workspace. The main user journey starts at the public site, which links into events, projects, membership, and SIH pages; authenticated staff can manage club and hackathon operations. Server functions handle privileged actions and use Supabase for authentication and data. The graph reflects explicit route references and sampled calls; some public-page and SIH capabilities are documented or listed but their implementation details were not sampled.

Main entry points: [`src/lib/hackathon.functions.ts`](https://github.com/chinmayikc/vertex/blob/main/src/lib/hackathon.functions.ts) (SIH operations), [`src/components/SiteChrome.tsx`](https://github.com/chinmayikc/vertex/blob/main/src/components/SiteChrome.tsx) (Site navigation), [`src/routes/_authenticated/admin.tsx`](https://github.com/chinmayikc/vertex/blob/main/src/routes/_authenticated/admin.tsx) (Admin console), [`src/routes/index.tsx`](https://github.com/chinmayikc/vertex/blob/main/src/routes/index.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public club site"]
  node_home["Home page<br/>[index.tsx]"]
  node_public_pages["Club pages"]
  node_club_data["Club data<br/>[team.ts]"]
  node_member_search["Member search<br/>[MemberSearch.tsx]"]
end

subgraph group_sih["SIH workspace"]
  node_sih_page["SIH overview"]
  node_sih_team["SIH teams"]
  node_sih_join["SIH joining"]
  node_sih_results["SIH results"]
  node_sih_rules["SIH rules<br/>[sih-2026.ts]"]
  node_sih_result_data["Result data"]
end

subgraph group_admin["Authenticated operations"]
  node_admin_page["Admin console<br/>[admin.tsx]"]
  node_member_account["Member account<br/>[me.tsx]"]
end

subgraph group_backend["Server and data"]
  node_sih_functions["SIH operations"]
  node_sih_domain["Team operations"]
  node_admin_functions["Club operations<br/>[admin.functions.ts]"]
  node_staff_functions["Staff operations<br/>[staff.functions.ts]"]
  node_roles["Role checks<br/>[roles.server.ts]"]
  node_schemas["Input validation<br/>[schemas.ts]"]
  node_auth_middleware["Auth middleware<br/>[auth-middleware.ts]"]
  node_supabase_client["Browser client<br/>[client.ts]"]
  node_supabase_admin["Admin client<br/>[client.server.ts]"]
end

subgraph group_presentation["Shared interface"]
  node_site_chrome["Site navigation<br/>[SiteChrome.tsx]"]
  node_atmosphere["Page atmosphere<br/>[Atmosphere.tsx]"]
  node_ambient["Ambient background"]
  node_motion["Motion kit<br/>[motion-kit.tsx]"]
  node_photo_upload["Photo upload<br/>[PhotoUpload.tsx]"]
end

node_visitor(("Visitor"))
node_supabase[("Supabase")]

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_site_chrome
node_home -->|"renders"| node_atmosphere
node_home -->|"uses"| node_motion
node_home -->|"links to"| node_public_pages
node_member_search -->|"filters"| node_club_data
node_member_search -.->|"supports"| node_public_pages
node_atmosphere -->|"uses"| node_ambient
node_site_chrome -->|"uses"| node_motion
node_site_chrome -->|"checks session"| node_supabase_client
node_sih_page -->|"renders"| node_site_chrome
node_sih_page -->|"reads"| node_sih_rules
node_sih_page -->|"calls"| node_sih_functions
node_sih_page -.->|"links to"| node_sih_team
node_sih_team -->|"reads"| node_sih_rules
node_sih_team -->|"calls"| node_sih_functions
node_sih_join -.->|"uses"| node_sih_functions
node_sih_results -.->|"reads"| node_sih_result_data
node_sih_functions -->|"requires auth"| node_auth_middleware
node_sih_functions -->|"validates"| node_schemas
node_sih_functions -->|"checks role"| node_roles
node_sih_functions -->|"delegates to"| node_sih_domain
node_sih_domain -->|"uses"| node_supabase_admin
node_admin_page -->|"renders"| node_site_chrome
node_admin_page -->|"renders"| node_photo_upload
node_admin_page -->|"calls"| node_admin_functions
node_admin_page -->|"calls"| node_sih_functions
node_admin_page -->|"calls"| node_staff_functions
node_member_account -->|"renders"| node_site_chrome
node_member_account -->|"renders"| node_photo_upload
node_admin_functions -->|"requires auth"| node_auth_middleware
node_admin_functions -->|"validates"| node_schemas
node_admin_functions -->|"checks role"| node_roles
node_admin_functions -->|"reads and writes"| node_supabase
node_staff_functions -->|"requires auth"| node_auth_middleware
node_staff_functions -->|"checks role"| node_roles
node_auth_middleware -->|"verifies claims"| node_supabase
node_supabase_client -->|"connects"| node_supabase
node_supabase_admin -->|"connects"| node_supabase
node_public_pages -.->|"includes"| node_member_search

click node_home "https://github.com/chinmayikc/vertex/blob/main/src/routes/index.tsx"
click node_public_pages "https://github.com/chinmayikc/vertex/tree/main/src/routes"
click node_club_data "https://github.com/chinmayikc/vertex/blob/main/src/data/team.ts"
click node_member_search "https://github.com/chinmayikc/vertex/blob/main/src/components/MemberSearch.tsx"
click node_sih_page "https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.index.tsx"
click node_sih_team "https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.team.tsx"
click node_sih_join "https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.join.tsx"
click node_sih_results "https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.results.tsx"
click node_sih_rules "https://github.com/chinmayikc/vertex/blob/main/src/data/sih-2026.ts"
click node_sih_result_data "https://github.com/chinmayikc/vertex/blob/main/src/data/sih-2026-results.ts"
click node_sih_functions "https://github.com/chinmayikc/vertex/blob/main/src/lib/hackathon.functions.ts"
click node_sih_domain "https://github.com/chinmayikc/vertex/blob/main/src/lib/hackathon.server.ts"
click node_admin_page "https://github.com/chinmayikc/vertex/blob/main/src/routes/_authenticated/admin.tsx"
click node_member_account "https://github.com/chinmayikc/vertex/blob/main/src/routes/_authenticated/me.tsx"
click node_admin_functions "https://github.com/chinmayikc/vertex/blob/main/src/lib/admin.functions.ts"
click node_staff_functions "https://github.com/chinmayikc/vertex/blob/main/src/lib/staff.functions.ts"
click node_roles "https://github.com/chinmayikc/vertex/blob/main/src/lib/roles.server.ts"
click node_schemas "https://github.com/chinmayikc/vertex/blob/main/src/lib/schemas.ts"
click node_auth_middleware "https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/auth-middleware.ts"
click node_supabase_client "https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/client.ts"
click node_supabase_admin "https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/client.server.ts"
click node_site_chrome "https://github.com/chinmayikc/vertex/blob/main/src/components/SiteChrome.tsx"
click node_atmosphere "https://github.com/chinmayikc/vertex/blob/main/src/components/Atmosphere.tsx"
click node_ambient "https://github.com/chinmayikc/vertex/blob/main/src/components/AmbientBackground.tsx"
click node_motion "https://github.com/chinmayikc/vertex/blob/main/src/components/motion-kit.tsx"
click node_photo_upload "https://github.com/chinmayikc/vertex/blob/main/src/components/PhotoUpload.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_home,node_public_pages,node_club_data,node_member_search toneBlue
class node_sih_page,node_sih_team,node_sih_join,node_sih_results,node_sih_rules,node_sih_result_data,node_supabase toneAmber
class node_admin_page,node_member_account toneMint
class node_sih_functions,node_sih_domain,node_admin_functions,node_staff_functions,node_roles,node_schemas,node_auth_middleware,node_supabase_client,node_supabase_admin toneRose
class node_site_chrome,node_atmosphere,node_ambient,node_motion,node_photo_upload,node_visitor toneIndigo
```

## Components

### Public club site

- [Home page](https://github.com/chinmayikc/vertex/blob/main/src/routes/index.tsx): `src/routes/index.tsx`
- [Club pages](https://github.com/chinmayikc/vertex/tree/main/src/routes): `src/routes`
- [Club data](https://github.com/chinmayikc/vertex/blob/main/src/data/team.ts): `src/data/team.ts`
- [Member search](https://github.com/chinmayikc/vertex/blob/main/src/components/MemberSearch.tsx): `src/components/MemberSearch.tsx`

### SIH workspace

- [SIH overview](https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.index.tsx): `src/routes/events.sih-internal-hackathon.index.tsx`
- [SIH teams](https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.team.tsx): `src/routes/events.sih-internal-hackathon.team.tsx`
- [SIH joining](https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.join.tsx): `src/routes/events.sih-internal-hackathon.join.tsx`
- [SIH results](https://github.com/chinmayikc/vertex/blob/main/src/routes/events.sih-internal-hackathon.results.tsx): `src/routes/events.sih-internal-hackathon.results.tsx`
- [SIH rules](https://github.com/chinmayikc/vertex/blob/main/src/data/sih-2026.ts): `src/data/sih-2026.ts`
- [Result data](https://github.com/chinmayikc/vertex/blob/main/src/data/sih-2026-results.ts): `src/data/sih-2026-results.ts`

### Authenticated operations

- [Admin console](https://github.com/chinmayikc/vertex/blob/main/src/routes/_authenticated/admin.tsx): `src/routes/_authenticated/admin.tsx`
- [Member account](https://github.com/chinmayikc/vertex/blob/main/src/routes/_authenticated/me.tsx): `src/routes/_authenticated/me.tsx`

### Server and data

- [SIH operations](https://github.com/chinmayikc/vertex/blob/main/src/lib/hackathon.functions.ts): `src/lib/hackathon.functions.ts`
- [Team operations](https://github.com/chinmayikc/vertex/blob/main/src/lib/hackathon.server.ts): `src/lib/hackathon.server.ts`
- [Club operations](https://github.com/chinmayikc/vertex/blob/main/src/lib/admin.functions.ts): `src/lib/admin.functions.ts`
- [Staff operations](https://github.com/chinmayikc/vertex/blob/main/src/lib/staff.functions.ts): `src/lib/staff.functions.ts`
- [Role checks](https://github.com/chinmayikc/vertex/blob/main/src/lib/roles.server.ts): `src/lib/roles.server.ts`
- [Input validation](https://github.com/chinmayikc/vertex/blob/main/src/lib/schemas.ts): `src/lib/schemas.ts`
- [Auth middleware](https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/auth-middleware.ts): `src/integrations/supabase/auth-middleware.ts`
- [Browser client](https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- [Admin client](https://github.com/chinmayikc/vertex/blob/main/src/integrations/supabase/client.server.ts): `src/integrations/supabase/client.server.ts`

### Shared interface

- [Site navigation](https://github.com/chinmayikc/vertex/blob/main/src/components/SiteChrome.tsx): `src/components/SiteChrome.tsx`
- [Page atmosphere](https://github.com/chinmayikc/vertex/blob/main/src/components/Atmosphere.tsx): `src/components/Atmosphere.tsx`
- [Ambient background](https://github.com/chinmayikc/vertex/blob/main/src/components/AmbientBackground.tsx): `src/components/AmbientBackground.tsx`
- [Motion kit](https://github.com/chinmayikc/vertex/blob/main/src/components/motion-kit.tsx): `src/components/motion-kit.tsx`
- [Photo upload](https://github.com/chinmayikc/vertex/blob/main/src/components/PhotoUpload.tsx): `src/components/PhotoUpload.tsx`

### Other components

- **Visitor**
- **Supabase**

## Connections

- Visitor → Home page: opens
- Home page → Site navigation: renders (evidence: `src/routes/index.tsx`)
- Home page → Page atmosphere: renders (evidence: `src/routes/index.tsx`)
- Home page → Motion kit: uses (evidence: `src/routes/index.tsx`)
- Home page → Club pages: links to (evidence: `src/routes/index.tsx`)
- Member search → Club data: filters (evidence: `src/components/MemberSearch.tsx`)
- Member search → Club pages: supports
- Page atmosphere → Ambient background: uses (evidence: `src/components/Atmosphere.tsx`)
- Site navigation → Motion kit: uses (evidence: `src/components/SiteChrome.tsx`)
- Site navigation → Browser client: checks session (evidence: `src/components/SiteChrome.tsx`)
- SIH overview → Site navigation: renders (evidence: `src/routes/events.sih-internal-hackathon.index.tsx`)
- SIH overview → SIH rules: reads (evidence: `src/routes/events.sih-internal-hackathon.index.tsx`)
- SIH overview → SIH operations: calls (evidence: `src/routes/events.sih-internal-hackathon.index.tsx`)
- SIH overview → SIH teams: links to
- SIH teams → SIH rules: reads (evidence: `src/routes/events.sih-internal-hackathon.team.tsx`)
- SIH teams → SIH operations: calls (evidence: `src/routes/events.sih-internal-hackathon.team.tsx`)
- SIH joining → SIH operations: uses
- SIH results → Result data: reads
- SIH operations → Auth middleware: requires auth (evidence: `src/lib/hackathon.functions.ts`)
- SIH operations → Input validation: validates (evidence: `src/lib/hackathon.functions.ts`)
- SIH operations → Role checks: checks role (evidence: `src/lib/hackathon.functions.ts`)
- SIH operations → Team operations: delegates to (evidence: `src/lib/hackathon.functions.ts`)
- Team operations → Admin client: uses (evidence: `src/lib/hackathon.server.ts`)
- Admin console → Site navigation: renders (evidence: `src/routes/_authenticated/admin.tsx`)
- Admin console → Photo upload: renders (evidence: `src/routes/_authenticated/admin.tsx`)
- Admin console → Club operations: calls (evidence: `src/routes/_authenticated/admin.tsx`)
- Admin console → SIH operations: calls (evidence: `src/routes/_authenticated/admin.tsx`)
- Admin console → Staff operations: calls (evidence: `src/routes/_authenticated/admin.tsx`)
- Member account → Site navigation: renders (evidence: `src/routes/_authenticated/me.tsx`)
- Member account → Photo upload: renders (evidence: `src/routes/_authenticated/me.tsx`)
- Club operations → Auth middleware: requires auth (evidence: `src/lib/admin.functions.ts`)
- Club operations → Input validation: validates (evidence: `src/lib/admin.functions.ts`)
- Club operations → Role checks: checks role (evidence: `src/lib/admin.functions.ts`)
- Club operations → Supabase: reads and writes (evidence: `src/lib/admin.functions.ts`)
- Staff operations → Auth middleware: requires auth (evidence: `src/lib/staff.functions.ts`)
- Staff operations → Role checks: checks role (evidence: `src/lib/staff.functions.ts`)
- Auth middleware → Supabase: verifies claims (evidence: `src/integrations/supabase/auth-middleware.ts`)
- Browser client → Supabase: connects (evidence: `src/integrations/supabase/client.ts`)
- Admin client → Supabase: connects (evidence: `src/integrations/supabase/client.server.ts`)
- Club pages → Member search: includes
