Fabric Apps / City Utility Twin

City Utility Twin

Your city's digital twin on one map: power, water, heat, transit, fibre. Live. A config-driven 1:1 3D twin for municipal multi-utilities.

Work in progressReactthree.jsRayfinVite
City Utility Twin preview

Work in progress. This app is being built in the open. It starts from the Munich city and airport twin and grows into one config-driven twin for municipal multi-utilities: several cities, eight utility divisions, live data and a Microsoft Fabric data platform behind it. Until then, everything below describes the Munich starting point.

Your city's digital twin on one map: power, water, heat, transit, fibre. Live.

City Utility Twin, Munich starting point: construction sites, MVG stops and vehicles on the 1:1 city model

Munich city centre and Munich Airport as one continuous 1:1 3D twin, with switchable data layers from live open sources, an assistant that answers questions about construction sites with visible tool calls, and shared coordination notes. Built as a Microsoft Fabric App (preview).

The app UI is German and English: it follows the browser (German browsers get German, everyone else English), ?lang=de or ?lang=en overrides that, and the toggle next to the map controls switches live. The step-by-step guide for running the twin in your own tenant is German: UMSETZUNG.md.

What it does

  • Two survey-grade cores in one scene. Munich city centre (3.25 x 3.94 km) and Munich Airport (8.58 x 5.81 km), 28 km apart, joined by a coarse terrain shell. Switching between them is a camera flight, not a reload.
  • Live open-data layers. Construction sites and temporary no-parking zones from the city's WFS (Hamburg: the city's roadworks register; Stuttgart: the state's feed for classified roads), MVG stops with live departures, vehicles moving along each city's published planned service, ADS-B air traffic. Every layer is built only when switched on and shows its source and timestamp.
  • Honest data badges. Each active layer carries a badge saying what kind of data it draws (live, planned, dataset, user entries, and for later divisions recording and synthetic) and from when: the source's own observation time where it publishes one, otherwise the fetch time. Measured data past its bound is badged as stale.
  • Availability per city. config/availability.json states, per city and division, whether there is a real source, a synthetic one or none, and which layers deliver it. It decides which layers a city offers, and the layer panel shows it as a row of chips.
  • Assistant with tools. A question such as "which construction sites on this street overlap in space and time?" runs a query for nearby construction sites (within a radius) with overlapping dates and shows the tool call. When the data does not contain an answer (for example who carries out the work), it says so.
  • Coordination notes. A note drafted by the assistant is confirmed by a person and appears on the map for everyone who opens the app.
  • No synthetic fallback. If a source is down, its measurements are not replaced with made-up data; the layer panel says what failed.
  • Strict 1:1 scale. Terrain, buildings and objects are never exaggerated.

Architecture

Part What Runs on
src/, index.html, public/ React 19 shell around one three.js scene, data layers, assistant panel Fabric App static hosting
public/terrain/, public/data/ prebuilt terrain, orthophoto, LoD2 buildings, trees, timetable shipped with the app
server/ assistant (FastAPI, Azure OpenAI with tool calls) and notes store Azure Container App
server/sql/koordination.sql coordination notes schema Fabric SQL database
relay/ small ADS-B relay, because the providers send no CORS headers Azure Container App

Fabric Apps are not available in every region yet (for example not in Germany West Central or North Europe); see Fabric region availability and Multi-Geo.

⚠️ The hosted app and its assets use assetAccess: protected, so only signed-in users of the tenant can load them. The coordination notes are still not confidential in this version. Details in UMSETZUNG.md.

Getting started

npm ci
npm run dev          # http://127.0.0.1:5190

Map and data layers work immediately. The assistant, notes and air traffic need the services in server/ and relay/; deployment to your own tenant is described in UMSETZUNG.md. All tenant-specific values come from environment variables, with no defaults.

Project structure

config/aoi/        the two areas of interest with their measured bounds
public/terrain/    prebuilt cores and shell (open data, see NOTICE.md)
public/data/       timetable extract for the vehicle layer
relay/             ADS-B relay (zero-dependency Node)
server/            assistant, tools, notes store, Entra token check
src/               app: React shell (App.tsx, ui/), scene (map/), live layers, i18n (DE/EN), assistant client
tests/             unit tests (node:test) and component tests (tests/ui, Vitest)
tools/             asset gates, deployment scripts, geodata pipeline (tools/geodata/)

Scripts

Script What
npm run dev local dev server on port 5190
npm run build type check, asset gate, Vite build, bundle gate (no unapproved identifiers)
npm test unit tests (map, geometry, relay, vehicles) and component tests (shell, panels, DE/EN)
npm run data:flughafen rebuild the airport core from open data (optional)

Data

Layer Source
Terrain, orthophoto, LoD2 buildings, trees (Munich) Bayerische Vermessungsverwaltung (CC BY 4.0)
Terrain, orthophoto, LoD2 buildings (Hamburg) LGV Hamburg (dl-de/by-2-0)
Terrain, orthophoto, LoD2 buildings (Stuttgart) LGL Baden-Wuerttemberg (dl-de/by-2-0)
Coarse shell Copernicus DEM GLO-30
Construction sites, no-parking zones, stops (Munich only) City of Munich open data (mor_wfs)
Roadworks (Hamburg) Hamburg Authority for Transport and Mobility Transition, Baustellen Hamburg (Bauweiser, LGV WFS, dl-de/by-2-0)
Roadworks (Stuttgart) Baden-Wuerttemberg Ministry of Transport via MobiData BW (dl-de/by-2-0); federal, state and district roads only
Departures Munich public transport operator MVG (public departures interface; unofficial, off in the public build, see VITE_UNOFFICIAL_FEEDS)
Vehicles MVV (CC BY, feed 09/2026), hvv (dl-de/by-2-0) and VVS (CC BY 4.0) planned service data (GTFS), baked per city by tools/transit/bake_fahrplan.py; positions computed from planned departures, not tracked
Air traffic adsb.lol (ODbL)
Land cover, airport geometry OpenStreetMap contributors (ODbL)

Aircraft are drawn as simple procedural silhouettes at the published length of their type; no third-party model files are included.

Credits

Map data notices, attribution strings and licences: NOTICE.md and public/THIRD-PARTY-NOTICES.txt. Code: LICENSE.