# johnnykool/growguide-uk architecture

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

- Interactive diagram: https://gitdiagram.com/johnnykool/growguide-uk
- Repository: https://github.com/johnnykool/growguide-uk

## Overview

GrowGuide UK is a browser-based garden planner: gardeners configure a plot and crops, then receive locally relevant weather and personalized gardening tasks. The documented flow combines client-side postcode geocoding, server weather and AI endpoints, and browser storage; major supporting areas include crop calendars, variety guides, and printable resources. Source excerpts establish the dashboard and weather normalization calls, while the README documents several external/API relationships and the advice workflow. Other UI-to-route details are shown only as documented, not independently inspected.

Main entry points: [`components/Dashboard.tsx`](https://github.com/johnnykool/growguide-uk/blob/main/components/Dashboard.tsx) (Garden dashboard), [`app/api/weather/route.ts`](https://github.com/johnnykool/growguide-uk/blob/main/app/api/weather/route.ts) (Forecast endpoint), [`app/api/advice/route.ts`](https://github.com/johnnykool/growguide-uk/blob/main/app/api/advice/route.ts) (Advice endpoint), [`app/page.tsx`](https://github.com/johnnykool/growguide-uk/blob/main/app/page.tsx) (App entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Garden planning"]
  node_home["App entry<br/>[page.tsx]"]
  node_setup["Plot setup<br/>[SetupWizard.tsx]"]
  node_profile_store[("Browser storage<br/>[storage.ts]")]
  node_dashboard["Garden dashboard<br/>[Dashboard.tsx]"]
  node_advice_results["Task results<br/>[AdviceResults.tsx]"]
  node_plot_summary["Plot summary<br/>[PlotSummary.tsx]"]
  node_seasonal_calendar["Seasonal calendar"]
  node_weather_banner["Forecast banner<br/>[WeatherBanner.tsx]"]
  node_weather_map["Weather map<br/>[WeatherMap.tsx]"]
end

subgraph group_services["Weather and advice"]
  node_postcode_service["Postcode geocoder"]
  node_weather_api["Forecast endpoint<br/>[route.ts]"]
  node_metoffice["Met Office feed"]
  node_weather_normalise["Forecast normalization<br/>[normalise.ts]"]
  node_weather_cache[("Forecast cache<br/>[cache.ts]")]
  node_tiles_api["Tile proxy<br/>[route.ts]"]
  node_advice_api["Advice endpoint<br/>[route.ts]"]
  node_rate_limit["Advice rate limit"]
end

subgraph group_knowledge["Growing knowledge"]
  node_vegetables["Crop growing database<br/>[vegetables.ts]"]
  node_variety_hub["Variety guide hub<br/>[page.tsx]"]
  node_variety_guides["Crop variety pages"]
  node_guide_data["Variety data<br/>[variety-guides.ts]"]
  node_tomato_data["Tomato varieties<br/>[varieties.ts]"]
  node_starter_varieties["Other varieties"]
end

subgraph group_library["Guides and resources"]
  node_resource_pages["Resource pages<br/>[page.tsx]"]
  node_resource_library["Printable library"]
  node_resource_data["Resource catalogue<br/>[resources.ts]"]
  node_resource_preview["PDF preview"]
end

node_gardener(("Gardener"))
node_tile_provider["Map tile service"]
node_claude["Claude API"]

node_gardener -->|"opens"| node_home
node_home -->|"routes to"| node_setup
node_home -->|"routes to"| node_dashboard
node_setup -->|"geocodes postcode"| node_postcode_service
node_setup -->|"saves draft"| node_profile_store
node_dashboard -->|"loads and saves"| node_profile_store
node_dashboard -->|"fetches forecast"| node_weather_api
node_dashboard -->|"requests tasks"| node_advice_api
node_dashboard -->|"renders"| node_plot_summary
node_dashboard -->|"renders"| node_weather_banner
node_dashboard -->|"renders"| node_weather_map
node_dashboard -->|"renders"| node_seasonal_calendar
node_dashboard -->|"renders"| node_advice_results
node_weather_api -->|"fetches forecast"| node_metoffice
node_weather_api -->|"uses cache"| node_weather_cache
node_weather_api -->|"normalizes data"| node_weather_normalise
node_weather_normalise -->|"uses feed types"| node_metoffice
node_dashboard -.->|"loads map tiles"| node_tiles_api
node_tiles_api -->|"proxies tiles"| node_tile_provider
node_advice_api -->|"requests task list"| node_claude
node_advice_api -->|"uses growing data"| node_vegetables
node_advice_api -->|"checks limit"| node_rate_limit
node_seasonal_calendar -->|"reads crop windows"| node_vegetables
node_plot_summary -->|"reads crop data"| node_vegetables
node_gardener -->|"browses"| node_variety_hub
node_variety_hub -->|"links crop guides"| node_variety_guides
node_variety_guides -->|"renders guide"| node_guide_data
node_guide_data -->|"uses varieties"| node_tomato_data
node_guide_data -->|"uses varieties"| node_starter_varieties
node_gardener -->|"browses printables"| node_resource_pages
node_resource_pages -->|"renders library"| node_resource_library
node_resource_library -->|"reads catalogue"| node_resource_data
node_resource_library -->|"renders previews"| node_resource_preview
node_resource_preview -->|"reads edition data"| node_resource_data

click node_home "https://github.com/johnnykool/growguide-uk/blob/main/app/page.tsx"
click node_setup "https://github.com/johnnykool/growguide-uk/blob/main/components/SetupWizard.tsx"
click node_profile_store "https://github.com/johnnykool/growguide-uk/blob/main/lib/storage.ts"
click node_dashboard "https://github.com/johnnykool/growguide-uk/blob/main/components/Dashboard.tsx"
click node_advice_results "https://github.com/johnnykool/growguide-uk/blob/main/components/AdviceResults.tsx"
click node_plot_summary "https://github.com/johnnykool/growguide-uk/blob/main/components/PlotSummary.tsx"
click node_seasonal_calendar "https://github.com/johnnykool/growguide-uk/blob/main/components/SeasonalCalendar.tsx"
click node_weather_banner "https://github.com/johnnykool/growguide-uk/blob/main/components/WeatherBanner.tsx"
click node_weather_map "https://github.com/johnnykool/growguide-uk/blob/main/components/WeatherMap.tsx"
click node_weather_api "https://github.com/johnnykool/growguide-uk/blob/main/app/api/weather/route.ts"
click node_weather_normalise "https://github.com/johnnykool/growguide-uk/blob/main/lib/weather/normalise.ts"
click node_weather_cache "https://github.com/johnnykool/growguide-uk/blob/main/lib/weather/cache.ts"
click node_tiles_api "https://github.com/johnnykool/growguide-uk/blob/main/app/api/weather-tiles/%5B...tile%5D/route.ts"
click node_advice_api "https://github.com/johnnykool/growguide-uk/blob/main/app/api/advice/route.ts"
click node_rate_limit "https://github.com/johnnykool/growguide-uk/blob/main/lib/advice-rate-limit.ts"
click node_vegetables "https://github.com/johnnykool/growguide-uk/blob/main/data/vegetables.ts"
click node_variety_hub "https://github.com/johnnykool/growguide-uk/blob/main/app/varieties/page.tsx"
click node_variety_guides "https://github.com/johnnykool/growguide-uk/blob/main/components/CropVarietyGuide.tsx"
click node_guide_data "https://github.com/johnnykool/growguide-uk/blob/main/data/variety-guides.ts"
click node_tomato_data "https://github.com/johnnykool/growguide-uk/blob/main/data/varieties.ts"
click node_starter_varieties "https://github.com/johnnykool/growguide-uk/blob/main/data/starter-varieties.ts"
click node_resource_pages "https://github.com/johnnykool/growguide-uk/blob/main/app/resources/page.tsx"
click node_resource_library "https://github.com/johnnykool/growguide-uk/blob/main/components/ResourceLibrary.tsx"
click node_resource_data "https://github.com/johnnykool/growguide-uk/blob/main/data/resources.ts"
click node_resource_preview "https://github.com/johnnykool/growguide-uk/blob/main/components/ResourcePreview.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_home,node_setup,node_profile_store,node_dashboard,node_advice_results,node_plot_summary,node_seasonal_calendar,node_weather_banner,node_weather_map toneBlue
class node_postcode_service,node_weather_api,node_metoffice,node_weather_normalise,node_weather_cache,node_tiles_api,node_advice_api,node_rate_limit toneAmber
class node_vegetables,node_variety_hub,node_variety_guides,node_guide_data,node_tomato_data,node_starter_varieties,node_claude toneMint
class node_resource_pages,node_resource_library,node_resource_data,node_resource_preview toneRose
class node_gardener,node_tile_provider toneIndigo
```

## Components

### Garden planning

- [App entry](https://github.com/johnnykool/growguide-uk/blob/main/app/page.tsx): `app/page.tsx`
- [Plot setup](https://github.com/johnnykool/growguide-uk/blob/main/components/SetupWizard.tsx): `components/SetupWizard.tsx`
- [Browser storage](https://github.com/johnnykool/growguide-uk/blob/main/lib/storage.ts): `lib/storage.ts`
- [Garden dashboard](https://github.com/johnnykool/growguide-uk/blob/main/components/Dashboard.tsx): `components/Dashboard.tsx`
- [Task results](https://github.com/johnnykool/growguide-uk/blob/main/components/AdviceResults.tsx): `components/AdviceResults.tsx`
- [Plot summary](https://github.com/johnnykool/growguide-uk/blob/main/components/PlotSummary.tsx): `components/PlotSummary.tsx`
- [Seasonal calendar](https://github.com/johnnykool/growguide-uk/blob/main/components/SeasonalCalendar.tsx): `components/SeasonalCalendar.tsx`
- [Forecast banner](https://github.com/johnnykool/growguide-uk/blob/main/components/WeatherBanner.tsx): `components/WeatherBanner.tsx`
- [Weather map](https://github.com/johnnykool/growguide-uk/blob/main/components/WeatherMap.tsx): `components/WeatherMap.tsx`

### Weather and advice

- **Postcode geocoder**
- [Forecast endpoint](https://github.com/johnnykool/growguide-uk/blob/main/app/api/weather/route.ts): `app/api/weather/route.ts`
- **Met Office feed**
- [Forecast normalization](https://github.com/johnnykool/growguide-uk/blob/main/lib/weather/normalise.ts): `lib/weather/normalise.ts`
- [Forecast cache](https://github.com/johnnykool/growguide-uk/blob/main/lib/weather/cache.ts): `lib/weather/cache.ts`
- [Tile proxy](https://github.com/johnnykool/growguide-uk/blob/main/app/api/weather-tiles/%5B...tile%5D/route.ts): `app/api/weather-tiles/[...tile]/route.ts`
- [Advice endpoint](https://github.com/johnnykool/growguide-uk/blob/main/app/api/advice/route.ts): `app/api/advice/route.ts`
- [Advice rate limit](https://github.com/johnnykool/growguide-uk/blob/main/lib/advice-rate-limit.ts): `lib/advice-rate-limit.ts`

### Growing knowledge

- [Crop growing database](https://github.com/johnnykool/growguide-uk/blob/main/data/vegetables.ts): `data/vegetables.ts`
- [Variety guide hub](https://github.com/johnnykool/growguide-uk/blob/main/app/varieties/page.tsx): `app/varieties/page.tsx`
- [Crop variety pages](https://github.com/johnnykool/growguide-uk/blob/main/components/CropVarietyGuide.tsx): `components/CropVarietyGuide.tsx`
- [Variety data](https://github.com/johnnykool/growguide-uk/blob/main/data/variety-guides.ts): `data/variety-guides.ts`
- [Tomato varieties](https://github.com/johnnykool/growguide-uk/blob/main/data/varieties.ts): `data/varieties.ts`
- [Other varieties](https://github.com/johnnykool/growguide-uk/blob/main/data/starter-varieties.ts): `data/starter-varieties.ts`

### Guides and resources

- [Resource pages](https://github.com/johnnykool/growguide-uk/blob/main/app/resources/page.tsx): `app/resources/page.tsx`
- [Printable library](https://github.com/johnnykool/growguide-uk/blob/main/components/ResourceLibrary.tsx): `components/ResourceLibrary.tsx`
- [Resource catalogue](https://github.com/johnnykool/growguide-uk/blob/main/data/resources.ts): `data/resources.ts`
- [PDF preview](https://github.com/johnnykool/growguide-uk/blob/main/components/ResourcePreview.tsx): `components/ResourcePreview.tsx`

### Other components

- **Gardener**
- **Map tile service**
- **Claude API**

## Connections

- Gardener → App entry: opens (evidence: `README.md`)
- App entry → Plot setup: routes to (evidence: `app/page.tsx`)
- App entry → Garden dashboard: routes to (evidence: `app/page.tsx`)
- Plot setup → Postcode geocoder: geocodes postcode (evidence: `README.md`)
- Plot setup → Browser storage: saves draft (evidence: `components/SetupWizard.tsx`)
- Garden dashboard → Browser storage: loads and saves (evidence: `components/Dashboard.tsx`)
- Garden dashboard → Forecast endpoint: fetches forecast (evidence: `README.md`)
- Garden dashboard → Advice endpoint: requests tasks (evidence: `README.md`)
- Garden dashboard → Plot summary: renders (evidence: `components/Dashboard.tsx`)
- Garden dashboard → Forecast banner: renders (evidence: `components/Dashboard.tsx`)
- Garden dashboard → Weather map: renders (evidence: `components/Dashboard.tsx`)
- Garden dashboard → Seasonal calendar: renders (evidence: `components/Dashboard.tsx`)
- Garden dashboard → Task results: renders (evidence: `components/Dashboard.tsx`)
- Forecast endpoint → Met Office feed: fetches forecast (evidence: `README.md`)
- Forecast endpoint → Forecast cache: uses cache (evidence: `app/api/weather/route.ts`)
- Forecast endpoint → Forecast normalization: normalizes data (evidence: `app/api/weather/route.ts`)
- Forecast normalization → Met Office feed: uses feed types (evidence: `lib/weather/normalise.ts`)
- Garden dashboard → Tile proxy: loads map tiles
- Tile proxy → Map tile service: proxies tiles (evidence: `README.md`)
- Advice endpoint → Claude API: requests task list (evidence: `README.md`)
- Advice endpoint → Crop growing database: uses growing data (evidence: `app/api/advice/route.ts`)
- Advice endpoint → Advice rate limit: checks limit (evidence: `app/api/advice/route.ts`)
- Seasonal calendar → Crop growing database: reads crop windows (evidence: `components/SeasonalCalendar.tsx`)
- Plot summary → Crop growing database: reads crop data (evidence: `components/PlotSummary.tsx`)
- Gardener → Variety guide hub: browses (evidence: `README.md`)
- Variety guide hub → Crop variety pages: links crop guides (evidence: `app/varieties/page.tsx`)
- Crop variety pages → Variety data: renders guide (evidence: `components/CropVarietyGuide.tsx`)
- Variety data → Tomato varieties: uses varieties (evidence: `data/variety-guides.ts`)
- Variety data → Other varieties: uses varieties (evidence: `data/variety-guides.ts`)
- Gardener → Resource pages: browses printables (evidence: `README.md`)
- Resource pages → Printable library: renders library (evidence: `app/resources/page.tsx`)
- Printable library → Resource catalogue: reads catalogue (evidence: `components/ResourceLibrary.tsx`)
- Printable library → PDF preview: renders previews (evidence: `components/ResourceLibrary.tsx`)
- PDF preview → Resource catalogue: reads edition data (evidence: `components/ResourcePreview.tsx`)
