# putrasaka/angkatan-khalid-bin-walid architecture

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

- Interactive diagram: https://gitdiagram.com/putrasaka/angkatan-khalid-bin-walid
- Repository: https://github.com/putrasaka/angkatan-khalid-bin-walid

## Overview

This is a public alumni-memory site for the Khalid Bin Walid cohort. Visitors enter through the login overlay, then browse a single-page experience: cohort introduction, photo moments, student biodata, graduation records, school-year comparisons, and video memories. A shared data context loads and maps cohort data from Supabase, with local dummy data available in the application. Source excerpts show the main composition and data-fetching path; some component behavior is inferred only from the source index, so unverified relationships are omitted.

Main entry points: [`src/context/DataContext.tsx`](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/context/DataContext.tsx) (Shared data context), [`src/components/UserView.tsx`](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/UserView.tsx) (Page composition), [`src/App.tsx`](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/App.tsx) (Application shell), [`src/components/HomeSection.tsx`](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/HomeSection.tsx) (Cohort home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["Application shell<br/>[App.tsx]"]
  node_login["Visitor login<br/>[LoginOverlay.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_loading["Loading status<br/>[LoadingScreen.tsx]"]
end

subgraph group_content["Alumni experience"]
  node_user_view["Page composition<br/>[UserView.tsx]"]
  node_home["Cohort home<br/>[HomeSection.tsx]"]
  node_moments["Photo moments<br/>[MomentsSection.tsx]"]
  node_biodata["Student biodata<br/>[BiodataSection.tsx]"]
  node_graduation["Graduation records"]
  node_before_after["School comparison"]
  node_video_moments["Video memories"]
  node_footer["Cohort footer<br/>[Footer.tsx]"]
end

subgraph group_data["Data access"]
  node_data_context["Shared data context<br/>[DataContext.tsx]"]
  node_dummy_data["Fallback cohort data<br/>[dummyData.ts]"]
  node_mappers["Row mappers<br/>[mappers.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
end

subgraph group_media["Media viewers"]
  node_student_modal["Student detail modal"]
  node_photo_modal["Photo lightbox"]
  node_video_modal["Video player"]
end

node_visitor(("Visitor"))
node_supabase_service[("Supabase service")]

node_entry -->|"renders"| node_app
node_app -->|"provides data"| node_data_context
node_app -->|"renders"| node_login
node_app -->|"renders"| node_navbar
node_app -->|"renders"| node_loading
node_app -->|"renders"| node_user_view
node_visitor -.->|"enters details"| node_login
node_login -->|"submits visitor info"| node_app
node_user_view -->|"renders"| node_home
node_user_view -->|"renders"| node_moments
node_user_view -->|"renders"| node_biodata
node_user_view -->|"renders"| node_graduation
node_user_view -->|"renders"| node_before_after
node_user_view -->|"renders"| node_video_moments
node_user_view -->|"renders"| node_footer
node_home -->|"reads cohort data"| node_data_context
node_home -->|"reads cohort details"| node_dummy_data
node_moments -->|"reads moments"| node_data_context
node_moments -->|"opens photo"| node_photo_modal
node_biodata -->|"reads students"| node_data_context
node_biodata -->|"opens details"| node_student_modal
node_graduation -->|"reads graduation data"| node_data_context
node_graduation -->|"opens photo"| node_photo_modal
node_before_after -->|"reads students"| node_data_context
node_video_moments -->|"reads video moments"| node_data_context
node_video_moments -->|"opens video"| node_video_modal
node_footer -->|"reads cohort details"| node_dummy_data
node_data_context -->|"queries through"| node_supabase_client
node_data_context -->|"maps database rows"| node_mappers
node_data_context -->|"imports fallback data"| node_dummy_data
node_data_context -->|"queries and subscribes"| node_supabase_service
node_supabase_client -.->|"connects to"| node_supabase_service

click node_entry "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/main.tsx"
click node_app "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/App.tsx"
click node_login "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/LoginOverlay.tsx"
click node_navbar "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/Navbar.tsx"
click node_loading "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/LoadingScreen.tsx"
click node_user_view "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/UserView.tsx"
click node_home "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/HomeSection.tsx"
click node_moments "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/MomentsSection.tsx"
click node_biodata "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/BiodataSection.tsx"
click node_graduation "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/GraduationSection.tsx"
click node_before_after "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/BeforeAfterSection.tsx"
click node_video_moments "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/VideoMomentsSection.tsx"
click node_footer "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/Footer.tsx"
click node_data_context "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/context/DataContext.tsx"
click node_dummy_data "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/data/dummyData.ts"
click node_mappers "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/lib/mappers.ts"
click node_supabase_client "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/lib/supabase.ts"
click node_student_modal "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/StudentDetailModal.tsx"
click node_photo_modal "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/PhotoLightboxModal.tsx"
click node_video_modal "https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/VideoPlayerModal.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_entry,node_app,node_login,node_navbar,node_loading toneBlue
class node_user_view,node_home,node_moments,node_biodata,node_graduation,node_before_after,node_video_moments,node_footer,node_supabase_service toneAmber
class node_data_context,node_dummy_data,node_mappers,node_supabase_client toneMint
class node_student_modal,node_photo_modal,node_video_modal toneRose
class node_visitor toneIndigo
```

## Components

### App shell

- [React entry](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/main.tsx): `src/main.tsx`
- [Application shell](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/App.tsx): `src/App.tsx`
- [Visitor login](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/LoginOverlay.tsx): `src/components/LoginOverlay.tsx`
- [Navigation](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Loading status](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/LoadingScreen.tsx): `src/components/LoadingScreen.tsx`

### Alumni experience

- [Page composition](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/UserView.tsx): `src/components/UserView.tsx`
- [Cohort home](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/HomeSection.tsx): `src/components/HomeSection.tsx`
- [Photo moments](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/MomentsSection.tsx): `src/components/MomentsSection.tsx`
- [Student biodata](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/BiodataSection.tsx): `src/components/BiodataSection.tsx`
- [Graduation records](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/GraduationSection.tsx): `src/components/GraduationSection.tsx`
- [School comparison](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/BeforeAfterSection.tsx): `src/components/BeforeAfterSection.tsx`
- [Video memories](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/VideoMomentsSection.tsx): `src/components/VideoMomentsSection.tsx`
- [Cohort footer](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Data access

- [Shared data context](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/context/DataContext.tsx): `src/context/DataContext.tsx`
- [Fallback cohort data](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/data/dummyData.ts): `src/data/dummyData.ts`
- [Row mappers](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/lib/mappers.ts): `src/lib/mappers.ts`
- [Supabase client](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Media viewers

- [Student detail modal](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/StudentDetailModal.tsx): `src/components/StudentDetailModal.tsx`
- [Photo lightbox](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/PhotoLightboxModal.tsx): `src/components/PhotoLightboxModal.tsx`
- [Video player](https://github.com/putrasaka/angkatan-khalid-bin-walid/blob/main/src/components/VideoPlayerModal.tsx): `src/components/VideoPlayerModal.tsx`

### Other components

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

## Connections

- React entry → Application shell: renders (evidence: `src/main.tsx`)
- Application shell → Shared data context: provides data (evidence: `src/App.tsx`)
- Application shell → Visitor login: renders (evidence: `src/App.tsx`)
- Application shell → Navigation: renders (evidence: `src/App.tsx`)
- Application shell → Loading status: renders (evidence: `src/App.tsx`)
- Application shell → Page composition: renders (evidence: `src/App.tsx`)
- Visitor → Visitor login: enters details
- Visitor login → Application shell: submits visitor info (evidence: `src/App.tsx`)
- Page composition → Cohort home: renders (evidence: `src/components/UserView.tsx`)
- Page composition → Photo moments: renders (evidence: `src/components/UserView.tsx`)
- Page composition → Student biodata: renders (evidence: `src/components/UserView.tsx`)
- Page composition → Graduation records: renders (evidence: `src/components/UserView.tsx`)
- Page composition → School comparison: renders (evidence: `src/components/UserView.tsx`)
- Page composition → Video memories: renders (evidence: `src/components/UserView.tsx`)
- Page composition → Cohort footer: renders (evidence: `src/components/UserView.tsx`)
- Cohort home → Shared data context: reads cohort data (evidence: `src/components/HomeSection.tsx`)
- Cohort home → Fallback cohort data: reads cohort details (evidence: `src/components/HomeSection.tsx`)
- Photo moments → Shared data context: reads moments (evidence: `src/components/MomentsSection.tsx`)
- Photo moments → Photo lightbox: opens photo (evidence: `src/components/MomentsSection.tsx`)
- Student biodata → Shared data context: reads students (evidence: `src/components/BiodataSection.tsx`)
- Student biodata → Student detail modal: opens details (evidence: `src/components/BiodataSection.tsx`)
- Graduation records → Shared data context: reads graduation data (evidence: `src/components/GraduationSection.tsx`)
- Graduation records → Photo lightbox: opens photo (evidence: `src/components/GraduationSection.tsx`)
- School comparison → Shared data context: reads students (evidence: `src/components/BeforeAfterSection.tsx`)
- Video memories → Shared data context: reads video moments (evidence: `src/components/VideoMomentsSection.tsx`)
- Video memories → Video player: opens video (evidence: `src/components/VideoMomentsSection.tsx`)
- Cohort footer → Fallback cohort data: reads cohort details (evidence: `src/components/Footer.tsx`)
- Shared data context → Supabase client: queries through (evidence: `src/context/DataContext.tsx`)
- Shared data context → Row mappers: maps database rows (evidence: `src/context/DataContext.tsx`)
- Shared data context → Fallback cohort data: imports fallback data (evidence: `src/context/DataContext.tsx`)
- Shared data context → Supabase service: queries and subscribes (evidence: `src/context/DataContext.tsx`)
- Supabase client → Supabase service: connects to
