# interstella0/zegraph-web architecture

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

- Interactive diagram: https://gitdiagram.com/interstella0/zegraph-web
- Repository: https://github.com/interstella0/zegraph-web

## Overview

ZE Graph Website lets players explore Zombie Escape server activity, maps, player histories, and live radar data. The browser requests the Rust API through Next.js routes; the API serves database-backed results and exposes MCP tools. The README describes data collection as a separate, hidden scraper that populates PostgreSQL, and identifies QGIS as the source of map layers. The tree and excerpts establish the main runtime layers, but do not show every route-to-handler or worker-to-storage call, so those links are not expanded.

Main entry points: [`src/main.rs`](https://github.com/interstella0/zegraph-web/blob/main/src/main.rs) (Rust API service), [`front-ze/app/page.tsx`](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/page.tsx) (ZE Graph site), [`front-ze/app/api`](https://github.com/interstella0/zegraph-web/tree/main/front-ze/app/api) (Next.js API routes), [`pfp-provider/src/main.rs`](https://github.com/interstella0/zegraph-web/blob/main/pfp-provider/src/main.rs) (Profile picture service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_website["ZE Graph site<br/>[page.tsx]"]
  node_server_explorer["Server explorer<br/>[page.tsx]"]
  node_map_views["Maps and 3D<br/>[page.tsx]"]
  node_player_views["Player profiles<br/>[page.tsx]"]
  node_radar["Radar and tracker<br/>[page.tsx]"]
  node_web_api["Next.js API routes"]
end

subgraph group_api["API and services"]
  node_backend["Rust API service<br/>[main.rs]"]
  node_routers["Domain routers<br/>[routers.rs]"]
  node_mcp["MCP tools<br/>[mod.rs]"]
  node_push["Push notifications<br/>[push_service.rs]"]
end

subgraph group_data["Data platform"]
  node_workers["Data workers<br/>[mod.rs]"]
  node_postgres[("PostgreSQL")]
  node_redis[("Redis cache")]
  node_object_storage[("Map and model storage<br/>[storage.rs]")]
end

subgraph group_integrations["External integrations"]
  node_qgis["QGIS Server"]
  node_pfp["Profile picture service<br/>[main.rs]"]
  node_upstream_profiles["Profile providers<br/>[providers.rs]"]
end

node_visitor(("Website user"))
node_scraper["Hidden data scraper"]
node_steam["Steam API"]
node_external_profiles["External profile sources"]
node_object_service["S3-compatible storage"]

node_visitor -->|"browses"| node_website
node_website -->|"opens"| node_server_explorer
node_website -->|"opens"| node_map_views
node_website -->|"opens"| node_player_views
node_website -->|"opens"| node_radar
node_server_explorer -->|"requests data"| node_web_api
node_map_views -->|"requests data"| node_web_api
node_player_views -->|"requests data"| node_web_api
node_radar -->|"requests data"| node_web_api
node_web_api -->|"proxies requests"| node_backend
node_backend -->|"dispatches"| node_routers
node_routers -->|"queries and writes"| node_postgres
node_backend -->|"mounts endpoint"| node_mcp
node_workers -->|"writes data"| node_postgres
node_scraper -->|"populates"| node_postgres
node_postgres -->|"supplies data"| node_scraper
node_postgres -->|"PostGIS data"| node_qgis
node_qgis -->|"serves WMS layers"| node_radar
node_backend -->|"requests profile images"| node_pfp
node_pfp -->|"tries providers"| node_upstream_profiles
node_upstream_profiles -.->|"queries"| node_steam
node_upstream_profiles -.->|"queries"| node_external_profiles
node_backend -->|"uses service"| node_push
node_backend -->|"stores map and model files"| node_object_storage
node_object_storage -.->|"stores objects"| node_object_service
node_backend -->|"uses cache"| node_redis
node_pfp -->|"caches lookups"| node_redis

click node_website "https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/page.tsx"
click node_server_explorer "https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/page.tsx"
click node_map_views "https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/maps/%5Bmap_name%5D/page.tsx"
click node_player_views "https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/players/%5Bplayer_id%5D/page.tsx"
click node_radar "https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/radar/page.tsx"
click node_web_api "https://github.com/interstella0/zegraph-web/tree/main/front-ze/app/api"
click node_backend "https://github.com/interstella0/zegraph-web/blob/main/src/main.rs"
click node_routers "https://github.com/interstella0/zegraph-web/blob/main/src/routers.rs"
click node_mcp "https://github.com/interstella0/zegraph-web/blob/main/src/mcp/mod.rs"
click node_push "https://github.com/interstella0/zegraph-web/blob/main/src/core/push_service.rs"
click node_workers "https://github.com/interstella0/zegraph-web/blob/main/src/workers/mod.rs"
click node_object_storage "https://github.com/interstella0/zegraph-web/blob/main/src/core/storage.rs"
click node_pfp "https://github.com/interstella0/zegraph-web/blob/main/pfp-provider/src/main.rs"
click node_upstream_profiles "https://github.com/interstella0/zegraph-web/blob/main/pfp-provider/src/providers.rs"

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_website,node_server_explorer,node_map_views,node_player_views,node_radar,node_web_api,node_visitor toneBlue
class node_backend,node_routers,node_mcp,node_push,node_object_service toneAmber
class node_workers,node_postgres,node_redis,node_object_storage,node_steam toneMint
class node_qgis,node_pfp,node_upstream_profiles toneRose
class node_scraper,node_external_profiles toneIndigo
```

## Components

### Web experience

- [ZE Graph site](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/page.tsx): `front-ze/app/page.tsx`
- [Server explorer](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/page.tsx): `front-ze/app/servers/[server_slug]/page.tsx`
- [Maps and 3D](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/maps/%5Bmap_name%5D/page.tsx): `front-ze/app/servers/[server_slug]/maps/[map_name]/page.tsx`
- [Player profiles](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/players/%5Bplayer_id%5D/page.tsx): `front-ze/app/servers/[server_slug]/players/[player_id]/page.tsx`
- [Radar and tracker](https://github.com/interstella0/zegraph-web/blob/main/front-ze/app/servers/%5Bserver_slug%5D/radar/page.tsx): `front-ze/app/servers/[server_slug]/radar/page.tsx`
- [Next.js API routes](https://github.com/interstella0/zegraph-web/tree/main/front-ze/app/api): `front-ze/app/api`

### API and services

- [Rust API service](https://github.com/interstella0/zegraph-web/blob/main/src/main.rs): `src/main.rs`
- [Domain routers](https://github.com/interstella0/zegraph-web/blob/main/src/routers.rs): `src/routers.rs`
- [MCP tools](https://github.com/interstella0/zegraph-web/blob/main/src/mcp/mod.rs): `src/mcp/mod.rs`
- [Push notifications](https://github.com/interstella0/zegraph-web/blob/main/src/core/push_service.rs): `src/core/push_service.rs`

### Data platform

- [Data workers](https://github.com/interstella0/zegraph-web/blob/main/src/workers/mod.rs): `src/workers/mod.rs`
- **PostgreSQL**
- **Redis cache**
- [Map and model storage](https://github.com/interstella0/zegraph-web/blob/main/src/core/storage.rs): `src/core/storage.rs`

### External integrations

- **QGIS Server**
- [Profile picture service](https://github.com/interstella0/zegraph-web/blob/main/pfp-provider/src/main.rs): `pfp-provider/src/main.rs`
- [Profile providers](https://github.com/interstella0/zegraph-web/blob/main/pfp-provider/src/providers.rs): `pfp-provider/src/providers.rs`

### Other components

- **Website user**
- **Hidden data scraper**
- **Steam API**
- **External profile sources**
- **S3-compatible storage**

## Connections

- Website user → ZE Graph site: browses
- ZE Graph site → Server explorer: opens
- ZE Graph site → Maps and 3D: opens
- ZE Graph site → Player profiles: opens
- ZE Graph site → Radar and tracker: opens
- Server explorer → Next.js API routes: requests data
- Maps and 3D → Next.js API routes: requests data
- Player profiles → Next.js API routes: requests data
- Radar and tracker → Next.js API routes: requests data
- Next.js API routes → Rust API service: proxies requests
- Rust API service → Domain routers: dispatches
- Domain routers → PostgreSQL: queries and writes
- Rust API service → MCP tools: mounts endpoint
- Data workers → PostgreSQL: writes data
- Hidden data scraper → PostgreSQL: populates
- PostgreSQL → Hidden data scraper: supplies data
- PostgreSQL → QGIS Server: PostGIS data
- QGIS Server → Radar and tracker: serves WMS layers
- Rust API service → Profile picture service: requests profile images
- Profile picture service → Profile providers: tries providers
- Profile providers → Steam API: queries
- Profile providers → External profile sources: queries
- Rust API service → Push notifications: uses service
- Rust API service → Map and model storage: stores map and model files
- Map and model storage → S3-compatible storage: stores objects
- Rust API service → Redis cache: uses cache
- Profile picture service → Redis cache: caches lookups
