# killy10o10/yenko architecture

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

- Interactive diagram: https://gitdiagram.com/killy10o10/yenko
- Repository: https://github.com/killy10o10/yenko

## Overview

Yɛnkɔ is a Ghana-focused, offline-first neighbourhood discovery PWA. A user chooses a city, starting point, interests, travel mode and time budget; the app generates three route options, displays a selected route on a map, tracks checked-off stops, and awards hood-familiarity progress on completion. The graph separates the app’s orchestration, user-facing journey, route and familiarity logic, and city/map data. Some data and routing details come from the README; unsampled implementation connections are omitted or marked unverified.

Main entry points: [`src/App.tsx`](https://github.com/killy10o10/yenko/blob/main/src/App.tsx) (App orchestrator), [`src/features/setup/SetupScreen.tsx`](https://github.com/killy10o10/yenko/blob/main/src/features/setup/SetupScreen.tsx) (Route setup), [`src/core/generator.ts`](https://github.com/killy10o10/yenko/blob/main/src/core/generator.ts) (Route generator), [`src/map/MapView.tsx`](https://github.com/killy10o10/yenko/blob/main/src/map/MapView.tsx) (Interactive map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["User journey"]
  node_app["App orchestrator<br/>[App.tsx]"]
  node_setup["Route setup<br/>[SetupScreen.tsx]"]
  node_interests["Interest picker<br/>[InterestGrid.tsx]"]
  node_location["Start location"]
  node_mode["Travel mode<br/>[ModePicker.tsx]"]
  node_time["Time budget<br/>[TimeSlider.tsx]"]
  node_route_options["Route options<br/>[RoutesScreen.tsx]"]
  node_route_card["Route detail<br/>[RouteCard.tsx]"]
  node_walk["Walk checklist<br/>[WalkScreen.tsx]"]
  node_completion["Route completion"]
  node_passport["Hood passport<br/>[PassportDialog.tsx]"]
end

subgraph group_engine["Route and familiarity engine"]
  node_generator["Route generator<br/>[generator.ts]"]
  node_scoring["POI scoring<br/>[scoring.ts]"]
  node_geo["Geo calculations<br/>[geo.ts]"]
  node_modes["Mode estimates<br/>[modes.ts]"]
  node_familiarity["Familiarity ranks<br/>[familiarity.ts]"]
  node_hoods["Hood resolution<br/>[hoods.ts]"]
end

subgraph group_data["City and map data"]
  node_city_data["City POI data<br/>[city.ts]"]
  node_categories["Place categories<br/>[categories.ts]"]
  node_progress_data[("Saved progress<br/>[progress.ts]")]
  node_street_routing["Street routing<br/>[routing.ts]"]
  node_map["Interactive map<br/>[MapView.tsx]"]
end

subgraph group_presentation["App presentation"]
  node_header["App header<br/>[AppHeader.tsx]"]
  node_panel["Responsive panel<br/>[Panel.tsx]"]
  node_theme["Theme settings<br/>[theme.ts]"]
  node_palette["Palette settings<br/>[palette.ts]"]
end

node_user(("Traveller"))
node_tile_host["Vector tile host"]

node_user -->|"sets preferences"| node_setup
node_app -->|"renders"| node_setup
node_setup -->|"renders"| node_interests
node_setup -->|"renders"| node_location
node_setup -->|"renders"| node_mode
node_setup -->|"renders"| node_time
node_app -->|"loads city"| node_city_data
node_app -->|"loads and saves"| node_progress_data
node_app -->|"generates routes"| node_generator
node_generator -->|"scores places"| node_scoring
node_generator -->|"uses geo math"| node_geo
node_generator -->|"uses mode estimates"| node_modes
node_app -->|"renders"| node_route_options
node_route_options -->|"renders options"| node_route_card
node_app -->|"requests street paths"| node_street_routing
node_street_routing -.->|"uses routing service"| node_tile_host
node_app -->|"renders route state"| node_map
node_map -->|"loads map tiles"| node_tile_host
node_app -->|"renders checklist"| node_walk
node_user -->|"checks off stops"| node_walk
node_app -->|"completes route"| node_familiarity
node_familiarity -->|"resolves hood"| node_hoods
node_app -->|"shows completion"| node_completion
node_app -->|"shows progress"| node_passport
node_app -->|"renders"| node_header
node_app -->|"hosts screens"| node_panel
node_header -->|"toggles theme"| node_theme
node_theme -->|"reads palette"| node_palette
node_map -->|"styles route line"| node_palette
node_setup -->|"shows choices"| node_categories
node_route_card -->|"labels stops"| node_categories
node_walk -->|"labels stops"| node_categories

click node_app "https://github.com/killy10o10/yenko/blob/main/src/App.tsx"
click node_setup "https://github.com/killy10o10/yenko/blob/main/src/features/setup/SetupScreen.tsx"
click node_interests "https://github.com/killy10o10/yenko/blob/main/src/features/setup/InterestGrid.tsx"
click node_location "https://github.com/killy10o10/yenko/blob/main/src/features/setup/LocationControl.tsx"
click node_mode "https://github.com/killy10o10/yenko/blob/main/src/features/setup/ModePicker.tsx"
click node_time "https://github.com/killy10o10/yenko/blob/main/src/features/setup/TimeSlider.tsx"
click node_route_options "https://github.com/killy10o10/yenko/blob/main/src/features/routes/RoutesScreen.tsx"
click node_route_card "https://github.com/killy10o10/yenko/blob/main/src/features/routes/RouteCard.tsx"
click node_walk "https://github.com/killy10o10/yenko/blob/main/src/features/walk/WalkScreen.tsx"
click node_completion "https://github.com/killy10o10/yenko/blob/main/src/features/walk/CompletionDialog.tsx"
click node_passport "https://github.com/killy10o10/yenko/blob/main/src/features/passport/PassportDialog.tsx"
click node_generator "https://github.com/killy10o10/yenko/blob/main/src/core/generator.ts"
click node_scoring "https://github.com/killy10o10/yenko/blob/main/src/core/scoring.ts"
click node_geo "https://github.com/killy10o10/yenko/blob/main/src/core/geo.ts"
click node_modes "https://github.com/killy10o10/yenko/blob/main/src/core/modes.ts"
click node_familiarity "https://github.com/killy10o10/yenko/blob/main/src/core/familiarity.ts"
click node_hoods "https://github.com/killy10o10/yenko/blob/main/src/core/hoods.ts"
click node_city_data "https://github.com/killy10o10/yenko/blob/main/src/data/city.ts"
click node_categories "https://github.com/killy10o10/yenko/blob/main/src/data/categories.ts"
click node_progress_data "https://github.com/killy10o10/yenko/blob/main/src/data/progress.ts"
click node_street_routing "https://github.com/killy10o10/yenko/blob/main/src/data/routing.ts"
click node_map "https://github.com/killy10o10/yenko/blob/main/src/map/MapView.tsx"
click node_header "https://github.com/killy10o10/yenko/blob/main/src/features/layout/AppHeader.tsx"
click node_panel "https://github.com/killy10o10/yenko/blob/main/src/features/layout/Panel.tsx"
click node_theme "https://github.com/killy10o10/yenko/blob/main/src/lib/theme.ts"
click node_palette "https://github.com/killy10o10/yenko/blob/main/src/lib/palette.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_app,node_setup,node_interests,node_location,node_mode,node_time,node_route_options,node_route_card,node_walk,node_completion,node_passport toneBlue
class node_generator,node_scoring,node_geo,node_modes,node_familiarity,node_hoods toneAmber
class node_city_data,node_categories,node_progress_data,node_street_routing,node_map toneMint
class node_header,node_panel,node_theme,node_palette toneRose
class node_user,node_tile_host toneIndigo
```

## Components

### User journey

- [App orchestrator](https://github.com/killy10o10/yenko/blob/main/src/App.tsx): `src/App.tsx`
- [Route setup](https://github.com/killy10o10/yenko/blob/main/src/features/setup/SetupScreen.tsx): `src/features/setup/SetupScreen.tsx`
- [Interest picker](https://github.com/killy10o10/yenko/blob/main/src/features/setup/InterestGrid.tsx): `src/features/setup/InterestGrid.tsx`
- [Start location](https://github.com/killy10o10/yenko/blob/main/src/features/setup/LocationControl.tsx): `src/features/setup/LocationControl.tsx`
- [Travel mode](https://github.com/killy10o10/yenko/blob/main/src/features/setup/ModePicker.tsx): `src/features/setup/ModePicker.tsx`
- [Time budget](https://github.com/killy10o10/yenko/blob/main/src/features/setup/TimeSlider.tsx): `src/features/setup/TimeSlider.tsx`
- [Route options](https://github.com/killy10o10/yenko/blob/main/src/features/routes/RoutesScreen.tsx): `src/features/routes/RoutesScreen.tsx`
- [Route detail](https://github.com/killy10o10/yenko/blob/main/src/features/routes/RouteCard.tsx): `src/features/routes/RouteCard.tsx`
- [Walk checklist](https://github.com/killy10o10/yenko/blob/main/src/features/walk/WalkScreen.tsx): `src/features/walk/WalkScreen.tsx`
- [Route completion](https://github.com/killy10o10/yenko/blob/main/src/features/walk/CompletionDialog.tsx): `src/features/walk/CompletionDialog.tsx`
- [Hood passport](https://github.com/killy10o10/yenko/blob/main/src/features/passport/PassportDialog.tsx): `src/features/passport/PassportDialog.tsx`

### Route and familiarity engine

- [Route generator](https://github.com/killy10o10/yenko/blob/main/src/core/generator.ts): `src/core/generator.ts`
- [POI scoring](https://github.com/killy10o10/yenko/blob/main/src/core/scoring.ts): `src/core/scoring.ts`
- [Geo calculations](https://github.com/killy10o10/yenko/blob/main/src/core/geo.ts): `src/core/geo.ts`
- [Mode estimates](https://github.com/killy10o10/yenko/blob/main/src/core/modes.ts): `src/core/modes.ts`
- [Familiarity ranks](https://github.com/killy10o10/yenko/blob/main/src/core/familiarity.ts): `src/core/familiarity.ts`
- [Hood resolution](https://github.com/killy10o10/yenko/blob/main/src/core/hoods.ts): `src/core/hoods.ts`

### City and map data

- [City POI data](https://github.com/killy10o10/yenko/blob/main/src/data/city.ts): `src/data/city.ts`
- [Place categories](https://github.com/killy10o10/yenko/blob/main/src/data/categories.ts): `src/data/categories.ts`
- [Saved progress](https://github.com/killy10o10/yenko/blob/main/src/data/progress.ts): `src/data/progress.ts`
- [Street routing](https://github.com/killy10o10/yenko/blob/main/src/data/routing.ts): `src/data/routing.ts`
- [Interactive map](https://github.com/killy10o10/yenko/blob/main/src/map/MapView.tsx): `src/map/MapView.tsx`

### App presentation

- [App header](https://github.com/killy10o10/yenko/blob/main/src/features/layout/AppHeader.tsx): `src/features/layout/AppHeader.tsx`
- [Responsive panel](https://github.com/killy10o10/yenko/blob/main/src/features/layout/Panel.tsx): `src/features/layout/Panel.tsx`
- [Theme settings](https://github.com/killy10o10/yenko/blob/main/src/lib/theme.ts): `src/lib/theme.ts`
- [Palette settings](https://github.com/killy10o10/yenko/blob/main/src/lib/palette.ts): `src/lib/palette.ts`

### Other components

- **Traveller**
- **Vector tile host**

## Connections

- Traveller → Route setup: sets preferences
- App orchestrator → Route setup: renders (evidence: `src/App.tsx`)
- Route setup → Interest picker: renders (evidence: `src/features/setup/SetupScreen.tsx`)
- Route setup → Start location: renders (evidence: `src/features/setup/SetupScreen.tsx`)
- Route setup → Travel mode: renders (evidence: `src/features/setup/SetupScreen.tsx`)
- Route setup → Time budget: renders (evidence: `src/features/setup/SetupScreen.tsx`)
- App orchestrator → City POI data: loads city (evidence: `src/App.tsx`)
- App orchestrator → Saved progress: loads and saves (evidence: `src/App.tsx`)
- App orchestrator → Route generator: generates routes (evidence: `src/App.tsx`)
- Route generator → POI scoring: scores places (evidence: `src/core/index.ts`)
- Route generator → Geo calculations: uses geo math (evidence: `src/core/index.ts`)
- Route generator → Mode estimates: uses mode estimates (evidence: `src/core/index.ts`)
- App orchestrator → Route options: renders (evidence: `src/App.tsx`)
- Route options → Route detail: renders options (evidence: `src/features/routes/RoutesScreen.tsx`)
- App orchestrator → Street routing: requests street paths (evidence: `src/App.tsx`)
- Street routing → Vector tile host: uses routing service
- App orchestrator → Interactive map: renders route state (evidence: `src/App.tsx`)
- Interactive map → Vector tile host: loads map tiles (evidence: `src/map/MapView.tsx`)
- App orchestrator → Walk checklist: renders checklist (evidence: `src/App.tsx`)
- Traveller → Walk checklist: checks off stops (evidence: `src/features/walk/WalkScreen.tsx`)
- App orchestrator → Familiarity ranks: completes route (evidence: `src/App.tsx`)
- Familiarity ranks → Hood resolution: resolves hood (evidence: `src/core/index.ts`)
- App orchestrator → Route completion: shows completion (evidence: `src/App.tsx`)
- App orchestrator → Hood passport: shows progress
- App orchestrator → App header: renders (evidence: `src/App.tsx`)
- App orchestrator → Responsive panel: hosts screens (evidence: `src/App.tsx`)
- App header → Theme settings: toggles theme (evidence: `src/features/layout/AppHeader.tsx`)
- Theme settings → Palette settings: reads palette (evidence: `src/lib/theme.ts`)
- Interactive map → Palette settings: styles route line (evidence: `src/map/MapView.tsx`)
- Route setup → Place categories: shows choices (evidence: `src/features/setup/SetupScreen.tsx`)
- Route detail → Place categories: labels stops (evidence: `src/features/routes/RouteCard.tsx`)
- Walk checklist → Place categories: labels stops (evidence: `src/features/walk/WalkScreen.tsx`)
