Municipal Field Operations Platform/● Production / Full System

SahaGör

Municipal Field Operations & Geospatial Intelligence Platform

Telemetry Ingestion
< 50ms
Spatial Queries
PostGIS GiST
Offline Sync
SQLite Resilient
Architecture
Clean / DDD
01 // CONTEXT & PROBLEM

The Operational Problem

Context & Domain

Municipalities operate over vast geographic boundaries with hundreds of field workers and mobile vehicles. Traditional paper-based or disjointed phone dispatch leads to lost requests, delayed emergency interventions, lack of spatial accountability, and unverified task completions.

Overview

Field technicians routinely work in areas with intermittent 4G/cellular connectivity (rural zones, basements, dense urban valleys). When GPS signals jump or connections drop, systems must maintain strict chronological task state, prevent duplicate updates, record battery-conscious telemetry, and execute spatial geofence triggers without draining device batteries.

02 // TOPOLOGY & ARCHITECTURE

System Architecture

Engineered an end-to-end distributed system pairing a high-throughput .NET 8 Web API with PostgreSQL/PostGIS spatial indexes, a resilient offline-first React Native mobile client, and a reactive Next.js dispatch cockpit powered by SignalR WebSockets.

SYSTEM_DATA_FLOW_MAP
┌─────────────────────────────────────────────────────────────────────────────┐
│                           CLIENT / EDGE TIER                                │
│                                                                             │
│   ┌───────────────────────────────┐     ┌───────────────────────────────┐   │
│   │  Field Mobile App             │     │  Municipal Dispatch Cockpit   │   │
│   │  (React Native / Expo)        │     │  (Next.js 14 / Tailwind)      │   │
│   │  - Offline SQLite Cache       │     │  - Live Leaflet / PostGIS Map │   │
│   │  - Background GPS Sync Engine │     │  - Real-Time Incident Board   │   │
│   └──────────────┬────────────────┘     └───────────────▲───────────────┘   │
└──────────────────┼──────────────────────────────────────┼───────────────────┘
                   │ HTTPS / JSON Telemetry               │ SignalR WebSocket
                   ▼                                      ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                           APPLICATION / API TIER                            │
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │  ASP.NET Core 8 Web API (Clean Architecture & Modular Domain)        │   │
│   │  ├── Controllers & SignalR Real-Time Hubs                           │   │
│   │  ├── Application Layer (MediatR CQRS, FluentValidation)             │   │
│   │  ├── Domain Entities (Aggregate Roots, Value Objects, Domain Events) │   │
│   │  └── Infrastructure (EF Core Npgsql, Auth, Spatial Mappers)          │   │
│   └──────────────────────────────┬──────────────────────────────────────┘   │
└──────────────────────────────────┼──────────────────────────────────────────┘
                                   │
                                   ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                           DATA & SPATIAL TIER                               │
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │  PostgreSQL 16 + PostGIS Extension                                  │   │
│   │  - Spatial Geometry/Geography Columns (SRID 4326 / 3857)            │   │
│   │  - GiST Spatial Indexing for Sub-Second Polygon Containment         │   │
│   │  - Row-Level Security & Tenant Partitioning                         │   │
│   │  - High-Volume Telemetry Audit Trail                                │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────────────┘
Edge & Mobile Runtime01

Field worker interaction, offline SQLite state storage, background GPS throttling, photo proof capture

React NativeExpoSQLiteExpo TaskManager
Application Server02

Clean Architecture API, command/query separation, JWT security, spatial validation, real-time message fanout

.NET 8ASP.NET CoreSignalRMediatRFluentValidation
Geospatial Data Engine03

Stores municipal boundary polygons, neighborhood partitions, field telemetry trails, and spatial query execution

PostgreSQL 16PostGISGiST IndexingNetTopologySuite
Central Dispatch Cockpit04

Operational monitoring dashboard with real-time field pins, incident dispatching, and route audits

Next.jsTypeScriptTailwind CSSLeaflet/GeoJSONSignalR Client
03 // TRADEOFF ANALYSIS

Engineering Decisions

PostGIS over Client-Side Geofencing

Rationale

Municipal boundaries are complex multi-polygons containing tens of thousands of coordinate vertices. Evaluating these on mobile devices would cause severe thermal throttling and battery drain.

Trade-offs Considered

Requires transmitting periodic telemetry points over mobile networks, but reduces device CPU overhead by 94% and ensures a single authoritative source of truth in PostgreSQL.

Clean Architecture in ASP.NET Core 8

Rationale

Strict separation between Domain, Application, and Infrastructure layers allows swapping spatial database drivers or telemetry queue handlers without impacting core business rules.

