# yonz-git/natureplore architecture

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

- Interactive diagram: https://gitdiagram.com/yonz-git/natureplore
- Repository: https://github.com/yonz-git/natureplore

## Overview

Natureplore is a no-account nature-discovery prototype: people find nearby or seasonal routes, explore mapped route details and organisms, learn about conservation claims and actions, then save routes and learning content on their device. Its principal flow runs from the welcome screen to route suggestions, route detail and an optional walk; search and map views provide alternate discovery paths. Learn and Saved are distinct product branches. The README documents the wider screen flows, while sampled source and the SOURCE INDEX support only some implementation links; unsampled subsystems are represented without guessed internal calls.

Main entry points: [`app/(app)/layout.tsx`](https://github.com/yonz-git/natureplore/blob/main/app/(app)/layout.tsx) (Tabbed app), [`components/LearnScreen.tsx`](https://github.com/yonz-git/natureplore/blob/main/components/LearnScreen.tsx) (Learn overview), [`components/SavedScreen.tsx`](https://github.com/yonz-git/natureplore/blob/main/components/SavedScreen.tsx) (Saved overview), [`components/SuggestionsScreen.tsx`](https://github.com/yonz-git/natureplore/blob/main/components/SuggestionsScreen.tsx) (Route suggestions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Route discovery"]
  node_welcome["Welcome<br/>[Welcome.tsx]"]
  node_app_shell["Tabbed app<br/>[layout.tsx]"]
  node_suggestions["Route suggestions"]
  node_map["Region map<br/>[RegionMap.tsx]"]
  node_search["Map search<br/>[SearchScreen.tsx]"]
  node_route_detail["Route detail"]
  node_walk["Walk mode<br/>[WalkScreen.tsx]"]
end

subgraph group_learning["Nature learning"]
  node_learn_home["Learn overview<br/>[LearnScreen.tsx]"]
  node_claims["Claims and sources<br/>[ClaimScreen.tsx]"]
  node_actions["Conservation actions<br/>[ActionScreen.tsx]"]
  node_documentaries["Documentaries<br/>[DocsScreen.tsx]"]
  node_organism["Organism detail<br/>[OrganismPage.tsx]"]
end

subgraph group_saved["Saved on device"]
  node_saved_home["Saved overview<br/>[SavedScreen.tsx]"]
  node_saved_lists["Saved lists<br/>[SavedPages.tsx]"]
end

subgraph group_content["Domain data"]
  node_saved_store[("Device saves<br/>[saved.ts]")]
  node_suggestion_data[("Seasonal catalogue<br/>[suggestions.ts]")]
  node_route_data[("Route definitions<br/>[routes.ts]")]
  node_spot_data[("Route spot details<br/>[spots.ts]")]
  node_claim_data[("Claim content<br/>[claims.ts]")]
  node_action_data[("Action content<br/>[actions.ts]")]
  node_doc_data[("Documentary catalogue<br/>[docs.ts]")]
  node_recent_searches[("Recent searches<br/>[recent.ts]")]
  node_base_geometry["Base map geometry<br/>[base-geo.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_welcome
node_welcome -->|"continues to"| node_app_shell
node_visitor -->|"enters"| node_app_shell
node_app_shell -->|"opens Routes"| node_suggestions
node_suggestions -->|"loads seasons"| node_suggestion_data
node_suggestions -->|"uses routes"| node_route_data
node_suggestions -->|"shows routes on"| node_map
node_app_shell -->|"opens search"| node_search
node_search -->|"searches catalogue"| node_suggestion_data
node_search -->|"renders map"| node_map
node_search -->|"records opened results"| node_recent_searches
node_map -->|"loads geometry"| node_base_geometry
node_suggestions -->|"opens route"| node_route_detail
node_route_detail -->|"reads route"| node_route_data
node_route_detail -.->|"shows route spots"| node_spot_data
node_route_detail -.->|"starts walk"| node_walk
node_visitor -->|"opens Learn"| node_app_shell
node_app_shell -->|"opens Learn tab"| node_learn_home
node_learn_home -.->|"opens claim"| node_claims
node_learn_home -.->|"opens action"| node_actions
node_learn_home -->|"opens films"| node_documentaries
node_learn_home -->|"reads claims"| node_claim_data
node_learn_home -->|"reads actions"| node_action_data
node_learn_home -->|"reads documentaries"| node_doc_data
node_search -.->|"opens organism"| node_organism
node_visitor -->|"opens Saved"| node_app_shell
node_app_shell -->|"opens Saved tab"| node_saved_home
node_saved_home -->|"opens sections"| node_saved_lists
node_saved_home -->|"reads saved items"| node_saved_store
node_saved_lists -->|"updates saved items"| node_saved_store
node_saved_home -->|"shows saved routes"| node_suggestion_data
node_saved_lists -->|"shows recent searches"| node_recent_searches
node_saved_home -->|"lists saved actions"| node_action_data
node_saved_home -->|"lists saved films"| node_doc_data

click node_welcome "https://github.com/yonz-git/natureplore/blob/main/components/Welcome.tsx"
click node_app_shell "https://github.com/yonz-git/natureplore/blob/main/app/(app)/layout.tsx"
click node_suggestions "https://github.com/yonz-git/natureplore/blob/main/components/SuggestionsScreen.tsx"
click node_map "https://github.com/yonz-git/natureplore/blob/main/components/RegionMap.tsx"
click node_search "https://github.com/yonz-git/natureplore/blob/main/components/SearchScreen.tsx"
click node_route_detail "https://github.com/yonz-git/natureplore/blob/main/components/RouteCardScreen.tsx"
click node_walk "https://github.com/yonz-git/natureplore/blob/main/components/WalkScreen.tsx"
click node_learn_home "https://github.com/yonz-git/natureplore/blob/main/components/LearnScreen.tsx"
click node_claims "https://github.com/yonz-git/natureplore/blob/main/components/ClaimScreen.tsx"
click node_actions "https://github.com/yonz-git/natureplore/blob/main/components/ActionScreen.tsx"
click node_documentaries "https://github.com/yonz-git/natureplore/blob/main/components/DocsScreen.tsx"
click node_organism "https://github.com/yonz-git/natureplore/blob/main/components/OrganismPage.tsx"
click node_saved_home "https://github.com/yonz-git/natureplore/blob/main/components/SavedScreen.tsx"
click node_saved_lists "https://github.com/yonz-git/natureplore/blob/main/components/SavedPages.tsx"
click node_saved_store "https://github.com/yonz-git/natureplore/blob/main/lib/saved.ts"
click node_suggestion_data "https://github.com/yonz-git/natureplore/blob/main/lib/suggestions.ts"
click node_route_data "https://github.com/yonz-git/natureplore/blob/main/lib/routes.ts"
click node_spot_data "https://github.com/yonz-git/natureplore/blob/main/lib/spots.ts"
click node_claim_data "https://github.com/yonz-git/natureplore/blob/main/lib/claims.ts"
click node_action_data "https://github.com/yonz-git/natureplore/blob/main/lib/actions.ts"
click node_doc_data "https://github.com/yonz-git/natureplore/blob/main/lib/docs.ts"
click node_recent_searches "https://github.com/yonz-git/natureplore/blob/main/lib/recent.ts"
click node_base_geometry "https://github.com/yonz-git/natureplore/blob/main/public/base-geo.js"

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_welcome,node_app_shell,node_suggestions,node_map,node_search,node_route_detail,node_walk toneBlue
class node_learn_home,node_claims,node_actions,node_documentaries,node_organism toneAmber
class node_saved_home,node_saved_lists toneMint
class node_saved_store,node_suggestion_data,node_route_data,node_spot_data,node_claim_data,node_action_data,node_doc_data,node_recent_searches,node_base_geometry toneRose
class node_visitor toneIndigo
```

## Components

### Route discovery

- [Welcome](https://github.com/yonz-git/natureplore/blob/main/components/Welcome.tsx): `components/Welcome.tsx`
- [Tabbed app](https://github.com/yonz-git/natureplore/blob/main/app/(app)/layout.tsx): `app/(app)/layout.tsx`
- [Route suggestions](https://github.com/yonz-git/natureplore/blob/main/components/SuggestionsScreen.tsx): `components/SuggestionsScreen.tsx`
- [Region map](https://github.com/yonz-git/natureplore/blob/main/components/RegionMap.tsx): `components/RegionMap.tsx`
- [Map search](https://github.com/yonz-git/natureplore/blob/main/components/SearchScreen.tsx): `components/SearchScreen.tsx`
- [Route detail](https://github.com/yonz-git/natureplore/blob/main/components/RouteCardScreen.tsx): `components/RouteCardScreen.tsx`
- [Walk mode](https://github.com/yonz-git/natureplore/blob/main/components/WalkScreen.tsx): `components/WalkScreen.tsx`

### Nature learning

- [Learn overview](https://github.com/yonz-git/natureplore/blob/main/components/LearnScreen.tsx): `components/LearnScreen.tsx`
- [Claims and sources](https://github.com/yonz-git/natureplore/blob/main/components/ClaimScreen.tsx): `components/ClaimScreen.tsx`
- [Conservation actions](https://github.com/yonz-git/natureplore/blob/main/components/ActionScreen.tsx): `components/ActionScreen.tsx`
- [Documentaries](https://github.com/yonz-git/natureplore/blob/main/components/DocsScreen.tsx): `components/DocsScreen.tsx`
- [Organism detail](https://github.com/yonz-git/natureplore/blob/main/components/OrganismPage.tsx): `components/OrganismPage.tsx`

### Saved on device

- [Saved overview](https://github.com/yonz-git/natureplore/blob/main/components/SavedScreen.tsx): `components/SavedScreen.tsx`
- [Saved lists](https://github.com/yonz-git/natureplore/blob/main/components/SavedPages.tsx): `components/SavedPages.tsx`

### Domain data

- [Device saves](https://github.com/yonz-git/natureplore/blob/main/lib/saved.ts): `lib/saved.ts`
- [Seasonal catalogue](https://github.com/yonz-git/natureplore/blob/main/lib/suggestions.ts): `lib/suggestions.ts`
- [Route definitions](https://github.com/yonz-git/natureplore/blob/main/lib/routes.ts): `lib/routes.ts`
- [Route spot details](https://github.com/yonz-git/natureplore/blob/main/lib/spots.ts): `lib/spots.ts`
- [Claim content](https://github.com/yonz-git/natureplore/blob/main/lib/claims.ts): `lib/claims.ts`
- [Action content](https://github.com/yonz-git/natureplore/blob/main/lib/actions.ts): `lib/actions.ts`
- [Documentary catalogue](https://github.com/yonz-git/natureplore/blob/main/lib/docs.ts): `lib/docs.ts`
- [Recent searches](https://github.com/yonz-git/natureplore/blob/main/lib/recent.ts): `lib/recent.ts`
- [Base map geometry](https://github.com/yonz-git/natureplore/blob/main/public/base-geo.js): `public/base-geo.js`

### Other components

- **Visitor**

## Connections

- Visitor → Welcome: opens
- Welcome → Tabbed app: continues to
- Visitor → Tabbed app: enters
- Tabbed app → Route suggestions: opens Routes
- Route suggestions → Seasonal catalogue: loads seasons (evidence: `components/SuggestionsScreen.tsx`)
- Route suggestions → Route definitions: uses routes (evidence: `components/SuggestionsScreen.tsx`)
- Route suggestions → Region map: shows routes on (evidence: `components/SuggestionsScreen.tsx`)
- Tabbed app → Map search: opens search
- Map search → Seasonal catalogue: searches catalogue (evidence: `components/SearchScreen.tsx`)
- Map search → Region map: renders map (evidence: `components/SearchScreen.tsx`)
- Map search → Recent searches: records opened results (evidence: `components/SearchScreen.tsx`)
- Region map → Base map geometry: loads geometry
- Route suggestions → Route detail: opens route
- Route detail → Route definitions: reads route (evidence: `lib/routes.ts`)
- Route detail → Route spot details: shows route spots
- Route detail → Walk mode: starts walk
- Visitor → Tabbed app: opens Learn
- Tabbed app → Learn overview: opens Learn tab
- Learn overview → Claims and sources: opens claim
- Learn overview → Conservation actions: opens action
- Learn overview → Documentaries: opens films
- Learn overview → Claim content: reads claims (evidence: `components/LearnScreen.tsx`)
- Learn overview → Action content: reads actions (evidence: `components/LearnScreen.tsx`)
- Learn overview → Documentary catalogue: reads documentaries (evidence: `components/LearnScreen.tsx`)
- Map search → Organism detail: opens organism
- Visitor → Tabbed app: opens Saved
- Tabbed app → Saved overview: opens Saved tab
- Saved overview → Saved lists: opens sections
- Saved overview → Device saves: reads saved items (evidence: `components/SavedScreen.tsx`)
- Saved lists → Device saves: updates saved items (evidence: `components/SavedPages.tsx`)
- Saved overview → Seasonal catalogue: shows saved routes (evidence: `components/SavedScreen.tsx`)
- Saved lists → Recent searches: shows recent searches (evidence: `components/SavedPages.tsx`)
- Saved overview → Action content: lists saved actions (evidence: `components/SavedScreen.tsx`)
- Saved overview → Documentary catalogue: lists saved films (evidence: `components/SavedScreen.tsx`)
