HomeCase studiesField Damage Reporting & Fine Settlement Mobile...

Case study · Milan, Italy

Field Damage Reporting & Fine Settlement Mobile App for Buried Utility Protection

Public-sector regulatory compliance — protection of buried utility infrastructure during excavation work

Excavation sites around buried gas, power, fiber, and water lines routinely operate inside deep trenches, underground vaults, or rural corridors where cellular signal vanishes right when compliance documentation is needed. We engineered a cross-platform React Native and React mobile application backed by an on-device SQLite relational store for utility damage reporting, dig-permit verification, and administrative fine settlement. Field inspectors and contractors capture geotagged photo evidence offline with guaranteed local persistence, while deterministic background synchronization reconciles reports and tokenized citation payments once connectivity returns.

Industry
Public-sector regulatory compliance — protection of buried utility infrastructure during excavation work
Solution
An offline-first cross-platform React Native and React mobile application using local SQLite persistence for field violation reporting, permit checks, and citation fine payment.
Platforms
Cross-platform
Stack
React Native · React · SQLite · TypeScript · REST API · Payment SDK
Location
Milan, Italy · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Milan, Italy. Names withheld by agreement.

Project Overview

Buried gas mains, high-voltage conduits, fiber trunks, and pressurized water lines sit directly beneath active construction zones. When excavation crews strike unmarked or improperly shielded infrastructure—or begin trenching without valid locate clearances—public safety and essential utility continuity are immediately at risk. Field inspectors and site supervisors tasked with documenting compliance breaches or settling minor administrative citations often work inside concrete utility corridors or peripheral roadworks where reliable wireless data simply does not exist.

We engineered a cross-platform mobile application built on React Native, React, TypeScript, and SQLite specifically for buried-utility protection workflows. Deployed across iOS and Android devices for municipal inspectors and licensed excavation contractors, the app enables offline dig-permit verification, structured damage and violation reporting with geotagged evidence, and integrated digital fine settlement with instant verifiable receipts.

Field Reporting & Enforcement Bottlenecks

Paper clipboards and naive online-only web forms created acute operational friction across active dig sites:

  • Dropped submissions in poor coverage: Standard form apps timed out when inspectors descended into sub-surface utility vaults or rural road trenches, wiping out multi-step incident notes and forcing crews to re-enter reports back at the depot.
  • Unverifiable incident evidence: Separate smartphone photos lacked structured links to permit numbers, utility operator IDs, and precise GPS timestamps, weakening enforcement records during contested appeals.
  • Slow fine resolution cycles: Contractors issued minor administrative citations faced mailed paper invoices and municipal office visits, delaying case closure and holding up subsequent permit renewals.
  • Outdated reference codes in the field: Printed fee schedules and utility contact directories quickly went stale whenever municipal regulations or regional operator territories changed.

Architectural Strategy

We treated connectivity as an intermittent optimization rather than an assumption. Using an offline-first SQLite core inside React Native, every screen reads from and writes to local relational tables first. No user action blocks on a remote HTTP round-trip except live fine payment authorization, which explicitly checks network readiness before initiating a tokenized checkout session.

To prevent fragile UI state when network conditions fluctuate mid-upload, we separated user drafting from background synchronization through a strict transactional outbox pattern. Reports, witness details, and photo manifests commit locally with explicit state flags (draft, queued, uploading_media, acknowledged, sync_error), giving inspectors transparent visibility into exactly what has reached municipal servers.

Core Capabilities

  • Offline Dig-Permit & Utility Directory Lookup: Locally indexed SQLite tables let inspectors verify active excavation permits, locate expiration dates, and emergency utility operator contacts instantaneously without signal.
  • Structured Damage & Violation Capture: Guided React Native workflows enforce mandatory fields—infrastructure type, strike severity, locate-mark presence, and contractor ID—eliminating incomplete field filings.
  • Geotagged Photo & Signature Evidence: Embedded camera capture binds high-clarity compressed imagery to GPS coordinates, compass bearing, UTC timestamps, and on-screen contractor acknowledgment signatures.
  • Resilient Media & Report Outbox: Lightweight incident metadata syncs immediately upon weak signal recovery, followed by chunked, resumable photo uploads that pause cleanly if signal drops again.
  • In-App Citation Payment & Digital Receipts: Authorized contractors inspect open compliance citations, remit administrative fines via a tokenized payment flow, and store offline-accessible clearance receipts.

Technical Architecture

All user interactions run inside React Native TypeScript modules backed by an embedded SQLite database accessed through a typed repository layer. Sensitive authentication tokens and local encryption keys reside inside platform-native secure enclaves (iOS Keychain and Android Keystore).

Flow: Inspector / Contractor (React Native + React UI) → TypeScript Domain Layer → Local SQLite DB & Outbox → Background Sync Worker (HTTPS REST API + Idempotency Keys) → Municipal Enforcement Server & Tokenized Payment Gateway

When connectivity is detected, the background sync worker claims pending outbox rows sequentially. It dispatches structured JSON payloads first, records the server-assigned docket ID in SQLite, and then streams linked image files via multipart pre-signed endpoints. For fine payments, the app requests an ephemeral payment intent over HTTPS, completes card tokenization through the Payment SDK, and caches the resulting cryptographically signed receipt locally.

Technology Stack

