# devorld/react-grid architecture

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

- Interactive diagram: https://gitdiagram.com/devorld/react-grid
- Repository: https://github.com/devorld/react-grid

## Overview

Sandbox is a small monorepo centered on a Next.js React/Leaflet web app: users can view a map, load WFS features, select regions for details, and view a separate sample grid. The README also documents API, fake-API, documentation, and bot apps, but their implementations are mostly absent from this tree. The map-to-WFS route and map interactions are visible in excerpts; backend details and several app relationships remain unverified.

Main entry points: [`apps/web/src/pages/map/ui/MapView.tsx`](https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/MapView.tsx) (Interactive map), [`apps/web/app/map/page.tsx`](https://github.com/devorld/react-grid/blob/main/apps/web/app/map/page.tsx) (Map route), [`apps/web/src/pages/map/ui/map.tsx`](https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/map.tsx) (Map page), [`apps/web/app/api/wfs/route.ts`](https://github.com/devorld/react-grid/blob/main/apps/web/app/api/wfs/route.ts) (WFS API route)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_map_route["Map route<br/>[page.tsx]"]
  node_map_page["Map page<br/>[map.tsx]"]
  node_map_view["Interactive map<br/>[MapView.tsx]"]
  node_map_types["Map data types"]
  node_wfs_route["WFS API route<br/>[route.ts]"]
  node_wfs_client["WFS client<br/>[index.ts]"]
  node_grid_route["Grid route<br/>[page.tsx]"]
  node_grid_page["Sample grid<br/>[grid.tsx]"]
  node_status_route["Status endpoint<br/>[route.ts]"]
end

subgraph group_services["Service apps"]
  node_api_app["API app"]
  node_fake_api["Fake API<br/>[index.mts]"]
  node_bot_app["Bot app"]
end

subgraph group_docs["Documentation"]
  node_docs_app["Docs app<br/>[page.tsx]"]
end

subgraph group_shared["Shared UI"]
  node_ui_components["UI components"]
end

node_visitor(("Visitor"))
node_wms["WMS tile service"]

node_visitor -->|"opens map"| node_map_route
node_map_route -->|"renders"| node_map_page
node_map_page -->|"exports"| node_map_view
node_map_view -->|"fetches features"| node_wfs_route
node_wfs_route -->|"fetches data"| node_wfs_client
node_map_view -->|"uses types"| node_map_types
node_map_view -->|"loads map tiles"| node_wms
node_visitor -.->|"opens grid"| node_grid_route
node_grid_route -->|"exports"| node_grid_page
node_visitor -.->|"requests status"| node_status_route

click node_map_route "https://github.com/devorld/react-grid/blob/main/apps/web/app/map/page.tsx"
click node_map_page "https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/map.tsx"
click node_map_view "https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/MapView.tsx"
click node_map_types "https://github.com/devorld/react-grid/tree/main/apps/web/src/pages/map/model/types"
click node_wfs_route "https://github.com/devorld/react-grid/blob/main/apps/web/app/api/wfs/route.ts"
click node_wfs_client "https://github.com/devorld/react-grid/blob/main/apps/web/src/shared/api/wfs/index.ts"
click node_grid_route "https://github.com/devorld/react-grid/blob/main/apps/web/app/grid/page.tsx"
click node_grid_page "https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/grid/ui/grid.tsx"
click node_status_route "https://github.com/devorld/react-grid/blob/main/apps/web/app/api/status/route.ts"
click node_api_app "https://github.com/devorld/react-grid/tree/main/apps/api"
click node_fake_api "https://github.com/devorld/react-grid/blob/main/apps/fake-api/src/index.mts"
click node_bot_app "https://github.com/devorld/react-grid/tree/main/apps/bot"
click node_docs_app "https://github.com/devorld/react-grid/blob/main/apps/docs/app/page.tsx"
click node_ui_components "https://github.com/devorld/react-grid/tree/main/packages/ui/src"

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_route,node_map_page,node_map_view,node_map_types,node_wfs_route,node_wfs_client,node_grid_route,node_grid_page,node_status_route toneBlue
class node_api_app,node_fake_api,node_bot_app toneAmber
class node_docs_app toneMint
class node_ui_components toneRose
class node_visitor,node_wms toneIndigo
```

## Components

### Web experience

- [Map route](https://github.com/devorld/react-grid/blob/main/apps/web/app/map/page.tsx): `apps/web/app/map/page.tsx`
- [Map page](https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/map.tsx): `apps/web/src/pages/map/ui/map.tsx`
- [Interactive map](https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/map/ui/MapView.tsx): `apps/web/src/pages/map/ui/MapView.tsx`
- [Map data types](https://github.com/devorld/react-grid/tree/main/apps/web/src/pages/map/model/types): `apps/web/src/pages/map/model/types`
- [WFS API route](https://github.com/devorld/react-grid/blob/main/apps/web/app/api/wfs/route.ts): `apps/web/app/api/wfs/route.ts`
- [WFS client](https://github.com/devorld/react-grid/blob/main/apps/web/src/shared/api/wfs/index.ts): `apps/web/src/shared/api/wfs/index.ts`
- [Grid route](https://github.com/devorld/react-grid/blob/main/apps/web/app/grid/page.tsx): `apps/web/app/grid/page.tsx`
- [Sample grid](https://github.com/devorld/react-grid/blob/main/apps/web/src/pages/grid/ui/grid.tsx): `apps/web/src/pages/grid/ui/grid.tsx`
- [Status endpoint](https://github.com/devorld/react-grid/blob/main/apps/web/app/api/status/route.ts): `apps/web/app/api/status/route.ts`

### Service apps

- [API app](https://github.com/devorld/react-grid/tree/main/apps/api): `apps/api`
- [Fake API](https://github.com/devorld/react-grid/blob/main/apps/fake-api/src/index.mts): `apps/fake-api/src/index.mts`
- [Bot app](https://github.com/devorld/react-grid/tree/main/apps/bot): `apps/bot`

### Documentation

- [Docs app](https://github.com/devorld/react-grid/blob/main/apps/docs/app/page.tsx): `apps/docs/app/page.tsx`

### Shared UI

- [UI components](https://github.com/devorld/react-grid/tree/main/packages/ui/src): `packages/ui/src`

### Other components

- **Visitor**
- **WMS tile service**

## Connections

- Visitor → Map route: opens map (evidence: `README.md`)
- Map route → Map page: renders (evidence: `apps/web/app/map/page.tsx`)
- Map page → Interactive map: exports (evidence: `apps/web/src/pages/map/ui/map.tsx`)
- Interactive map → WFS API route: fetches features (evidence: `apps/web/src/pages/map/ui/MapView.tsx`)
- WFS API route → WFS client: fetches data (evidence: `apps/web/app/api/wfs/route.ts`)
- Interactive map → Map data types: uses types (evidence: `apps/web/src/pages/map/ui/MapView.tsx`)
- Interactive map → WMS tile service: loads map tiles (evidence: `apps/web/src/pages/map/ui/MapView.tsx`)
- Visitor → Grid route: opens grid (evidence: `README.md`)
- Grid route → Sample grid: exports (evidence: `apps/web/app/grid/page.tsx`)
- Visitor → Status endpoint: requests status
