# sanjayjosephm/cool_grid_hack_fusion architecture

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

- Interactive diagram: https://gitdiagram.com/sanjayjosephm/cool_grid_hack_fusion
- Repository: https://github.com/sanjayjosephm/cool_grid_hack_fusion

## Overview

CoolGrid is a decision-support prototype for local-government heatwave and relief planning. Planners explore area and facility evidence, compare arrangements under heat, outage and flood-access scenarios, enter crew limits, and review allocations, gaps and dependencies; they can then open a printable brief. Separate branches provide the planning map, resident cards, and methodology and validation views. The graph follows documented imports and README capabilities; unsampled subsystems are represented at supported directory paths, and their internal links are not inferred.

Main entry points: [`app/validation/page.tsx`](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/validation/page.tsx) (Validation view), [`lib/demo-review.ts`](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/demo-review.ts) (Demo review orchestration), [`lib/continuity.ts`](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/continuity.ts) (Review entry points), [`components/ContinuityLab.tsx`](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ContinuityLab.tsx) (Continuity Lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Planner experience"]
  node_overview["Project overview<br/>[page.tsx]"]
  node_map_page["Planning map page<br/>[page.tsx]"]
  node_dashboard["Map interface<br/>[Dashboard.tsx]"]
  node_planning_map["Planning map<br/>[PlanningMap.tsx]"]
  node_lab_page["Continuity page<br/>[page.tsx]"]
  node_lab["Continuity Lab<br/>[ContinuityLab.tsx]"]
  node_results["Scenario results"]
  node_brief_page["Review brief page<br/>[page.tsx]"]
  node_resident_page["Resident page<br/>[page.tsx]"]
  node_resident_card["Resident card<br/>[ResidentCard.tsx]"]
  node_methodology["Methods and evidence<br/>[page.tsx]"]
  node_validation["Validation view<br/>[page.tsx]"]
end

subgraph group_planning["Planning evidence"]
  node_context_data["Area context<br/>[area-context.ts]"]
  node_planning_data["Planning data<br/>[planning-data.ts]"]
  node_source_labels["Evidence labels<br/>[sourced.ts]"]
  node_datasets["Study-area datasets"]
  node_resident_text["Resident text<br/>[resident-text.ts]"]
end

subgraph group_review["Continuity review engine"]
  node_planner_config["Planner configuration<br/>[planner-config.ts]"]
  node_demo_review["Demo review orchestration<br/>[demo-review.ts]"]
  node_backup["Backup assessment<br/>[backup.ts]"]
  node_review_api["Review API route<br/>[route.ts]"]
  node_continuity["Review entry points<br/>[continuity.ts]"]
  node_adapter["Packet adapter<br/>[review-adapter.ts]"]
  node_validation_engine["Packet validation"]
  node_contract["Review contract<br/>[review-contract.ts]"]
  node_allocation["Allocation engine"]
end

subgraph group_support["Review and assurance"]
  node_brief_engine["Brief renderer<br/>[brief.ts]"]
  node_data_checks["Planning data checks"]
  node_backup_cases["Backup cases<br/>[backup-cases.ts]"]
end

node_planner(("Local planner"))
node_tiles["Map tile service"]

node_planner -->|"opens"| node_overview
node_planner -->|"explores areas"| node_map_page
node_planner -->|"compares scenarios"| node_lab_page
node_planner -->|"reviews brief"| node_brief_page
node_planner -->|"views resident card"| node_resident_page
node_planner -->|"checks methods"| node_methodology
node_planner -->|"checks validation"| node_validation
node_map_page -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_planning_map
node_planning_map -->|"reads"| node_planning_data
node_planning_map -.->|"loads basemap"| node_tiles
node_lab_page -->|"renders"| node_lab
node_lab_page -->|"parses settings"| node_planner_config
node_lab -->|"runs review"| node_demo_review
node_lab -->|"updates settings"| node_planner_config
node_lab -->|"shows context"| node_context_data
node_lab -->|"shows backup check"| node_backup
node_lab -->|"renders"| node_results
node_results -->|"uses review types"| node_continuity
node_brief_page -->|"loads review"| node_demo_review
node_brief_page -->|"renders results"| node_results
node_brief_page -->|"reads settings"| node_planner_config
node_resident_page -->|"renders"| node_resident_card
node_resident_page -->|"reads area data"| node_planning_data
node_resident_card -->|"uses text"| node_resident_text
node_methodology -->|"explains context"| node_context_data
node_methodology -->|"explains backup"| node_backup
node_validation -->|"runs checks"| node_data_checks
node_validation -->|"runs sensitivity"| node_context_data
node_validation -->|"checks backup"| node_backup
node_validation -->|"checks cases"| node_backup_cases
node_validation -->|"checks packets"| node_continuity
node_validation -->|"checks demo review"| node_demo_review
node_planning_data -->|"loads"| node_datasets
node_planning_data -->|"types evidence"| node_source_labels
node_context_data -->|"reads"| node_planning_data
node_demo_review -->|"assesses backup"| node_backup
node_demo_review -->|"builds and reviews packet"| node_continuity
node_demo_review -->|"renders brief"| node_brief_engine
node_demo_review -->|"reads planning facts"| node_planning_data
node_backup -->|"checks evidence"| node_source_labels
node_review_api -->|"uses review"| node_continuity
node_review_api -->|"uses brief"| node_brief_engine
node_continuity -->|"exports adapter"| node_adapter
node_continuity -->|"validates packet"| node_validation_engine
node_continuity -->|"allocates review"| node_allocation
node_adapter -->|"joins catalogue"| node_datasets
node_adapter -->|"validates packet"| node_validation_engine

click node_overview "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/page.tsx"
click node_map_page "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/dashboard/page.tsx"
click node_dashboard "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/Dashboard.tsx"
click node_planning_map "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/PlanningMap.tsx"
click node_lab_page "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/continuity/page.tsx"
click node_lab "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ContinuityLab.tsx"
click node_results "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ScenarioResults.tsx"
click node_brief_page "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/brief/page.tsx"
click node_resident_page "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/resident/%5Bid%5D/page.tsx"
click node_resident_card "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ResidentCard.tsx"
click node_methodology "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/methodology/page.tsx"
click node_validation "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/validation/page.tsx"
click node_context_data "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/area-context.ts"
click node_planning_data "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planning-data.ts"
click node_source_labels "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/sourced.ts"
click node_datasets "https://github.com/sanjayjosephm/cool_grid_hack_fusion/tree/main/lib/data"
click node_resident_text "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/resident-text.ts"
click node_planner_config "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planner-config.ts"
click node_demo_review "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/demo-review.ts"
click node_backup "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/backup.ts"
click node_review_api "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/api/continuity/review/route.ts"
click node_continuity "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/continuity.ts"
click node_adapter "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-adapter.ts"
click node_validation_engine "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-validation.ts"
click node_contract "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-contract.ts"
click node_allocation "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-allocation.ts"
click node_brief_engine "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/brief.ts"
click node_data_checks "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planning-validation.ts"
click node_backup_cases "https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/backup-cases.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_overview,node_map_page,node_dashboard,node_planning_map,node_lab_page,node_lab,node_results,node_brief_page,node_resident_page,node_resident_card,node_methodology,node_validation toneBlue
class node_context_data,node_planning_data,node_source_labels,node_datasets,node_resident_text toneAmber
class node_planner_config,node_demo_review,node_backup,node_review_api,node_continuity,node_adapter,node_validation_engine,node_contract,node_allocation toneMint
class node_brief_engine,node_data_checks,node_backup_cases toneRose
class node_planner,node_tiles toneIndigo
```

## Components

### Planner experience

- [Project overview](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/page.tsx): `app/page.tsx`
- [Planning map page](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/dashboard/page.tsx): `app/dashboard/page.tsx`
- [Map interface](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/Dashboard.tsx): `components/Dashboard.tsx`
- [Planning map](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/PlanningMap.tsx): `components/PlanningMap.tsx`
- [Continuity page](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/continuity/page.tsx): `app/continuity/page.tsx`
- [Continuity Lab](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ContinuityLab.tsx): `components/ContinuityLab.tsx`
- [Scenario results](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ScenarioResults.tsx): `components/ScenarioResults.tsx`
- [Review brief page](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/brief/page.tsx): `app/brief/page.tsx`
- [Resident page](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/resident/%5Bid%5D/page.tsx): `app/resident/[id]/page.tsx`
- [Resident card](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/components/ResidentCard.tsx): `components/ResidentCard.tsx`
- [Methods and evidence](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/methodology/page.tsx): `app/methodology/page.tsx`
- [Validation view](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/validation/page.tsx): `app/validation/page.tsx`

### Planning evidence

- [Area context](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/area-context.ts): `lib/area-context.ts`
- [Planning data](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planning-data.ts): `lib/planning-data.ts`
- [Evidence labels](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/sourced.ts): `lib/sourced.ts`
- [Study-area datasets](https://github.com/sanjayjosephm/cool_grid_hack_fusion/tree/main/lib/data): `lib/data`
- [Resident text](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/resident-text.ts): `lib/resident-text.ts`

### Continuity review engine

- [Planner configuration](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planner-config.ts): `lib/planner-config.ts`
- [Demo review orchestration](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/demo-review.ts): `lib/demo-review.ts`
- [Backup assessment](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/backup.ts): `lib/backup.ts`
- [Review API route](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/app/api/continuity/review/route.ts): `app/api/continuity/review/route.ts`
- [Review entry points](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/continuity.ts): `lib/continuity.ts`
- [Packet adapter](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-adapter.ts): `lib/review-adapter.ts`
- [Packet validation](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-validation.ts): `lib/review-validation.ts`
- [Review contract](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-contract.ts): `lib/review-contract.ts`
- [Allocation engine](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/review-allocation.ts): `lib/review-allocation.ts`

### Review and assurance

- [Brief renderer](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/brief.ts): `lib/brief.ts`
- [Planning data checks](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/planning-validation.ts): `lib/planning-validation.ts`
- [Backup cases](https://github.com/sanjayjosephm/cool_grid_hack_fusion/blob/main/lib/backup-cases.ts): `lib/backup-cases.ts`

### Other components

- **Local planner**
- **Map tile service**

## Connections

- Local planner → Project overview: opens (evidence: `README.md`)
- Local planner → Planning map page: explores areas (evidence: `README.md`)
- Local planner → Continuity page: compares scenarios (evidence: `README.md`)
- Local planner → Review brief page: reviews brief (evidence: `README.md`)
- Local planner → Resident page: views resident card (evidence: `README.md`)
- Local planner → Methods and evidence: checks methods (evidence: `README.md`)
- Local planner → Validation view: checks validation (evidence: `README.md`)
- Planning map page → Map interface: renders (evidence: `app/dashboard/page.tsx`)
- Map interface → Planning map: renders (evidence: `components/Dashboard.tsx`)
- Planning map → Planning data: reads (evidence: `components/PlanningMap.tsx`)
- Planning map → Map tile service: loads basemap (evidence: `README.md`)
- Continuity page → Continuity Lab: renders (evidence: `app/continuity/page.tsx`)
- Continuity page → Planner configuration: parses settings (evidence: `app/continuity/page.tsx`)
- Continuity Lab → Demo review orchestration: runs review (evidence: `components/ContinuityLab.tsx`)
- Continuity Lab → Planner configuration: updates settings (evidence: `components/ContinuityLab.tsx`)
- Continuity Lab → Area context: shows context (evidence: `components/ContinuityLab.tsx`)
- Continuity Lab → Backup assessment: shows backup check (evidence: `components/ContinuityLab.tsx`)
- Continuity Lab → Scenario results: renders (evidence: `components/ContinuityLab.tsx`)
- Scenario results → Review entry points: uses review types (evidence: `components/ScenarioResults.tsx`)
- Review brief page → Demo review orchestration: loads review (evidence: `app/brief/page.tsx`)
- Review brief page → Scenario results: renders results (evidence: `app/brief/page.tsx`)
- Review brief page → Planner configuration: reads settings (evidence: `app/brief/page.tsx`)
- Resident page → Resident card: renders (evidence: `app/resident/[id]/page.tsx`)
- Resident page → Planning data: reads area data (evidence: `app/resident/[id]/page.tsx`)
- Resident card → Resident text: uses text (evidence: `components/ResidentCard.tsx`)
- Methods and evidence → Area context: explains context (evidence: `app/methodology/page.tsx`)
- Methods and evidence → Backup assessment: explains backup (evidence: `app/methodology/page.tsx`)
- Validation view → Planning data checks: runs checks (evidence: `app/validation/page.tsx`)
- Validation view → Area context: runs sensitivity (evidence: `app/validation/page.tsx`)
- Validation view → Backup assessment: checks backup (evidence: `app/validation/page.tsx`)
- Validation view → Backup cases: checks cases (evidence: `app/validation/page.tsx`)
- Validation view → Review entry points: checks packets (evidence: `app/validation/page.tsx`)
- Validation view → Demo review orchestration: checks demo review (evidence: `app/validation/page.tsx`)
- Planning data → Study-area datasets: loads (evidence: `lib/planning-data.ts`)
- Planning data → Evidence labels: types evidence (evidence: `lib/planning-data.ts`)
- Area context → Planning data: reads (evidence: `lib/area-context.ts`)
- Demo review orchestration → Backup assessment: assesses backup (evidence: `lib/demo-review.ts`)
- Demo review orchestration → Review entry points: builds and reviews packet (evidence: `lib/demo-review.ts`)
- Demo review orchestration → Brief renderer: renders brief (evidence: `lib/demo-review.ts`)
- Demo review orchestration → Planning data: reads planning facts (evidence: `lib/demo-review.ts`)
- Backup assessment → Evidence labels: checks evidence (evidence: `lib/backup.ts`)
- Review API route → Review entry points: uses review (evidence: `app/api/continuity/review/route.ts`)
- Review API route → Brief renderer: uses brief (evidence: `app/api/continuity/review/route.ts`)
- Review entry points → Packet adapter: exports adapter (evidence: `lib/continuity.ts`)
- Review entry points → Packet validation: validates packet (evidence: `lib/continuity.ts`)
- Review entry points → Allocation engine: allocates review (evidence: `lib/continuity.ts`)
- Packet adapter → Study-area datasets: joins catalogue (evidence: `lib/review-adapter.ts`)
- Packet adapter → Packet validation: validates packet (evidence: `lib/review-adapter.ts`)
