# nbnd/ausnzpostcode architecture

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

- Interactive diagram: https://gitdiagram.com/nbnd/ausnzpostcode
- Repository: https://github.com/nbnd/ausnzpostcode

## Overview

AusNZ Postcode is a static Australia and New Zealand postcode/locality directory. Visitors start at the homepage or search, browse country, region, city, postcode, and locality directories, then open detail pages with postcode information, maps, and nearby places. A separate EV-charger map and informational pages extend the directory. The repository describes local data and no backend or database. Unsampled routes and components are represented only where the tree and README establish their role; edges use the shown imports or explicit documentation.

Main entry points: [`data/postcodes.ts`](https://github.com/nbnd/ausnzpostcode/blob/main/data/postcodes.ts) (Postcode data), [`app/au/postcode/[postcode]/page.tsx`](https://github.com/nbnd/ausnzpostcode/blob/main/app/au/postcode/%5Bpostcode%5D/page.tsx) (Postcode routes), [`components/PostcodeDetailPage.tsx`](https://github.com/nbnd/ausnzpostcode/blob/main/components/PostcodeDetailPage.tsx) (Postcode detail), [`app/page.tsx`](https://github.com/nbnd/ausnzpostcode/blob/main/app/page.tsx) (Homepage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_home["Homepage<br/>[page.tsx]"]
  node_search["Postcode search<br/>[page.tsx]"]
  node_search_ui["Search results<br/>[SearchResults.tsx]"]
  node_ev_page["EV chargers page<br/>[page.tsx]"]
  node_ev_map["EV charger map<br/>[EvChargersMap.tsx]"]
end

subgraph group_directories["Directories and details"]
  node_country_directories["Country directories"]
  node_browse_pages["Browse directories<br/>[BrowsePages.tsx]"]
  node_city_pages["City guides"]
  node_locality_details["Locality details"]
  node_postcode_routes["Postcode routes<br/>[page.tsx]"]
  node_postcode_detail["Postcode detail"]
end

subgraph group_data["Local data and places"]
  node_postcode_data["Postcode data<br/>[postcodes.ts]"]
  node_city_data["City guide data<br/>[city-pages.ts]"]
  node_poi_data["Nearby places data<br/>[poi-data.ts]"]
  node_poi_seo["Place SEO helpers<br/>[poi-seo.ts]"]
end

subgraph group_presentation["Shared presentation"]
  node_metadata["Page metadata<br/>[metadata.ts]"]
  node_schema["Structured data<br/>[schema.ts]"]
  node_breadcrumbs["Breadcrumbs<br/>[Breadcrumbs.tsx]"]
  node_jsonld["JSON-LD output<br/>[JsonLd.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_home
node_visitor -->|"searches"| node_search
node_home -->|"offers search"| node_search_ui
node_home -->|"loads guides"| node_city_data
node_home -->|"reads counts"| node_postcode_data
node_search -->|"renders"| node_search_ui
node_search_ui -->|"searches data"| node_postcode_data
node_country_directories -->|"reads listings"| node_postcode_data
node_country_directories -->|"loads guides"| node_city_data
node_browse_pages -->|"builds listings"| node_postcode_data
node_city_pages -.->|"uses guide definitions"| node_city_data
node_city_data -->|"filters records"| node_postcode_data
node_locality_details -.->|"uses directory data"| node_postcode_data
node_postcode_routes -->|"renders"| node_postcode_detail
node_postcode_routes -->|"loads records"| node_postcode_data
node_postcode_routes -->|"loads nearby places"| node_poi_data
node_postcode_routes -->|"builds place SEO"| node_poi_seo
node_postcode_detail -->|"renders record"| node_postcode_data
node_postcode_detail -->|"loads place results"| node_poi_data
node_postcode_detail -->|"formats place content"| node_poi_seo
node_ev_page -->|"renders map"| node_ev_map
node_ev_map -->|"uses postcode data"| node_postcode_data
node_ev_map -.->|"links map locations"| node_visitor
node_postcode_routes -->|"creates metadata"| node_metadata
node_postcode_routes -.->|"builds structured data"| node_schema
node_postcode_detail -->|"renders"| node_breadcrumbs
node_postcode_detail -->|"renders"| node_jsonld
node_schema -->|"formats place schema"| node_poi_seo
node_schema -->|"uses place types"| node_poi_data
node_search -->|"creates metadata"| node_metadata
node_search -->|"builds structured data"| node_schema

click node_home "https://github.com/nbnd/ausnzpostcode/blob/main/app/page.tsx"
click node_search "https://github.com/nbnd/ausnzpostcode/blob/main/app/search/page.tsx"
click node_search_ui "https://github.com/nbnd/ausnzpostcode/blob/main/components/SearchResults.tsx"
click node_country_directories "https://github.com/nbnd/ausnzpostcode/blob/main/components/CountryDirectoryPage.tsx"
click node_browse_pages "https://github.com/nbnd/ausnzpostcode/blob/main/components/BrowsePages.tsx"
click node_city_pages "https://github.com/nbnd/ausnzpostcode/blob/main/components/CityLandingPage.tsx"
click node_locality_details "https://github.com/nbnd/ausnzpostcode/blob/main/components/LocalityDetailPage.tsx"
click node_postcode_routes "https://github.com/nbnd/ausnzpostcode/blob/main/app/au/postcode/%5Bpostcode%5D/page.tsx"
click node_postcode_detail "https://github.com/nbnd/ausnzpostcode/blob/main/components/PostcodeDetailPage.tsx"
click node_ev_page "https://github.com/nbnd/ausnzpostcode/blob/main/app/ev-chargers/page.tsx"
click node_ev_map "https://github.com/nbnd/ausnzpostcode/blob/main/components/EvChargersMap.tsx"
click node_postcode_data "https://github.com/nbnd/ausnzpostcode/blob/main/data/postcodes.ts"
click node_city_data "https://github.com/nbnd/ausnzpostcode/blob/main/data/city-pages.ts"
click node_poi_data "https://github.com/nbnd/ausnzpostcode/blob/main/lib/poi-data.ts"
click node_poi_seo "https://github.com/nbnd/ausnzpostcode/blob/main/lib/poi-seo.ts"
click node_metadata "https://github.com/nbnd/ausnzpostcode/blob/main/lib/metadata.ts"
click node_schema "https://github.com/nbnd/ausnzpostcode/blob/main/lib/schema.ts"
click node_breadcrumbs "https://github.com/nbnd/ausnzpostcode/blob/main/components/Breadcrumbs.tsx"
click node_jsonld "https://github.com/nbnd/ausnzpostcode/blob/main/components/JsonLd.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_search,node_search_ui,node_ev_page,node_ev_map toneBlue
class node_country_directories,node_browse_pages,node_city_pages,node_locality_details,node_postcode_routes,node_postcode_detail toneAmber
class node_postcode_data,node_city_data,node_poi_data,node_poi_seo toneMint
class node_metadata,node_schema,node_breadcrumbs,node_jsonld toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [Homepage](https://github.com/nbnd/ausnzpostcode/blob/main/app/page.tsx): `app/page.tsx`
- [Postcode search](https://github.com/nbnd/ausnzpostcode/blob/main/app/search/page.tsx): `app/search/page.tsx`
- [Search results](https://github.com/nbnd/ausnzpostcode/blob/main/components/SearchResults.tsx): `components/SearchResults.tsx`
- [EV chargers page](https://github.com/nbnd/ausnzpostcode/blob/main/app/ev-chargers/page.tsx): `app/ev-chargers/page.tsx`
- [EV charger map](https://github.com/nbnd/ausnzpostcode/blob/main/components/EvChargersMap.tsx): `components/EvChargersMap.tsx`

### Directories and details

- [Country directories](https://github.com/nbnd/ausnzpostcode/blob/main/components/CountryDirectoryPage.tsx): `components/CountryDirectoryPage.tsx`
- [Browse directories](https://github.com/nbnd/ausnzpostcode/blob/main/components/BrowsePages.tsx): `components/BrowsePages.tsx`
- [City guides](https://github.com/nbnd/ausnzpostcode/blob/main/components/CityLandingPage.tsx): `components/CityLandingPage.tsx`
- [Locality details](https://github.com/nbnd/ausnzpostcode/blob/main/components/LocalityDetailPage.tsx): `components/LocalityDetailPage.tsx`
- [Postcode routes](https://github.com/nbnd/ausnzpostcode/blob/main/app/au/postcode/%5Bpostcode%5D/page.tsx): `app/au/postcode/[postcode]/page.tsx`
- [Postcode detail](https://github.com/nbnd/ausnzpostcode/blob/main/components/PostcodeDetailPage.tsx): `components/PostcodeDetailPage.tsx`

### Local data and places

- [Postcode data](https://github.com/nbnd/ausnzpostcode/blob/main/data/postcodes.ts): `data/postcodes.ts`
- [City guide data](https://github.com/nbnd/ausnzpostcode/blob/main/data/city-pages.ts): `data/city-pages.ts`
- [Nearby places data](https://github.com/nbnd/ausnzpostcode/blob/main/lib/poi-data.ts): `lib/poi-data.ts`
- [Place SEO helpers](https://github.com/nbnd/ausnzpostcode/blob/main/lib/poi-seo.ts): `lib/poi-seo.ts`

### Shared presentation

- [Page metadata](https://github.com/nbnd/ausnzpostcode/blob/main/lib/metadata.ts): `lib/metadata.ts`
- [Structured data](https://github.com/nbnd/ausnzpostcode/blob/main/lib/schema.ts): `lib/schema.ts`
- [Breadcrumbs](https://github.com/nbnd/ausnzpostcode/blob/main/components/Breadcrumbs.tsx): `components/Breadcrumbs.tsx`
- [JSON-LD output](https://github.com/nbnd/ausnzpostcode/blob/main/components/JsonLd.tsx): `components/JsonLd.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Homepage: opens (evidence: `app/page.tsx`)
- Visitor → Postcode search: searches (evidence: `app/search/page.tsx`)
- Homepage → Search results: offers search (evidence: `app/page.tsx`)
- Homepage → City guide data: loads guides (evidence: `app/page.tsx`)
- Homepage → Postcode data: reads counts (evidence: `app/page.tsx`)
- Postcode search → Search results: renders (evidence: `app/search/page.tsx`)
- Search results → Postcode data: searches data (evidence: `components/SearchResults.tsx`)
- Country directories → Postcode data: reads listings (evidence: `components/CountryDirectoryPage.tsx`)
- Country directories → City guide data: loads guides (evidence: `components/CountryDirectoryPage.tsx`)
- Browse directories → Postcode data: builds listings (evidence: `components/BrowsePages.tsx`)
- City guides → City guide data: uses guide definitions
- City guide data → Postcode data: filters records (evidence: `data/city-pages.ts`)
- Locality details → Postcode data: uses directory data
- Postcode routes → Postcode detail: renders (evidence: `app/au/postcode/[postcode]/page.tsx`)
- Postcode routes → Postcode data: loads records (evidence: `app/au/postcode/[postcode]/page.tsx`)
- Postcode routes → Nearby places data: loads nearby places (evidence: `app/au/postcode/[postcode]/page.tsx`)
- Postcode routes → Place SEO helpers: builds place SEO (evidence: `app/au/postcode/[postcode]/page.tsx`)
- Postcode detail → Postcode data: renders record (evidence: `components/PostcodeDetailPage.tsx`)
- Postcode detail → Nearby places data: loads place results (evidence: `components/PostcodeDetailPage.tsx`)
- Postcode detail → Place SEO helpers: formats place content (evidence: `components/PostcodeDetailPage.tsx`)
- EV chargers page → EV charger map: renders map (evidence: `app/ev-chargers/page.tsx`)
- EV charger map → Postcode data: uses postcode data (evidence: `components/EvChargersMap.tsx`)
- EV charger map → Visitor: links map locations
- Postcode routes → Page metadata: creates metadata (evidence: `app/au/postcode/[postcode]/page.tsx`)
- Postcode routes → Structured data: builds structured data
- Postcode detail → Breadcrumbs: renders (evidence: `components/PostcodeDetailPage.tsx`)
- Postcode detail → JSON-LD output: renders (evidence: `components/PostcodeDetailPage.tsx`)
- Structured data → Place SEO helpers: formats place schema (evidence: `lib/schema.ts`)
- Structured data → Nearby places data: uses place types (evidence: `lib/schema.ts`)
- Postcode search → Page metadata: creates metadata (evidence: `app/search/page.tsx`)
- Postcode search → Structured data: builds structured data (evidence: `app/search/page.tsx`)
