# sreypinkim-pixel/vireyak architecture

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

- Interactive diagram: https://gitdiagram.com/sreypinkim-pixel/vireyak
- Repository: https://github.com/sreypinkim-pixel/vireyak

## Overview

Vireyak is a Cambodia travel-discovery and booking-preview website. Visitors search stays or attractions, browse filtered listings and detail pages, and can view a trip estimate; province guides and a searchable places directory provide additional discovery paths. The README explicitly limits booking, inventory, accounts, and APIs to previews or local demos. The principal page composition and several domain helpers are evidenced in excerpts/index references; unsampled feature connections are omitted where their callers are not shown.

Main entry points: [`components/ListingExplorer.tsx`](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/ListingExplorer.tsx) (Listing filters), [`components/DetailPage.tsx`](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/DetailPage.tsx) (Detail presentation), [`lib/provinces.ts`](https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/provinces.ts) (Province catalog), [`data/travel.ts`](https://github.com/sreypinkim-pixel/vireyak/blob/main/data/travel.ts) (Illustrative travel data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Travel discovery"]
  node_home["Home experience<br/>[page.tsx]"]
  node_search["Travel search<br/>[SearchForm.tsx]"]
  node_stays["Stay listings<br/>[page.tsx]"]
  node_experiences["Experience listings<br/>[page.tsx]"]
  node_explorer["Listing filters"]
  node_staydetail["Stay details<br/>[page.tsx]"]
  node_attractiondetail["Attraction details<br/>[page.tsx]"]
  node_detailview["Detail presentation<br/>[DetailPage.tsx]"]
  node_bookingpreview["Trip estimate<br/>[BookingPanel.tsx]"]
end

subgraph group_catalog["Catalog and provinces"]
  node_traveldata["Illustrative travel data<br/>[travel.ts]"]
  node_traveltypes["Travel data types<br/>[travel-types.ts]"]
  node_provinceguide["Province guide<br/>[page.tsx]"]
  node_provinceexperiences["Province attractions<br/>[page.tsx]"]
  node_provincecatalog["Province catalog<br/>[provinces.ts]"]
  node_attractionapi["Demo attractions API<br/>[route.ts]"]
  node_provinceapi["Province demo API<br/>[route.ts]"]
  node_directory["Places directory<br/>[PlacesTable.tsx]"]
  node_about["About and guidance<br/>[page.tsx]"]
  node_catalogapi["Cambodia catalogue adapter<br/>[camTripApi.ts]"]
end

subgraph group_accounts["Account previews"]
  node_authform["Account forms<br/>[AuthForm.tsx]"]
  node_session["Local demo session<br/>[demoSession.ts]"]
end

subgraph group_shared["Shared experience"]
  node_navbar["Shared navigation<br/>[Navbar.tsx]"]
  node_layout["Application shell<br/>[layout.tsx]"]
  node_reviews["Sample reviews<br/>[reviews.ts]"]
end

node_traveler(("Traveler"))

node_traveler -->|"opens"| node_home
node_home -->|"renders"| node_search
node_home -->|"renders"| node_reviews
node_search -->|"routes search"| node_stays
node_search -->|"routes search"| node_experiences
node_stays -->|"renders"| node_explorer
node_experiences -->|"renders"| node_explorer
node_explorer -->|"filters data"| node_traveldata
node_explorer -.->|"links listings"| node_staydetail
node_explorer -.->|"links listings"| node_attractiondetail
node_staydetail -->|"renders"| node_detailview
node_attractiondetail -->|"renders"| node_detailview
node_detailview -->|"renders"| node_bookingpreview
node_detailview -->|"reads listing"| node_traveldata
node_attractionapi -->|"reads attractions"| node_traveldata
node_attractionapi -->|"adds province data"| node_provincecatalog
node_provinceapi -->|"looks up province"| node_provincecatalog
node_provincecatalog -->|"filters attractions"| node_traveldata
node_provinceexperiences -->|"lists attractions"| node_provincecatalog
node_provinceguide -.->|"loads province data"| node_catalogapi
node_about -->|"loads highlights"| node_catalogapi
node_directory -.->|"serves directory"| node_traveler
node_authform -->|"records demo session"| node_session
node_layout -.->|"shares navigation"| node_navbar
node_traveler -.->|"visits site"| node_layout

click node_home "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/page.tsx"
click node_search "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/SearchForm.tsx"
click node_stays "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/stays/page.tsx"
click node_experiences "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/attraction/page.tsx"
click node_explorer "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/ListingExplorer.tsx"
click node_staydetail "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/stays/%5Bid%5D/page.tsx"
click node_attractiondetail "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/attraction/%5Bid%5D/page.tsx"
click node_detailview "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/DetailPage.tsx"
click node_bookingpreview "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/BookingPanel.tsx"
click node_traveldata "https://github.com/sreypinkim-pixel/vireyak/blob/main/data/travel.ts"
click node_traveltypes "https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/travel-types.ts"
click node_provinceguide "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/provinces/%5Bid%5D/page.tsx"
click node_provinceexperiences "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/provinces/%5Bid%5D/attractions/page.tsx"
click node_provincecatalog "https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/provinces.ts"
click node_attractionapi "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/api/attractions/route.ts"
click node_provinceapi "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/api/provinces/%5Bid%5D/attractions/route.ts"
click node_directory "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/table/PlacesTable.tsx"
click node_about "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/about/page.tsx"
click node_catalogapi "https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/camTripApi.ts"
click node_authform "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/AuthForm.tsx"
click node_session "https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/demoSession.ts"
click node_navbar "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/Navbar.tsx"
click node_layout "https://github.com/sreypinkim-pixel/vireyak/blob/main/app/layout.tsx"
click node_reviews "https://github.com/sreypinkim-pixel/vireyak/blob/main/components/home/reviews/reviews.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_home,node_search,node_stays,node_experiences,node_explorer,node_staydetail,node_attractiondetail,node_detailview,node_bookingpreview toneBlue
class node_traveldata,node_traveltypes,node_provinceguide,node_provinceexperiences,node_provincecatalog,node_attractionapi,node_provinceapi,node_directory,node_about,node_catalogapi toneAmber
class node_authform,node_session toneMint
class node_navbar,node_layout,node_reviews toneRose
class node_traveler toneIndigo
```

## Components

### Travel discovery

- [Home experience](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/page.tsx): `app/page.tsx`
- [Travel search](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/SearchForm.tsx): `components/SearchForm.tsx`
- [Stay listings](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/stays/page.tsx): `app/stays/page.tsx`
- [Experience listings](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/attraction/page.tsx): `app/attraction/page.tsx`
- [Listing filters](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/ListingExplorer.tsx): `components/ListingExplorer.tsx`
- [Stay details](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/stays/%5Bid%5D/page.tsx): `app/stays/[id]/page.tsx`
- [Attraction details](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/attraction/%5Bid%5D/page.tsx): `app/attraction/[id]/page.tsx`
- [Detail presentation](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/DetailPage.tsx): `components/DetailPage.tsx`
- [Trip estimate](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/BookingPanel.tsx): `components/BookingPanel.tsx`

### Catalog and provinces

- [Illustrative travel data](https://github.com/sreypinkim-pixel/vireyak/blob/main/data/travel.ts): `data/travel.ts`
- [Travel data types](https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/travel-types.ts): `lib/travel-types.ts`
- [Province guide](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/provinces/%5Bid%5D/page.tsx): `app/provinces/[id]/page.tsx`
- [Province attractions](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/provinces/%5Bid%5D/attractions/page.tsx): `app/provinces/[id]/attractions/page.tsx`
- [Province catalog](https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/provinces.ts): `lib/provinces.ts`
- [Demo attractions API](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/api/attractions/route.ts): `app/api/attractions/route.ts`
- [Province demo API](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/api/provinces/%5Bid%5D/attractions/route.ts): `app/api/provinces/[id]/attractions/route.ts`
- [Places directory](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/table/PlacesTable.tsx): `app/table/PlacesTable.tsx`
- [About and guidance](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/about/page.tsx): `app/about/page.tsx`
- [Cambodia catalogue adapter](https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/camTripApi.ts): `lib/camTripApi.ts`

### Account previews

- [Account forms](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/AuthForm.tsx): `components/AuthForm.tsx`
- [Local demo session](https://github.com/sreypinkim-pixel/vireyak/blob/main/lib/demoSession.ts): `lib/demoSession.ts`

### Shared experience

- [Shared navigation](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/Navbar.tsx): `components/Navbar.tsx`
- [Application shell](https://github.com/sreypinkim-pixel/vireyak/blob/main/app/layout.tsx): `app/layout.tsx`
- [Sample reviews](https://github.com/sreypinkim-pixel/vireyak/blob/main/components/home/reviews/reviews.ts): `components/home/reviews/reviews.ts`

### Other components

- **Traveler**

## Connections

- Traveler → Home experience: opens (evidence: `app/page.tsx`)
- Home experience → Travel search: renders (evidence: `app/page.tsx`)
- Home experience → Sample reviews: renders
- Travel search → Stay listings: routes search (evidence: `components/SearchForm.tsx`)
- Travel search → Experience listings: routes search (evidence: `components/SearchForm.tsx`)
- Stay listings → Listing filters: renders (evidence: `app/stays/page.tsx`)
- Experience listings → Listing filters: renders (evidence: `app/attraction/page.tsx`)
- Listing filters → Illustrative travel data: filters data (evidence: `components/ListingExplorer.tsx`)
- Listing filters → Stay details: links listings
- Listing filters → Attraction details: links listings
- Stay details → Detail presentation: renders (evidence: `app/stays/[id]/page.tsx`)
- Attraction details → Detail presentation: renders (evidence: `app/attraction/[id]/page.tsx`)
- Detail presentation → Trip estimate: renders (evidence: `components/DetailPage.tsx`)
- Detail presentation → Illustrative travel data: reads listing (evidence: `app/stays/[id]/page.tsx`)
- Demo attractions API → Illustrative travel data: reads attractions (evidence: `app/api/attractions/route.ts`)
- Demo attractions API → Province catalog: adds province data (evidence: `app/api/attractions/route.ts`)
- Province demo API → Province catalog: looks up province (evidence: `app/api/provinces/[id]/attractions/route.ts`)
- Province catalog → Illustrative travel data: filters attractions (evidence: `lib/provinces.ts`)
- Province attractions → Province catalog: lists attractions (evidence: `app/provinces/[id]/attractions/page.tsx`)
- Province guide → Cambodia catalogue adapter: loads province data
- About and guidance → Cambodia catalogue adapter: loads highlights (evidence: `app/about/page.tsx`)
- Places directory → Traveler: serves directory
- Account forms → Local demo session: records demo session (evidence: `components/AuthForm.tsx`)
- Application shell → Shared navigation: shares navigation
- Traveler → Application shell: visits site
