# samsualam/rtrw architecture

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

- Interactive diagram: https://gitdiagram.com/samsualam/rtrw
- Repository: https://github.com/samsualam/rtrw

## Overview

This is a Bone Bolango spatial-planning portal. Visitors can explore planning information, inspect zoning, use the district map (Cek ITR), and check a proposed land use with the KKPR calculator. The app component coordinates page state and connects these experiences. The map and zoning datasets support distinct exploration and assessment features. Several source excerpts are partial, so the graph includes only relationships shown by those excerpts or the source index; unsampled capabilities are represented only where their paths are known.

Main entry points: [`src/App.tsx`](https://github.com/samsualam/rtrw/blob/main/src/App.tsx) (Portal coordinator), [`src/data/zoningData.ts`](https://github.com/samsualam/rtrw/blob/main/src/data/zoningData.ts) (Zoning and parcel data), [`src/components/MkHorizontalScroll.tsx`](https://github.com/samsualam/rtrw/blob/main/src/components/MkHorizontalScroll.tsx) (Zone gallery), [`src/components/KkprCalculatorModal.tsx`](https://github.com/samsualam/rtrw/blob/main/src/components/KkprCalculatorModal.tsx) (KKPR calculator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Portal experience"]
  node_app["Portal coordinator<br/>[App.tsx]"]
  node_hero["Portal entry<br/>[MkHeroExact.tsx]"]
  node_services["Planning services<br/>[MkServicesDark.tsx]"]
  node_app_mount["Browser entry<br/>[main.tsx]"]
  node_mk_footer["Portal footer<br/>[MkFooter.tsx]"]
  node_mk_canvas["Hero canvas<br/>[MkHeroCanvas.tsx]"]
  node_vertical_process["Vertical process section"]
end

subgraph group_maps["Map exploration"]
  node_itr["Cek ITR map<br/>[CekItrPage.tsx]"]
  node_district_data[("District spatial data")]
  node_gis_modal["GIS map modal<br/>[GisMapModal.tsx]"]
  node_gis_simulator["GIS simulator"]
  node_hero_spatial["Spatial hero canvas"]
end

subgraph group_planning["Zoning and assessment"]
  node_zone_gallery["Zone gallery"]
  node_calculator["KKPR calculator"]
  node_zone_detail["Zone detail"]
  node_zoning_showcase["Zoning showcase<br/>[ZoningShowcase.tsx]"]
  node_workflow["Planning workflow"]
  node_horizontal_work["Horizontal zone explorer"]
end

subgraph group_shared["Shared domain support"]
  node_zone_data[("Zoning and parcel data<br/>[zoningData.ts]")]
  node_spatial_types["Spatial domain types<br/>[spatial.ts]"]
  node_audio["Interaction audio<br/>[audio.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens portal"| node_app_mount
node_app_mount -->|"renders"| node_app
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_zone_gallery
node_app -->|"renders"| node_services
node_app -->|"renders"| node_itr
node_app -->|"opens"| node_calculator
node_app -->|"selects zone"| node_zone_detail
node_app -->|"renders"| node_mk_footer
node_app -->|"renders"| node_vertical_process
node_hero -->|"requests map or calculator"| node_app
node_services -->|"requests map or calculator"| node_app
node_zone_gallery -->|"reads zones"| node_zone_data
node_zone_gallery -->|"selects zone"| node_app
node_itr -->|"reads districts"| node_district_data
node_gis_modal -->|"renders"| node_gis_simulator
node_gis_simulator -->|"reads planning data"| node_zone_data
node_calculator -->|"reads rules"| node_zone_data
node_zoning_showcase -->|"reads zones"| node_zone_data
node_workflow -->|"reads zones"| node_zone_data
node_zone_gallery -->|"uses zone types"| node_spatial_types
node_calculator -->|"uses calculation types"| node_spatial_types
node_gis_simulator -->|"uses parcel types"| node_spatial_types
node_zone_detail -->|"uses zone types"| node_spatial_types
node_itr -->|"plays interaction sounds"| node_audio
node_calculator -->|"plays interaction sounds"| node_audio
node_services -->|"plays interaction sounds"| node_audio
node_mk_canvas -.->|"used by"| node_hero
node_hero_spatial -.->|"supports map display"| node_itr

click node_app "https://github.com/samsualam/rtrw/blob/main/src/App.tsx"
click node_hero "https://github.com/samsualam/rtrw/blob/main/src/components/MkHeroExact.tsx"
click node_services "https://github.com/samsualam/rtrw/blob/main/src/components/MkServicesDark.tsx"
click node_zone_gallery "https://github.com/samsualam/rtrw/blob/main/src/components/MkHorizontalScroll.tsx"
click node_itr "https://github.com/samsualam/rtrw/blob/main/src/components/CekItrPage.tsx"
click node_district_data "https://github.com/samsualam/rtrw/blob/main/src/data/boneBolangoKecamatan.ts"
click node_gis_modal "https://github.com/samsualam/rtrw/blob/main/src/components/GisMapModal.tsx"
click node_gis_simulator "https://github.com/samsualam/rtrw/blob/main/src/components/InteractiveGisSimulator.tsx"
click node_calculator "https://github.com/samsualam/rtrw/blob/main/src/components/KkprCalculatorModal.tsx"
click node_zone_detail "https://github.com/samsualam/rtrw/blob/main/src/components/ZoneDetailModal.tsx"
click node_zoning_showcase "https://github.com/samsualam/rtrw/blob/main/src/components/ZoningShowcase.tsx"
click node_workflow "https://github.com/samsualam/rtrw/blob/main/src/components/ProcessWorkflow.tsx"
click node_zone_data "https://github.com/samsualam/rtrw/blob/main/src/data/zoningData.ts"
click node_spatial_types "https://github.com/samsualam/rtrw/blob/main/src/types/spatial.ts"
click node_audio "https://github.com/samsualam/rtrw/blob/main/src/utils/audio.ts"
click node_app_mount "https://github.com/samsualam/rtrw/blob/main/src/main.tsx"
click node_mk_footer "https://github.com/samsualam/rtrw/blob/main/src/components/MkFooter.tsx"
click node_mk_canvas "https://github.com/samsualam/rtrw/blob/main/src/components/MkHeroCanvas.tsx"
click node_hero_spatial "https://github.com/samsualam/rtrw/blob/main/src/components/HeroSpatialCanvas.tsx"
click node_horizontal_work "https://github.com/samsualam/rtrw/blob/main/src/components/MkHorizontalScroll.tsx"
click node_vertical_process "https://github.com/samsualam/rtrw/blob/main/src/components/MkVerticalProcess.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_app,node_hero,node_services,node_app_mount,node_mk_footer,node_mk_canvas,node_vertical_process toneBlue
class node_itr,node_district_data,node_gis_modal,node_gis_simulator,node_hero_spatial toneAmber
class node_zone_gallery,node_calculator,node_zone_detail,node_zoning_showcase,node_workflow,node_horizontal_work toneMint
class node_zone_data,node_spatial_types,node_audio toneRose
class node_visitor toneIndigo
```

## Components

### Portal experience

- [Portal coordinator](https://github.com/samsualam/rtrw/blob/main/src/App.tsx): `src/App.tsx`
- [Portal entry](https://github.com/samsualam/rtrw/blob/main/src/components/MkHeroExact.tsx): `src/components/MkHeroExact.tsx`
- [Planning services](https://github.com/samsualam/rtrw/blob/main/src/components/MkServicesDark.tsx): `src/components/MkServicesDark.tsx`
- [Browser entry](https://github.com/samsualam/rtrw/blob/main/src/main.tsx): `src/main.tsx`
- [Portal footer](https://github.com/samsualam/rtrw/blob/main/src/components/MkFooter.tsx): `src/components/MkFooter.tsx`
- [Hero canvas](https://github.com/samsualam/rtrw/blob/main/src/components/MkHeroCanvas.tsx): `src/components/MkHeroCanvas.tsx`
- [Vertical process section](https://github.com/samsualam/rtrw/blob/main/src/components/MkVerticalProcess.tsx): `src/components/MkVerticalProcess.tsx`

### Map exploration

- [Cek ITR map](https://github.com/samsualam/rtrw/blob/main/src/components/CekItrPage.tsx): `src/components/CekItrPage.tsx`
- [District spatial data](https://github.com/samsualam/rtrw/blob/main/src/data/boneBolangoKecamatan.ts): `src/data/boneBolangoKecamatan.ts`
- [GIS map modal](https://github.com/samsualam/rtrw/blob/main/src/components/GisMapModal.tsx): `src/components/GisMapModal.tsx`
- [GIS simulator](https://github.com/samsualam/rtrw/blob/main/src/components/InteractiveGisSimulator.tsx): `src/components/InteractiveGisSimulator.tsx`
- [Spatial hero canvas](https://github.com/samsualam/rtrw/blob/main/src/components/HeroSpatialCanvas.tsx): `src/components/HeroSpatialCanvas.tsx`

### Zoning and assessment

- [Zone gallery](https://github.com/samsualam/rtrw/blob/main/src/components/MkHorizontalScroll.tsx): `src/components/MkHorizontalScroll.tsx`
- [KKPR calculator](https://github.com/samsualam/rtrw/blob/main/src/components/KkprCalculatorModal.tsx): `src/components/KkprCalculatorModal.tsx`
- [Zone detail](https://github.com/samsualam/rtrw/blob/main/src/components/ZoneDetailModal.tsx): `src/components/ZoneDetailModal.tsx`
- [Zoning showcase](https://github.com/samsualam/rtrw/blob/main/src/components/ZoningShowcase.tsx): `src/components/ZoningShowcase.tsx`
- [Planning workflow](https://github.com/samsualam/rtrw/blob/main/src/components/ProcessWorkflow.tsx): `src/components/ProcessWorkflow.tsx`
- [Horizontal zone explorer](https://github.com/samsualam/rtrw/blob/main/src/components/MkHorizontalScroll.tsx): `src/components/MkHorizontalScroll.tsx`

### Shared domain support

- [Zoning and parcel data](https://github.com/samsualam/rtrw/blob/main/src/data/zoningData.ts): `src/data/zoningData.ts`
- [Spatial domain types](https://github.com/samsualam/rtrw/blob/main/src/types/spatial.ts): `src/types/spatial.ts`
- [Interaction audio](https://github.com/samsualam/rtrw/blob/main/src/utils/audio.ts): `src/utils/audio.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Browser entry: opens portal
- Browser entry → Portal coordinator: renders (evidence: `src/main.tsx`)
- Portal coordinator → Portal entry: renders (evidence: `src/App.tsx`)
- Portal coordinator → Zone gallery: renders (evidence: `src/App.tsx`)
- Portal coordinator → Planning services: renders (evidence: `src/App.tsx`)
- Portal coordinator → Cek ITR map: renders (evidence: `src/App.tsx`)
- Portal coordinator → KKPR calculator: opens (evidence: `src/App.tsx`)
- Portal coordinator → Zone detail: selects zone (evidence: `src/App.tsx`)
- Portal coordinator → Portal footer: renders (evidence: `src/App.tsx`)
- Portal coordinator → Vertical process section: renders (evidence: `src/App.tsx`)
- Portal entry → Portal coordinator: requests map or calculator (evidence: `src/components/MkHeroExact.tsx`)
- Planning services → Portal coordinator: requests map or calculator (evidence: `src/components/MkServicesDark.tsx`)
- Zone gallery → Zoning and parcel data: reads zones (evidence: `src/components/MkHorizontalScroll.tsx`)
- Zone gallery → Portal coordinator: selects zone (evidence: `src/components/MkHorizontalScroll.tsx`)
- Cek ITR map → District spatial data: reads districts (evidence: `src/components/CekItrPage.tsx`)
- GIS map modal → GIS simulator: renders (evidence: `src/components/GisMapModal.tsx`)
- GIS simulator → Zoning and parcel data: reads planning data (evidence: `src/components/InteractiveGisSimulator.tsx`)
- KKPR calculator → Zoning and parcel data: reads rules (evidence: `src/components/KkprCalculatorModal.tsx`)
- Zoning showcase → Zoning and parcel data: reads zones (evidence: `src/components/ZoningShowcase.tsx`)
- Planning workflow → Zoning and parcel data: reads zones (evidence: `src/components/ProcessWorkflow.tsx`)
- Zone gallery → Spatial domain types: uses zone types (evidence: `src/components/MkHorizontalScroll.tsx`)
- KKPR calculator → Spatial domain types: uses calculation types (evidence: `src/components/KkprCalculatorModal.tsx`)
- GIS simulator → Spatial domain types: uses parcel types (evidence: `src/components/InteractiveGisSimulator.tsx`)
- Zone detail → Spatial domain types: uses zone types (evidence: `src/components/ZoneDetailModal.tsx`)
- Cek ITR map → Interaction audio: plays interaction sounds (evidence: `src/components/CekItrPage.tsx`)
- KKPR calculator → Interaction audio: plays interaction sounds (evidence: `src/components/KkprCalculatorModal.tsx`)
- Planning services → Interaction audio: plays interaction sounds (evidence: `src/components/MkServicesDark.tsx`)
- Hero canvas → Portal entry: used by
- Spatial hero canvas → Cek ITR map: supports map display
