# github-nqvnlc/windify-gis architecture

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

- Interactive diagram: https://gitdiagram.com/github-nqvnlc/windify-gis
- Repository: https://github.com/github-nqvnlc/windify-gis

## Overview

Windify GIS is a TypeScript GIS mapping package exposing a unified engine API and a declarative React wrapper over Leaflet. The main workflow is an application rendering a map, then adding GeoJSON layers, markers or clusters, and popups through React children or engine methods; tile basemaps and normalized events support that workflow. The graph includes the shared engine/event layer and spatial helpers. Several implementation relationships are based on the README or source-index references; unsampled behavior is not asserted as a confirmed call.

Main entry points: [`src/core/leaflet/WindifyLeaflet.ts`](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/leaflet/WindifyLeaflet.ts) (Leaflet adapter), [`src/react/WindifyMap.tsx`](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMap.tsx) (WindifyMap), [`src/react/useWindifyMap.ts`](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/useWindifyMap.ts) (Map context hook), [`src/react/WindifyMarker.tsx`](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMarker.tsx) (Marker component)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_react["React interface"]
  node_map["WindifyMap<br/>[WindifyMap.tsx]"]
  node_context["Map context hook<br/>[useWindifyMap.ts]"]
  node_geojsx["GeoJSON component<br/>[WindifyGeoJSON.tsx]"]
  node_markerjsx["Marker component<br/>[WindifyMarker.tsx]"]
  node_popupjsx["Popup component<br/>[WindifyPopup.tsx]"]
  node_markercontext["Marker context"]
end

subgraph group_engine["Map engine"]
  node_abstract["Engine contract"]
  node_leaflet["Leaflet adapter<br/>[WindifyLeaflet.ts]"]
  node_events["Event emitter"]
  node_types["Typed map API<br/>[types.ts]"]
end

subgraph group_geo["GIS data"]
  node_geojson["GeoJSON loader<br/>[geojson.ts]"]
  node_spatial["Spatial utilities<br/>[spatial.ts]"]
end

subgraph group_config["Map configuration"]
  node_tiles["Tile catalog<br/>[map-tiles.ts]"]
  node_defaults["Map defaults<br/>[map-defaults.ts]"]
end

node_developer(("Application developer"))
node_tileprovider[("Tile providers")]
node_geosource[("Remote GeoJSON source")]

node_developer -->|"renders"| node_map
node_map -->|"loads dynamically"| node_leaflet
node_map -->|"provides state"| node_context
node_map -->|"resolves basemaps"| node_tiles
node_geojsx -->|"reads engine"| node_context
node_geojsx -->|"adds layers"| node_leaflet
node_geosource -.->|"serves GeoJSON"| node_geojson
node_leaflet -->|"loads data"| node_geojson
node_markerjsx -->|"reads engine"| node_context
node_markerjsx -->|"uses context"| node_markercontext
node_markerjsx -.->|"adds markers"| node_leaflet
node_popupjsx -->|"reads engine"| node_context
node_popupjsx -->|"uses context"| node_markercontext
node_popupjsx -.->|"adds popups"| node_leaflet
node_leaflet -->|"extends"| node_abstract
node_abstract -->|"delegates events"| node_events
node_abstract -->|"implements API"| node_types
node_leaflet -->|"uses options"| node_types
node_defaults -->|"selects default"| node_tiles
node_tiles -->|"references tiles"| node_tileprovider
node_spatial -->|"uses GeoJSON types"| node_types