Category Technology detail
Cross-Platform Mobile UI React Native with React functional components for iOS and Android
Type Safety & Domain Models TypeScript enforcing strict schemas across reports, permits, and sync
Local Relational Database SQLite storing offline permit caches, incident drafts, and sync outbox
Evidentiary Media Capture Native camera and GPS bridge tagging photos with coordinates and UTC time
Offline Synchronization Engine Deterministic outbox worker with exponential backoff and idempotency keys
Upstream Integration Versioned HTTPS REST API client connecting to municipal enforcement systems
Citation Fine Settlement Tokenized Payment SDK flow for card-present/in-app penalty payments
Credential & Key Storage OS Keychain and Android Keystore securing auth tokens and SQLite keys
Push & Status Alerts Native notification handler surfacing citation updates and sync errors

Engineering Trade-offs & Solutions

Engineering Challenge Solution & Trade-off
Full raw camera images overwhelmed weak field cellular uploads Applied deterministic client-side resizing and JPEG compression inside React Native while preserving EXIF GPS/time metadata; slightly reduces raw pixel size in exchange for reliable field uploads.
Decoupling report JSON from photo uploads risked partial server records Server accepts the report manifest in pending_media state first and tracks expected attachment checksums; trades an extra state transition for immediate visibility of urgent utility strikes.
Offline-edited drafts could collide with centrally updated citation statuses Implemented monotonic server revision checks and immutable submitted-report locks; once marked submitted in SQLite, amendments append as supplemental addenda rather than overwriting history.
Supporting both inspectors and contractors in one codebase risked UI clutter Used role-scoped navigation stacks driven by authenticated token claims in TypeScript, sharing core SQLite repositories and receipt views cleanly across personas.

Evidentiary Integrity & Security

Compliance citations frequently face administrative challenges, making data provenance essential. Every photo captured inside the app records device GPS accuracy metadata and UTC capture time immediately into SQLite alongside a SHA-256 content digest computed prior to upload. Server ingestion verifies that uploaded file hashes match the manifest recorded at capture time.

Authentication tokens never sit in plain AsyncStorage; they are encrypted via iOS Keychain and Android Keystore, with optional biometric unlock protecting shared municipal field tablets. Fine payment flows tokenize card credentials directly with the payment processor SDK so sensitive primary account numbers never touch application state, logs, or SQLite tables.

Offline Storage & Sync Scale

Long-running field devices accumulate thousands of historical permit records and hundreds of inspection photos across months of street work. To keep SQLite queries fast and prevent device storage exhaustion, the sync engine runs scheduled retention pruning: acknowledged reports and verified payment receipts retain lightweight searchable metadata indefinitely while purged local high-resolution image caches free flash space once server checksum confirmation is received.

Indexed SQLite queries across permit IDs, street corridors, and contractor tax numbers keep autocomplete search responsive under 50 milliseconds even with regional utility datasets cached locally.

Operational Outcomes

Equipping excavation compliance teams and contractors with a purpose-built offline mobile tool modernized buried infrastructure oversight:

  • Zero lost field reports: Inspectors document trench violations and utility strikes reliably regardless of sub-surface or rural cellular coverage.
  • Stronger evidentiary quality: Standardized forms paired with GPS-pinned, hash-verified photographs arrive complete and ready for regulatory review.
  • Faster fine resolution: Contractors review citations and settle administrative penalties directly on mobile devices, receiving verifiable clearance receipts immediately.
  • Synchronized field intelligence: Automated catalog delta sync keeps regional utility directories and statutory fee schedules uniform across every device in the field.

01 — Questions

asked about this kind of project

How does the app protect field reports and photos if an inspector works underground with zero signal?

Every form entry, GPS coordinate, utility code selection, and photo file path writes immediately inside an atomic SQLite transaction on the device before the UI advances. Drafts and completed submissions sit safely in a durable outbox table and survive app restarts or battery swaps until the upstream server acknowledges receipt.

Why choose SQLite over simpler key-value storage like AsyncStorage for React Native offline data?

Excavation compliance workflows require relational lookups across thousands of cached dig permits, utility operator codes, violation fee schedules, and multi-photo incident attachments. SQLite provides indexed SQL queries, foreign-key integrity, and transactional outbox guarantees that flat key-value stores cannot deliver reliably.

How are large inspection photos handled so offline queues do not stall over weak cellular links?

Photos are compressed locally to balanced evidentiary resolution while preserving EXIF metadata and GPS stamps, then queued separately from lightweight JSON metadata payloads. The sync worker uploads structured report fields first so enforcement desks see the incident immediately, streaming photo binaries sequentially with resumable retries.

What prevents duplicate violation reports or double fine charges during flaky network handoffs?

Every report and payment attempt generates a UUID idempotency key stored in SQLite prior to transmission. If a network drop occurs mid-request, subsequent retries carry the exact same key so upstream APIs and payment processors deduplicate rather than creating twin citations or duplicate charges.

Can contractors pay administrative fines directly on-site, and how are receipts preserved?

When online connectivity is available, authorized contractor representatives can settle assessed fines inside the React Native app through a tokenized payment SDK without storing raw card numbers on the device. Confirmed payments return a signed digital receipt cached immediately into SQLite for instant inspection proof.

How does the mobile app stay synchronized with changing municipal penalty schedules and utility codes?

On app launch and periodic background wakes, a lightweight delta-sync endpoint checks catalog version hashes and updates local SQLite lookup tables in a single transaction, ensuring field teams apply current statutory fee tables without manual app updates.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.