# ipshu-codes/hoc architecture

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

- Interactive diagram: https://gitdiagram.com/ipshu-codes/hoc
- Repository: https://github.com/ipshu-codes/hoc

## Overview

HOC is a bilingual digital heritage platform for Ward 16, Kathmandu, centered on Mhepi Ajima and Nanak Math. Visitors enter through localized pages, browse heritage narratives and photographs, and explore heritage locations and walking routes on an interactive map. The gallery also offers an immersive 3D museum view. Internal content processing reads and validates heritage material, while shared localization and image utilities support presentation across these experiences. The graph emphasizes relationships visible in excerpts or the source index; unsampled integrations and implementation details are left unconnected.

Main entry points: [`src/app/[lang]/heritage/[slug]/page.tsx`](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/heritage/%5Bslug%5D/page.tsx) (Heritage detail), [`src/app/[lang]/gallery/page.tsx`](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/gallery/page.tsx) (Gallery page), [`src/app/[lang]/page.tsx`](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/page.tsx) (Localized home), [`src/lib/content.ts`](https://github.com/ipshu-codes/hoc/blob/main/src/lib/content.ts) (Content loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site and heritage"]
  node_home["Localized home<br/>[page.tsx]"]
  node_heritage["Heritage detail<br/>[page.tsx]"]
  node_contact["Contact page<br/>[page.tsx]"]
  node_content["Content loader<br/>[content.ts]"]
  node_heritage_schema["Heritage schema<br/>[heritage.ts]"]
end

subgraph group_gallery["Photo gallery"]
  node_gallery_page["Gallery page<br/>[page.tsx]"]
  node_gallery_ui["Gallery experience<br/>[Gallery.tsx]"]
  node_photo_view["Photo viewer<br/>[PhotoView.tsx]"]
  node_museum_canvas["Museum renderer<br/>[MuseumCanvas.tsx]"]
  node_museum_scene["Museum scene<br/>[MuseumScene.tsx]"]
  node_museum_layout["Museum layout<br/>[museum-layout.ts]"]
  node_museum_textures["Museum textures"]
end

subgraph group_mapping["Map exploration"]
  node_map_page["Map page<br/>[page.tsx]"]
  node_map_explorer["Map explorer<br/>[MapExplorer.tsx]"]
  node_map_view["Interactive map<br/>[MapView.tsx]"]
  node_map_data["Map data<br/>[map-data.ts]"]
  node_map_controls["Map controls<br/>[MapControls.tsx]"]
  node_place_panel["Place details"]
  node_route_nav["Route navigation<br/>[RouteNav.tsx]"]
  node_route_schema["Route schema<br/>[route.ts]"]
end

subgraph group_shared["Shared services"]
  node_i18n["Localization<br/>[i18n.ts]"]
  node_images["Image utilities<br/>[images.ts]"]
  node_responsive_image["Responsive images"]
  node_format["Formatting<br/>[format.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"opens"| node_heritage
node_visitor -->|"opens"| node_gallery_page
node_visitor -->|"opens"| node_map_page
node_visitor -->|"opens"| node_contact
node_home -->|"loads heritage"| node_content
node_home -->|"loads language"| node_i18n
node_home -->|"resolves photos"| node_images
node_home -->|"links to sites"| node_heritage
node_heritage -->|"loads site"| node_content
node_heritage -->|"loads language"| node_i18n
node_heritage -->|"renders cover"| node_responsive_image
node_heritage -->|"links photos"| node_gallery_page
node_content -->|"validates content"| node_heritage_schema
node_gallery_page -->|"loads photos"| node_content
node_gallery_page -->|"loads language"| node_i18n
node_gallery_page -->|"resolves photos"| node_images
node_gallery_page -->|"renders gallery"| node_gallery_ui
node_gallery_ui -->|"opens photo"| node_photo_view
node_gallery_ui -->|"renders museum"| node_museum_canvas
node_museum_canvas -->|"builds scene"| node_museum_scene
node_museum_canvas -->|"calculates layout"| node_museum_layout
node_museum_scene -->|"loads textures"| node_museum_textures
node_map_page -->|"renders explorer"| node_map_explorer
node_map_page -->|"loads map data"| node_map_data
node_map_page -->|"loads language"| node_i18n
node_map_explorer -.->|"hosts map"| node_map_view
node_map_view -->|"uses controls"| node_map_controls
node_map_view -->|"uses details"| node_place_panel
node_map_data -->|"reads heritage"| node_content
node_map_data -->|"resolves images"| node_images
node_map_data -->|"uses route types"| node_route_schema
node_museum_layout -->|"formats labels"| node_format
node_museum_layout -->|"uses photo types"| node_images
node_responsive_image -->|"uses image data"| node_images
node_map_controls -->|"formats values"| node_format
node_place_panel -->|"formats values"| node_format

click node_home "https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/page.tsx"
click node_heritage "https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/heritage/%5Bslug%5D/page.tsx"
click node_contact "https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/contact/page.tsx"
click node_content "https://github.com/ipshu-codes/hoc/blob/main/src/lib/content.ts"
click node_heritage_schema "https://github.com/ipshu-codes/hoc/blob/main/src/types/heritage.ts"
click node_gallery_page "https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/gallery/page.tsx"
click node_gallery_ui "https://github.com/ipshu-codes/hoc/blob/main/src/components/Gallery.tsx"
click node_photo_view "https://github.com/ipshu-codes/hoc/blob/main/src/components/PhotoView.tsx"
click node_museum_canvas "https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/MuseumCanvas.tsx"
click node_museum_scene "https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/MuseumScene.tsx"
click node_museum_layout "https://github.com/ipshu-codes/hoc/blob/main/src/lib/museum-layout.ts"
click node_museum_textures "https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/useMuseumTextures.ts"
click node_map_page "https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/map/page.tsx"
click node_map_explorer "https://github.com/ipshu-codes/hoc/blob/main/src/components/MapExplorer.tsx"
click node_map_view "https://github.com/ipshu-codes/hoc/blob/main/src/components/MapView.tsx"
click node_map_data "https://github.com/ipshu-codes/hoc/blob/main/src/lib/map-data.ts"
click node_map_controls "https://github.com/ipshu-codes/hoc/blob/main/src/components/map/MapControls.tsx"
click node_place_panel "https://github.com/ipshu-codes/hoc/blob/main/src/components/map/PlaceDetailPanel.tsx"
click node_route_nav "https://github.com/ipshu-codes/hoc/blob/main/src/components/map/RouteNav.tsx"
click node_route_schema "https://github.com/ipshu-codes/hoc/blob/main/src/types/route.ts"
click node_i18n "https://github.com/ipshu-codes/hoc/blob/main/src/lib/i18n.ts"
click node_images "https://github.com/ipshu-codes/hoc/blob/main/src/lib/images.ts"
click node_responsive_image "https://github.com/ipshu-codes/hoc/blob/main/src/components/ResponsiveImage.tsx"
click node_format "https://github.com/ipshu-codes/hoc/blob/main/src/lib/format.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_heritage,node_contact,node_content,node_heritage_schema toneBlue
class node_gallery_page,node_gallery_ui,node_photo_view,node_museum_canvas,node_museum_scene,node_museum_layout,node_museum_textures toneAmber
class node_map_page,node_map_explorer,node_map_view,node_map_data,node_map_controls,node_place_panel,node_route_nav,node_route_schema toneMint
class node_i18n,node_images,node_responsive_image,node_format toneRose
class node_visitor toneIndigo
```

## Components

### Site and heritage

- [Localized home](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/page.tsx): `src/app/[lang]/page.tsx`
- [Heritage detail](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/heritage/%5Bslug%5D/page.tsx): `src/app/[lang]/heritage/[slug]/page.tsx`
- [Contact page](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/contact/page.tsx): `src/app/[lang]/contact/page.tsx`
- [Content loader](https://github.com/ipshu-codes/hoc/blob/main/src/lib/content.ts): `src/lib/content.ts`
- [Heritage schema](https://github.com/ipshu-codes/hoc/blob/main/src/types/heritage.ts): `src/types/heritage.ts`

### Photo gallery

- [Gallery page](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/gallery/page.tsx): `src/app/[lang]/gallery/page.tsx`
- [Gallery experience](https://github.com/ipshu-codes/hoc/blob/main/src/components/Gallery.tsx): `src/components/Gallery.tsx`
- [Photo viewer](https://github.com/ipshu-codes/hoc/blob/main/src/components/PhotoView.tsx): `src/components/PhotoView.tsx`
- [Museum renderer](https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/MuseumCanvas.tsx): `src/components/gallery/MuseumCanvas.tsx`
- [Museum scene](https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/MuseumScene.tsx): `src/components/gallery/MuseumScene.tsx`
- [Museum layout](https://github.com/ipshu-codes/hoc/blob/main/src/lib/museum-layout.ts): `src/lib/museum-layout.ts`
- [Museum textures](https://github.com/ipshu-codes/hoc/blob/main/src/components/gallery/useMuseumTextures.ts): `src/components/gallery/useMuseumTextures.ts`

### Map exploration

- [Map page](https://github.com/ipshu-codes/hoc/blob/main/src/app/%5Blang%5D/map/page.tsx): `src/app/[lang]/map/page.tsx`
- [Map explorer](https://github.com/ipshu-codes/hoc/blob/main/src/components/MapExplorer.tsx): `src/components/MapExplorer.tsx`
- [Interactive map](https://github.com/ipshu-codes/hoc/blob/main/src/components/MapView.tsx): `src/components/MapView.tsx`
- [Map data](https://github.com/ipshu-codes/hoc/blob/main/src/lib/map-data.ts): `src/lib/map-data.ts`
- [Map controls](https://github.com/ipshu-codes/hoc/blob/main/src/components/map/MapControls.tsx): `src/components/map/MapControls.tsx`
- [Place details](https://github.com/ipshu-codes/hoc/blob/main/src/components/map/PlaceDetailPanel.tsx): `src/components/map/PlaceDetailPanel.tsx`
- [Route navigation](https://github.com/ipshu-codes/hoc/blob/main/src/components/map/RouteNav.tsx): `src/components/map/RouteNav.tsx`
- [Route schema](https://github.com/ipshu-codes/hoc/blob/main/src/types/route.ts): `src/types/route.ts`

### Shared services

- [Localization](https://github.com/ipshu-codes/hoc/blob/main/src/lib/i18n.ts): `src/lib/i18n.ts`
- [Image utilities](https://github.com/ipshu-codes/hoc/blob/main/src/lib/images.ts): `src/lib/images.ts`
- [Responsive images](https://github.com/ipshu-codes/hoc/blob/main/src/components/ResponsiveImage.tsx): `src/components/ResponsiveImage.tsx`
- [Formatting](https://github.com/ipshu-codes/hoc/blob/main/src/lib/format.ts): `src/lib/format.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Localized home: opens
- Visitor → Heritage detail: opens
- Visitor → Gallery page: opens
- Visitor → Map page: opens
- Visitor → Contact page: opens
- Localized home → Content loader: loads heritage (evidence: `src/app/[lang]/page.tsx`)
- Localized home → Localization: loads language (evidence: `src/app/[lang]/page.tsx`)
- Localized home → Image utilities: resolves photos (evidence: `src/app/[lang]/page.tsx`)
- Localized home → Heritage detail: links to sites (evidence: `src/app/[lang]/page.tsx`)
- Heritage detail → Content loader: loads site (evidence: `src/app/[lang]/heritage/[slug]/page.tsx`)
- Heritage detail → Localization: loads language (evidence: `src/app/[lang]/heritage/[slug]/page.tsx`)
- Heritage detail → Responsive images: renders cover (evidence: `src/app/[lang]/heritage/[slug]/page.tsx`)
- Heritage detail → Gallery page: links photos (evidence: `src/app/[lang]/heritage/[slug]/page.tsx`)
- Content loader → Heritage schema: validates content (evidence: `src/lib/content.ts`)
- Gallery page → Content loader: loads photos (evidence: `src/app/[lang]/gallery/page.tsx`)
- Gallery page → Localization: loads language (evidence: `src/app/[lang]/gallery/page.tsx`)
- Gallery page → Image utilities: resolves photos (evidence: `src/app/[lang]/gallery/page.tsx`)
- Gallery page → Gallery experience: renders gallery (evidence: `src/app/[lang]/gallery/page.tsx`)
- Gallery experience → Photo viewer: opens photo (evidence: `src/components/Gallery.tsx`)
- Gallery experience → Museum renderer: renders museum (evidence: `src/components/Gallery.tsx`)
- Museum renderer → Museum scene: builds scene (evidence: `src/components/gallery/MuseumCanvas.tsx`)
- Museum renderer → Museum layout: calculates layout (evidence: `src/components/gallery/MuseumCanvas.tsx`)
- Museum scene → Museum textures: loads textures (evidence: `src/components/gallery/MuseumScene.tsx`)
- Map page → Map explorer: renders explorer (evidence: `src/app/[lang]/map/page.tsx`)
- Map page → Map data: loads map data (evidence: `src/app/[lang]/map/page.tsx`)
- Map page → Localization: loads language (evidence: `src/app/[lang]/map/page.tsx`)
- Map explorer → Interactive map: hosts map
- Interactive map → Map controls: uses controls (evidence: `src/components/MapView.tsx`)
- Interactive map → Place details: uses details (evidence: `src/components/MapView.tsx`)
- Map data → Content loader: reads heritage (evidence: `src/lib/map-data.ts`)
- Map data → Image utilities: resolves images (evidence: `src/lib/map-data.ts`)
- Map data → Route schema: uses route types (evidence: `src/lib/map-data.ts`)
- Museum layout → Formatting: formats labels (evidence: `src/lib/museum-layout.ts`)
- Museum layout → Image utilities: uses photo types (evidence: `src/lib/museum-layout.ts`)
- Responsive images → Image utilities: uses image data (evidence: `src/components/ResponsiveImage.tsx`)
- Map controls → Formatting: formats values (evidence: `src/components/map/MapControls.tsx`)
- Place details → Formatting: formats values (evidence: `src/components/map/PlaceDetailPanel.tsx`)