click node_map "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMap.tsx"
click node_context "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/useWindifyMap.ts"
click node_geojsx "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyGeoJSON.tsx"
click node_markerjsx "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMarker.tsx"
click node_popupjsx "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyPopup.tsx"
click node_markercontext "https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMarkerContext.ts"
click node_abstract "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/AbstractWindifyEngine.ts"
click node_leaflet "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/leaflet/WindifyLeaflet.ts"
click node_events "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/events/WindifyEventEmitter.ts"
click node_types "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/types.ts"
click node_geojson "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/geojson.ts"
click node_spatial "https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/spatial.ts"
click node_tiles "https://github.com/github-nqvnlc/windify-gis/blob/main/src/constants/map-tiles.ts"
click node_defaults "https://github.com/github-nqvnlc/windify-gis/blob/main/src/constants/map-defaults.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_map,node_context,node_geojsx,node_markerjsx,node_popupjsx,node_markercontext toneBlue
class node_abstract,node_leaflet,node_events,node_types,node_tileprovider,node_geosource toneAmber
class node_geojson,node_spatial toneMint
class node_tiles,node_defaults toneRose
class node_developer toneIndigo
```

## Components

### React interface

- [WindifyMap](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMap.tsx): `src/react/WindifyMap.tsx`
- [Map context hook](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/useWindifyMap.ts): `src/react/useWindifyMap.ts`
- [GeoJSON component](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyGeoJSON.tsx): `src/react/WindifyGeoJSON.tsx`
- [Marker component](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMarker.tsx): `src/react/WindifyMarker.tsx`
- [Popup component](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyPopup.tsx): `src/react/WindifyPopup.tsx`
- [Marker context](https://github.com/github-nqvnlc/windify-gis/blob/main/src/react/WindifyMarkerContext.ts): `src/react/WindifyMarkerContext.ts`

### Map engine

- [Engine contract](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/AbstractWindifyEngine.ts): `src/core/AbstractWindifyEngine.ts`
- [Leaflet adapter](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/leaflet/WindifyLeaflet.ts): `src/core/leaflet/WindifyLeaflet.ts`
- [Event emitter](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/events/WindifyEventEmitter.ts): `src/core/events/WindifyEventEmitter.ts`
- [Typed map API](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/types.ts): `src/core/types.ts`

### GIS data

- [GeoJSON loader](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/geojson.ts): `src/core/geojson.ts`
- [Spatial utilities](https://github.com/github-nqvnlc/windify-gis/blob/main/src/core/spatial.ts): `src/core/spatial.ts`

### Map configuration

- [Tile catalog](https://github.com/github-nqvnlc/windify-gis/blob/main/src/constants/map-tiles.ts): `src/constants/map-tiles.ts`
- [Map defaults](https://github.com/github-nqvnlc/windify-gis/blob/main/src/constants/map-defaults.ts): `src/constants/map-defaults.ts`

### Other components

- **Application developer**
- **Tile providers**
- **Remote GeoJSON source**

## Connections

- Application developer → WindifyMap: renders (evidence: `README.md`)
- WindifyMap → Leaflet adapter: loads dynamically (evidence: `src/react/WindifyMap.tsx`)
- WindifyMap → Map context hook: provides state (evidence: `src/react/WindifyMap.tsx`)
- WindifyMap → Tile catalog: resolves basemaps (evidence: `src/react/WindifyMap.tsx`)
- GeoJSON component → Map context hook: reads engine (evidence: `src/react/WindifyGeoJSON.tsx`)
- GeoJSON component → Leaflet adapter: adds layers (evidence: `src/react/WindifyGeoJSON.tsx`)
- Remote GeoJSON source → GeoJSON loader: serves GeoJSON (evidence: `README.md`)
- Leaflet adapter → GeoJSON loader: loads data (evidence: `src/core/leaflet/WindifyLeaflet.ts`)
- Marker component → Map context hook: reads engine (evidence: `src/react/WindifyMarker.tsx`)
- Marker component → Marker context: uses context (evidence: `src/react/WindifyMarker.tsx`)
- Marker component → Leaflet adapter: adds markers
- Popup component → Map context hook: reads engine (evidence: `src/react/WindifyPopup.tsx`)
- Popup component → Marker context: uses context (evidence: `src/react/WindifyPopup.tsx`)
- Popup component → Leaflet adapter: adds popups
- Leaflet adapter → Engine contract: extends (evidence: `src/core/leaflet/WindifyLeaflet.ts`)
- Engine contract → Event emitter: delegates events (evidence: `src/core/AbstractWindifyEngine.ts`)
- Engine contract → Typed map API: implements API (evidence: `src/core/AbstractWindifyEngine.ts`)
- Leaflet adapter → Typed map API: uses options (evidence: `src/core/leaflet/WindifyLeaflet.ts`)
- Map defaults → Tile catalog: selects default (evidence: `src/constants/map-defaults.ts`)
- Tile catalog → Tile providers: references tiles (evidence: `src/constants/map-tiles.ts`)
- Spatial utilities → Typed map API: uses GeoJSON types (evidence: `src/core/spatial.ts`)