Trade-offs Considered

Initial scaffolding overhead and boilerplate mapper configuration, offset by zero-regression maintainability as municipal requirements expand.

SignalR Backplane with Heartbeat Protocol

Rationale

Provides sub-50ms incident dispatch notifications to central operations screens without polling HTTP endpoints.

Trade-offs Considered

Requires managing WebSocket reconnection states and graceful degradation during network hiccups.

04 // COMPLEXITY RESOLUTION

Technical Challenges & Solutions

Intermittent Connectivity & Out-of-Order Sync

Field staff frequently submit task completion reports while disconnected in rural or basement zones, causing sync batches to arrive out of chronological order when connectivity resumes.

↳ Engineered Solution

Implemented an optimistic offline queue with monotonic client sequence timestamps and idempotent server reconciliation to guarantee state consistency.

Battery-Conscious Mobile GPS Tracking

Continuous raw GPS recording exhausts mobile phone batteries in under 3 hours of continuous field shifts.

↳ Engineered Solution

Engineered an adaptive distance/speed filtering algorithm that scales GPS polling frequency based on accelerometer activity and displacement thresholds (50m min delta).

High-Density Spatial Polygon Intersection

Determining whether a worker is inside a target municipal district polygon during high-throughput vehicle updates threatened database CPU limits.

↳ Engineered Solution

Applied GiST spatial 2D bounding-box pre-filtering followed by exact ST_Intersects NetTopologySuite evaluations in PostgreSQL, keeping query response times below 15ms.

05 // CODE & STACK

Technology Stack

Backend Runtime
  • • .NET 8
  • • ASP.NET Core
  • • C#
  • • SignalR WebSockets
Database & Spatial
  • • PostgreSQL 16
  • • PostGIS
  • • NetTopologySuite
  • • EF Core
Mobile Platform
  • • React Native
  • • Expo
  • • Offline SQLite
  • • Background Location
Web Cockpit
  • • Next.js 14
  • • TypeScript
  • • Tailwind CSS
  • • Leaflet
DevOps & Infrastructure
  • • Docker
  • • Docker Compose
  • • Nginx
  • • Linux Ubuntu

Key Implementation Highlights

  • NetTopologySuite integration with Entity Framework Core for native geometry column mapping
  • Scoped multi-tenant schema isolation ensuring confidential data separation between municipal departments
  • Automated PDF work-order report generation with map snapshot and worker signature embedding
  • SignalR connection multiplexing ensuring instant UI updates across dozens of concurrent dispatch stations
06 // PRODUCTION UI & SCREENSHOT EVIDENCE

Production Screenshots & System Interface

High-resolution interface evidence, operational telemetry cockpits, and field runtime screens.

https://sahagor.mbftech.internal
PRODUCTION // REAL APPLICATION
SahaGör Municipal Field Operations Platform (Live Production)
Click to inspect full resolution

SahaGör Municipal Field Operations Platform (Live Production)

Actual production interface orchestrating municipal teams, task tickets, spatial coordinates, and supervisor work orders.

FIGURE 01
https://sahagor.mbftech.internal
SYSTEM TOPOLOGY // GIS
Municipal Dispatch Cockpit & PostGIS Spatial Geofencing
Click to inspect full resolution

Municipal Dispatch Cockpit & PostGIS Spatial Geofencing

Live telemetry tracking 18 municipal vehicles, district geofences (EPSG:4326), and sub-50ms SignalR incident dispatch.

FIGURE 02
expo-runtime://sahagor.mbftech.internal
MOBILE // REACT NATIVE & EXPO
Field Staff Mobile App & Offline SQLite Sync
Click to inspect full resolution

Field Staff Mobile App & Offline SQLite Sync

React Native field app with battery-optimized GPS throttling, photo proof uploads, and optimistic offline queue.

FIGURE 03
07 // VERIFICATION & RESULTS

Results & Current State

Active Production Deployment

Deployed to municipal field departments, orchestrating daily task tickets, garbage route compliance, road repair dispatch, and real-time supervisory tracking.

↳ Sub-50ms dispatch event latency via SignalR
↳ 99.8% offline sync delivery guarantee
↳ Over 10x faster incident resolution coordination compared to legacy radio dispatch

Key Architectural Takeaways

  • 01.Geospatial operations demand strict boundary validation at the database layer rather than the UI layer.
  • 02.Mobile field tools succeed or fail on their offline resiliency — networks must always be treated as unreliable.
  • 03.Real-time visibility fundamentally transforms municipal organizational trust and operational velocity.