# opensourcefellows/map_dashboard_hackathon architecture

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

- Interactive diagram: https://gitdiagram.com/opensourcefellows/map_dashboard_hackathon
- Repository: https://github.com/opensourcefellows/map_dashboard_hackathon

## Overview

Map Dashboard is a React frontend for viewing environmental geospatial layers. A visitor enters the routed app, lands on the map, and sees GeoJSON collections loaded from public fixtures; they can toggle layer visibility and navigate to project, admin, or account pages. The internal structure separates app routing/state, map presentation, data loading, and supporting domain types. The README also documents dark mode and a legend, and the tree includes a QGIS loader. Some of these supporting modules were not excerpted, so their runtime connections are not asserted.

Main entry points: [`src/App.tsx`](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/App.tsx) (App Routes and State), [`src/data/fixture-reader.ts`](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/data/fixture-reader.ts) (Fixture Reader), [`src/types/map.ts`](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/types/map.ts) (Map Types), [`src/components/Map/MapContainer.tsx`](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/MapContainer.tsx) (Map Display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Navigation"]
  node_entry["Theme and Router Entry<br/>[main.tsx]"]
  node_app["App Routes and State<br/>[App.tsx]"]
  node_sidenav["Side Navigation<br/>[SideNav.tsx]"]
end

subgraph group_mapping["Map Experience"]
  node_map["Map Display<br/>[MapContainer.tsx]"]
  node_layer["GeoJSON Layer<br/>[Layer.tsx]"]
  node_controls["Layer Controls<br/>[LayerControls.tsx]"]
  node_legend["Map Legend<br/>[MapLegend.tsx]"]
end

subgraph group_data["Data and Types"]
  node_fixture_reader["Fixture Reader<br/>[fixture-reader.ts]"]
  node_fixtures["GeoJSON Fixtures"]
  node_geometry["Geometry Types<br/>[geometry.ts]"]
  node_map_types["Map Types<br/>[map.ts]"]
  node_qgis["QGIS Data Loader<br/>[qgisDataLoader.ts]"]
  node_mock["Mock Map Data<br/>[mockData.ts]"]
  node_map_hook["Map Data Hook<br/>[useMapData.ts]"]
  node_fixture_hook["Fixture Loader Hook<br/>[fixture-loader.ts]"]
end

subgraph group_pages["Other Pages"]
  node_projects["Projects Page<br/>[ProjectsPage.tsx]"]
  node_admin["Admin Page<br/>[AdminPage.tsx]"]
  node_account["Account Page<br/>[AccountPage.tsx]"]
  node_notfound["Not Found Page<br/>[NotFoundPage.tsx]"]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_sidenav
node_sidenav -->|"navigates routes"| node_app
node_app -->|"loads collections"| node_fixture_reader
node_fixture_reader -->|"fetches GeoJSON"| node_fixtures
node_app -->|"renders visible layers"| node_map
node_app -->|"passes visibility state"| node_controls
node_map -->|"renders features"| node_layer
node_map -->|"uses geometry types"| node_geometry
node_layer -->|"uses geometry types"| node_geometry
node_controls -->|"uses visibility type"| node_map_types
node_fixture_reader -->|"returns collections"| node_geometry
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_notfound
node_map_hook -->|"uses map types"| node_map_types
node_mock -->|"uses map types"| node_map_types
node_fixture_hook -->|"uses reader"| node_fixture_reader
node_qgis -->|"uses map types"| node_map_types

click node_entry "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/main.tsx"
click node_app "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/App.tsx"
click node_sidenav "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Layout/SideNav.tsx"
click node_map "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/MapContainer.tsx"
click node_layer "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/Layer.tsx"
click node_controls "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/LayerControls.tsx"
click node_legend "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/MapLegend.tsx"
click node_fixture_reader "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/data/fixture-reader.ts"
click node_fixtures "https://github.com/opensourcefellows/map_dashboard_hackathon/tree/main/public/fixtures"
click node_geometry "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/types/geometry.ts"
click node_map_types "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/types/map.ts"
click node_qgis "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/utils/qgisDataLoader.ts"
click node_mock "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/data/mockData.ts"
click node_map_hook "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/hooks/useMapData.ts"
click node_fixture_hook "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/hooks/fixture-loader.ts"
click node_projects "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/ProjectsPage.tsx"
click node_admin "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/AdminPage.tsx"
click node_account "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/AccountPage.tsx"
click node_notfound "https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/NotFoundPage.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_entry,node_app,node_sidenav toneBlue
class node_map,node_layer,node_controls,node_legend toneAmber
class node_fixture_reader,node_fixtures,node_geometry,node_map_types,node_qgis,node_mock,node_map_hook,node_fixture_hook toneMint
class node_projects,node_admin,node_account,node_notfound toneRose
class node_visitor toneIndigo
```

## Components

### App and Navigation

- [Theme and Router Entry](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/main.tsx): `src/main.tsx`
- [App Routes and State](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/App.tsx): `src/App.tsx`
- [Side Navigation](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Layout/SideNav.tsx): `src/components/Layout/SideNav.tsx`

### Map Experience

- [Map Display](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/MapContainer.tsx): `src/components/Map/MapContainer.tsx`
- [GeoJSON Layer](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/Layer.tsx): `src/components/Map/Layer.tsx`
- [Layer Controls](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/LayerControls.tsx): `src/components/Map/LayerControls.tsx`
- [Map Legend](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/components/Map/MapLegend.tsx): `src/components/Map/MapLegend.tsx`

### Data and Types

- [Fixture Reader](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/data/fixture-reader.ts): `src/data/fixture-reader.ts`
- [GeoJSON Fixtures](https://github.com/opensourcefellows/map_dashboard_hackathon/tree/main/public/fixtures): `public/fixtures`
- [Geometry Types](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/types/geometry.ts): `src/types/geometry.ts`
- [Map Types](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/types/map.ts): `src/types/map.ts`
- [QGIS Data Loader](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/utils/qgisDataLoader.ts): `src/utils/qgisDataLoader.ts`
- [Mock Map Data](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Map Data Hook](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/hooks/useMapData.ts): `src/hooks/useMapData.ts`
- [Fixture Loader Hook](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/hooks/fixture-loader.ts): `src/hooks/fixture-loader.ts`

### Other Pages

- [Projects Page](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/ProjectsPage.tsx): `src/pages/ProjectsPage.tsx`
- [Admin Page](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/AdminPage.tsx): `src/pages/AdminPage.tsx`
- [Account Page](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/AccountPage.tsx): `src/pages/AccountPage.tsx`
- [Not Found Page](https://github.com/opensourcefellows/map_dashboard_hackathon/blob/main/src/pages/NotFoundPage.tsx): `src/pages/NotFoundPage.tsx`

### Other components

- **Visitor**

## Connections

- Visitor → Theme and Router Entry: opens app
- Theme and Router Entry → App Routes and State: renders (evidence: `src/main.tsx`)
- App Routes and State → Side Navigation: renders (evidence: `src/App.tsx`)
- Side Navigation → App Routes and State: navigates routes (evidence: `src/components/Layout/SideNav.tsx`)
- App Routes and State → Fixture Reader: loads collections (evidence: `src/App.tsx`)
- Fixture Reader → GeoJSON Fixtures: fetches GeoJSON (evidence: `src/data/fixture-reader.ts`)
- App Routes and State → Map Display: renders visible layers (evidence: `src/App.tsx`)
- App Routes and State → Layer Controls: passes visibility state (evidence: `src/App.tsx`)
- Map Display → GeoJSON Layer: renders features (evidence: `src/components/Map/MapContainer.tsx`)
- Map Display → Geometry Types: uses geometry types (evidence: `src/components/Map/MapContainer.tsx`)
- GeoJSON Layer → Geometry Types: uses geometry types (evidence: `src/components/Map/Layer.tsx`)
- Layer Controls → Map Types: uses visibility type (evidence: `src/components/Map/LayerControls.tsx`)
- Fixture Reader → Geometry Types: returns collections (evidence: `src/data/fixture-reader.ts`)
- App Routes and State → Projects Page: routes to (evidence: `src/App.tsx`)
- App Routes and State → Admin Page: routes to (evidence: `src/App.tsx`)
- App Routes and State → Account Page: routes to (evidence: `src/App.tsx`)
- App Routes and State → Not Found Page: routes to (evidence: `src/App.tsx`)
- Map Data Hook → Map Types: uses map types (evidence: `src/hooks/useMapData.ts`)
- Mock Map Data → Map Types: uses map types (evidence: `src/data/mockData.ts`)
- Fixture Loader Hook → Fixture Reader: uses reader (evidence: `src/hooks/fixture-loader.ts`)
- QGIS Data Loader → Map Types: uses map types (evidence: `src/utils/qgisDataLoader.ts`)
