# utg1209/peak-finder_data511 architecture

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

- Interactive diagram: https://gitdiagram.com/utg1209/peak-finder_data511
- Repository: https://github.com/utg1209/peak-finder_data511

## Overview

Peak Finder is a static hiking decision app: hikers set a home city, quarter, and trip-condition limits, compare ranked hikes on a map, then inspect a hike’s costs, seasonal conditions, trail profile, and advice. The browser loads committed JSON, validates it, indexes it, and serves it to the Explore and hike views; Explore computes matches and routes selections to hike details. The data pipeline prepares travel, cost, trail, and seasonal assets for that interface. Several pipeline stages and detail-page modules are unsampled, so their internal calls are not asserted.

Main entry points: [`app/src/App.tsx`](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/App.tsx) (App shell), [`app/src/screens/Explore/Explore.tsx`](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/Explore/Explore.tsx) (Explore hikes), [`app/src/data/loaders.ts`](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/loaders.ts) (JSON loaders & index), [`pipeline/lane2_common.py`](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/lane2_common.py) (Pipeline utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Hiking app"]
  node_app["App shell<br/>[App.tsx]"]
  node_explore["Explore hikes<br/>[Explore.tsx]"]
  node_map["Hike map<br/>[UsMap.tsx]"]
  node_hike_detail["Hike details<br/>[Hike.tsx]"]
  node_about["Data &amp; about<br/>[About.tsx]"]
  node_charts["Detail charts"]
end

subgraph group_data["App data"]
  node_dataset_hook["Dataset loader hook<br/>[useDataset.ts]"]
  node_loaders["JSON loaders &amp; index<br/>[loaders.ts]"]
  node_schema["Data contracts<br/>[schema.ts]"]
  node_profiles["Trail profiles"]
end

subgraph group_models["Decision models"]
  node_filters["URL filters<br/>[useFilters.ts]"]
  node_filter_logic["Filter logic<br/>[filters.ts]"]
  node_matching["Quarter matching<br/>[match.ts]"]
  node_cost_model["Cost model<br/>[cost.ts]"]
end

subgraph group_pipeline["Data pipeline"]
  node_travel_pipeline["Travel estimates<br/>[travel.py]"]
  node_cost_pipeline["Cost estimates<br/>[cost.py]"]
  node_profile_pipeline["Profile generation<br/>[profiles.py]"]
  node_walk_pipeline["Walk building<br/>[build_walk.py]"]
  node_trail_pipeline["Trail asset stages"]
  node_pipeline_common["Pipeline utilities<br/>[lane2_common.py]"]
  node_trail_common["Trail utilities<br/>[common.py]"]
end

node_hiker(("Hiker"))

node_hiker -->|"opens app"| node_app
node_app -->|"loads dataset"| node_dataset_hook
node_dataset_hook -->|"requests data"| node_loaders
node_loaders -->|"validates JSON"| node_schema
node_app -->|"routes to"| node_explore
node_app -->|"routes to"| node_hike_detail
node_app -->|"routes to"| node_about
node_explore -->|"renders map"| node_map
node_explore -->|"reads filters"| node_filters
node_filters -->|"parses and serializes"| node_filter_logic
node_explore -->|"scores quarters"| node_matching
node_hike_detail -->|"renders charts"| node_charts
node_hike_detail -->|"loads profile data"| node_loaders
node_travel_pipeline -->|"uses helpers"| node_pipeline_common
node_cost_pipeline -->|"uses helpers"| node_pipeline_common
node_profile_pipeline -->|"uses helpers"| node_pipeline_common
node_walk_pipeline -.->|"may supply routes"| node_profile_pipeline
node_trail_pipeline -->|"uses helpers"| node_trail_common
node_pipeline_common -.->|"produces app data"| node_loaders
node_trail_common -.->|"produces trail assets"| node_profiles

click node_app "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/App.tsx"
click node_explore "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/Explore/Explore.tsx"
click node_map "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/components/UsMap.tsx"
click node_hike_detail "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/Hike/Hike.tsx"
click node_about "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/About/About.tsx"
click node_charts "https://github.com/utg1209/peak-finder_data511/tree/main/app/src/components/charts"
click node_dataset_hook "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/useDataset.ts"
click node_loaders "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/loaders.ts"
click node_schema "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/schema.ts"
click node_profiles "https://github.com/utg1209/peak-finder_data511/tree/main/app/src/screens/Explore/view3d"
click node_filters "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/lib/useFilters.ts"
click node_filter_logic "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/lib/filters.ts"
click node_matching "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/models/match.ts"
click node_cost_model "https://github.com/utg1209/peak-finder_data511/blob/main/app/src/models/cost.ts"
click node_travel_pipeline "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/travel.py"
click node_cost_pipeline "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/cost.py"
click node_profile_pipeline "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/profiles.py"
click node_walk_pipeline "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/walks/build_walk.py"
click node_trail_pipeline "https://github.com/utg1209/peak-finder_data511/tree/main/pipeline/trail_kit/pipeline"
click node_pipeline_common "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/lane2_common.py"
click node_trail_common "https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/trail_kit/pipeline/common.py"

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_explore,node_map,node_hike_detail,node_about,node_charts toneBlue
class node_dataset_hook,node_loaders,node_schema,node_profiles toneAmber
class node_filters,node_filter_logic,node_matching,node_cost_model toneMint
class node_travel_pipeline,node_cost_pipeline,node_profile_pipeline,node_walk_pipeline,node_trail_pipeline,node_pipeline_common,node_trail_common toneRose
class node_hiker toneIndigo
```

## Components

### Hiking app

- [App shell](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/App.tsx): `app/src/App.tsx`
- [Explore hikes](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/Explore/Explore.tsx): `app/src/screens/Explore/Explore.tsx`
- [Hike map](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/components/UsMap.tsx): `app/src/components/UsMap.tsx`
- [Hike details](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/Hike/Hike.tsx): `app/src/screens/Hike/Hike.tsx`
- [Data & about](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/screens/About/About.tsx): `app/src/screens/About/About.tsx`
- [Detail charts](https://github.com/utg1209/peak-finder_data511/tree/main/app/src/components/charts): `app/src/components/charts`

### App data

- [Dataset loader hook](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/useDataset.ts): `app/src/data/useDataset.ts`
- [JSON loaders & index](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/loaders.ts): `app/src/data/loaders.ts`
- [Data contracts](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/data/schema.ts): `app/src/data/schema.ts`
- [Trail profiles](https://github.com/utg1209/peak-finder_data511/tree/main/app/src/screens/Explore/view3d): `app/src/screens/Explore/view3d`

### Decision models

- [URL filters](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/lib/useFilters.ts): `app/src/lib/useFilters.ts`
- [Filter logic](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/lib/filters.ts): `app/src/lib/filters.ts`
- [Quarter matching](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/models/match.ts): `app/src/models/match.ts`
- [Cost model](https://github.com/utg1209/peak-finder_data511/blob/main/app/src/models/cost.ts): `app/src/models/cost.ts`

### Data pipeline

- [Travel estimates](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/travel.py): `pipeline/travel.py`
- [Cost estimates](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/cost.py): `pipeline/cost.py`
- [Profile generation](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/profiles.py): `pipeline/profiles.py`
- [Walk building](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/walks/build_walk.py): `pipeline/walks/build_walk.py`
- [Trail asset stages](https://github.com/utg1209/peak-finder_data511/tree/main/pipeline/trail_kit/pipeline): `pipeline/trail_kit/pipeline`
- [Pipeline utilities](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/lane2_common.py): `pipeline/lane2_common.py`
- [Trail utilities](https://github.com/utg1209/peak-finder_data511/blob/main/pipeline/trail_kit/pipeline/common.py): `pipeline/trail_kit/pipeline/common.py`

### Other components

- **Hiker**

## Connections

- Hiker → App shell: opens app (evidence: `README.md`)
- App shell → Dataset loader hook: loads dataset (evidence: `app/src/App.tsx`)
- Dataset loader hook → JSON loaders & index: requests data (evidence: `app/src/data/useDataset.ts`)
- JSON loaders & index → Data contracts: validates JSON (evidence: `app/src/data/loaders.ts`)
- App shell → Explore hikes: routes to (evidence: `app/src/App.tsx`)
- App shell → Hike details: routes to (evidence: `app/src/App.tsx`)
- App shell → Data & about: routes to (evidence: `app/src/App.tsx`)
- Explore hikes → Hike map: renders map (evidence: `app/src/screens/Explore/Explore.tsx`)
- Explore hikes → URL filters: reads filters (evidence: `app/src/screens/Explore/Explore.tsx`)
- URL filters → Filter logic: parses and serializes (evidence: `app/src/lib/useFilters.ts`)
- Explore hikes → Quarter matching: scores quarters (evidence: `app/src/screens/Explore/Explore.tsx`)
- Hike details → Detail charts: renders charts (evidence: `app/src/screens/Hike/Hike.tsx`)
- Hike details → JSON loaders & index: loads profile data (evidence: `app/src/screens/Hike/Hike.tsx`)
- Travel estimates → Pipeline utilities: uses helpers (evidence: `pipeline/travel.py`)
- Cost estimates → Pipeline utilities: uses helpers (evidence: `pipeline/cost.py`)
- Profile generation → Pipeline utilities: uses helpers (evidence: `pipeline/profiles.py`)
- Walk building → Profile generation: may supply routes
- Trail asset stages → Trail utilities: uses helpers (evidence: `pipeline/trail_kit/pipeline/s5_build_page.py`)
- Pipeline utilities → JSON loaders & index: produces app data
- Trail utilities → Trail profiles: produces trail assets
