How technologiestiftung/kiezbox-pwa works
Kiezbox is a SvelteKit emergency-response PWA for BananaPi devices. The user-facing flow brings together emergency or demo calling, precaution guidance, and a map of local points of interest; the call screen coordinates SIP-call controls and call state, while the map displays configured layers and feature details. The README also describes offline operation and SIP-based calls. The graph follows the sampled page and component wiring; several supporting state modules and offline behavior are included at subsystem level because their implementation was not excerpted.
Main entry points: +page.svelte Home page · EmergencyCall.svelte Call coordinator · Map.svelte POI map · PrecautionGuide.svelte Precaution guide
Components 27
App experience
Emergency calling
- Call coordinator
src/components/EmergencyCall/EmergencyCall.svelte - Dialer
src/components/EmergencyCall/Dialer.svelte - Call controls
src/components/EmergencyCall/CallScreen.svelte - Call guidance
src/components/EmergencyCall/EmergencyCallInfo.svelte - Demo guidance
src/components/EmergencyCall/DemoCallInfo.svelte - Speech bubble
src/components/EmergencyCall/SpeechBubble.svelte - SIP call service
src/lib/state/callState.svelte.ts - Call utilities
src/lib/utils/callUtils.ts
Local information
- Precaution guide
src/components/PrecautionGuide/PrecautionGuide.svelte - Guide tabs
src/components/PrecautionGuide/TabView.svelte - Guide content
src/components/PrecautionGuide/InfoBox.svelte - Guide data builder
src/lib/utils/precautionUtils.ts - POI map
src/components/Map/Map.svelte - Map legend
src/components/Map/Legend.svelte - POI details
src/components/Map/PopupCard.svelte - Map layers and sources
src/lib/config/layers.ts - Base map style
src/lib/config/layer-style-positron.ts - Map and POI state
src/lib/state/state.svelte.ts
PWA platform
- Network service
src/lib/state/networkState.svelte.ts - Offline service worker
src/service-worker.ts - App layout
src/routes/+layout.svelte
Other components
- Resident
- SIP service
- Offline browser
Connections 27
- Resident → Home page: opens
src/routes/+page.svelte - Home page → Header: renders
src/routes/+page.svelte - Home page → Call coordinator: renders
src/routes/+page.svelte - Home page → Precaution guide: renders
src/routes/+page.svelte - Home page → POI map: renders
src/routes/+page.svelte - Home page → Footer: renders
src/routes/+page.svelte - Home page → Network service: initializes
src/routes/+page.svelte - Precaution guide → Guide data builder: builds tabs
src/components/PrecautionGuide/PrecautionGuide.svelte - Precaution guide → Guide tabs: renders
src/components/PrecautionGuide/PrecautionGuide.svelte - Guide tabs → Guide content: renders
src/components/PrecautionGuide/TabView.svelte - POI map → Map layers and sources: loads layers
src/components/Map/Map.svelte - POI map → Base map style: loads style
src/components/Map/Map.svelte - POI map → Map legend: renders
src/components/Map/Map.svelte - POI map → POI details: renders
src/components/Map/Map.svelte - POI map → Map and POI state: sets feature state
src/components/Map/Map.svelte - POI details → Map and POI state: reads popup state
src/components/Map/PopupCard.svelte - POI details → Map layers and sources: reads layer config
src/components/Map/PopupCard.svelte - Call coordinator → Dialer: renders
src/components/EmergencyCall/EmergencyCall.svelte - Call coordinator → Call controls: renders
src/components/EmergencyCall/EmergencyCall.svelte - Call coordinator → Call guidance: renders emergency info
src/components/EmergencyCall/EmergencyCall.svelte - Call coordinator → Demo guidance: renders demo info
src/components/EmergencyCall/EmergencyCall.svelte - Demo guidance → Speech bubble: renders
src/components/EmergencyCall/DemoCallInfo.svelte - Call coordinator → SIP call service: controls calls
src/components/EmergencyCall/EmergencyCall.svelte - Call coordinator → Network service: reads network status
src/components/EmergencyCall/EmergencyCall.svelte - SIP call service → SIP service: places SIP calls
README.md - App layout → Offline service worker: checks for updates
src/routes/+layout.svelte - Offline browser → Home page: supports offline use
README.md