HomeCase studiesAn Offline-Capable Field Operator Application for Metered...

Case study · Dublin, Ireland

An Offline-Capable Field Operator Application for Metered Fuel Dispensing in Vue and TypeScript

Fleet and site fuel management — metered fuel dispensing and asset custody

Unaccounted fuel variance between bulk tank deliveries and fleet vehicle consumption usually starts at the bowser, where paper clipboards and intermittent yard Wi-Fi corrupt dispense records. We engineered a mobile-first Progressive Web Application using Vue and TypeScript for fuel attendants operating ruggedized handhelds and yard tablets, backed by a REST API and relational wet-stock ledger. Operators scan plant or vehicle assets, record start and finish meter totalizer readings offline, capture tank dips, and reconcile every litre against depot stock with strict mathematical validation.

Industry
Fleet and site fuel management — metered fuel dispensing and asset custody
Solution
A mobile-first Vue and TypeScript Progressive Web Application for field fuel attendants integrated with a Web & API backend and wet-stock reconciliation engine.
Platforms
Web & API
Stack
Vue · TypeScript · Pinia · IndexedDB · Workbox · PostgreSQL
Location
Dublin, Ireland · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Dublin, Ireland. Names withheld by agreement.

Project Overview

In quarry yards, construction depots, and haulage hubs, the physical transfer of diesel or AdBlue from a static tank or mobile bowser into machinery is where inventory accuracy is won or lost. Paper logbooks smudge in rain, illegible handwriting breaks fleet cost allocation, and cellular dead zones around steel storage tanks routinely stall naive cloud forms.

We built a mobile-first field operator application in Vue and TypeScript, paired with a Web & API backend, purpose-built for metered fuel dispensing. Running as an installable Progressive Web Application, the interface guides attendants through shift start, asset identification, opening and closing meter verification, and bulk tank dip logging—continuing seamlessly when connectivity drops and reconciling every litre cleanly once signals return.

Business Bottleneck

Site operations struggled with three compounding gaps before adopting structured field capture:

  • Silent meter drift and transcription errors: Attendants writing down six-digit mechanical totalizer numbers at dusk frequently transposed digits, leaving finance teams chasing phantom stock losses at month-end.
  • Disconnected mobile bowsers: Refuelling tankers travelling across remote civil engineering sites operated outside Wi-Fi range for entire shifts, forcing operators back onto paper until returning to the main depot.
  • Delayed asset anomaly detection: Without on-screen access to a vehicle's prior odometer or engine-hour reading, pump operators had no immediate warning when an asset's meter stalled or consumption spiked abnormally.

Architectural Strategy

We chose a Vue 3 and TypeScript Progressive Web Application paired with a PostgreSQL-backed REST API so any ruggedized tablet or smartphone in the fleet could run identical validated workflows without app-store bottlenecks. Strict TypeScript interfaces model every pump event, totalizer boundary, and tank dip payload, catching unit mismatches and nullable edge cases at compile time rather than at the bowser.

Instead of holding live network locks during refuelling, the client treats IndexedDB as its active operational store. Operators sync reference catalogs—sites, tanks, nozzles, and fleet assets—into local storage before heading out, record dispenses as immutable local events with client-generated UUIDs, and rely on a background outbox worker to flush batches idempotently to the API.

Core Capabilities

  • Guided Metered Dispense Flow: Operators pick a site and pump, confirm the pre-populated opening meter reading, scan or select the receiving vehicle or generator, enter odometer/hours, and record the closing totalizer with instant litre calculation.
  • Offline Shift Continuity: Full catalog lookup, QR/barcode asset scanning, and multi-shift dispense queuing function with zero network availability, displaying clear sync-queue badges in the header.
  • Bulk Tank Dip & Delivery Capture: Dedicated workflows let supervisors log ultrasonic or dipstick tank levels alongside supplier delivery dockets to keep theoretical and physical wet-stock aligned.
  • Rollover & Anomaly Guardrails: Built-in validation warns attendants when a closing reading exceeds maximum tank capacity or jumps unexpectedly relative to an asset's previous odometer check.
  • Web Reconciliation Console: Depot administrators inspect real-time shift queues, resolve flagged meter gaps, and export verified cost-centre allocations for downstream fleet accounting.

Technical Architecture

The frontend separates UI views from Pinia workflow stores and an isolated TypeScript synchronization engine. Every UI form operates against validated Pinia state persisted immediately to IndexedDB, ensuring a browser refresh or dead tablet battery never erases an un-synced fuel transfer.

Flow: Shift catalog sync into IndexedDB -> Operator scans fleet asset & confirms pump totalizer -> TypeScript validator checks bounds -> Dispense event saved to IndexedDB outbox -> Background sync POSTs with idempotency key -> REST API orders totalizers & updates PostgreSQL wet-stock ledger -> Web console reflects reconciled balances.

When a pump has multiple concurrent attendants using shared tablets, totalizer continuity checks on the backend reconstruct the exact physical sequence of dispenses, flagging missing intervals rather than blindly overwriting current pump totals.

Technology Stack

Category Technology detail
Frontend framework Vue 3 using Composition API and modular single-file components
Type system Strict TypeScript sharing request, ledger, and validation DTO contracts
State management Pinia stores coordinating active pump sessions and operator shifts
Offline caching Progressive Web App runtime powered by Workbox service workers
Local persistence IndexedDB transactional outbox and locally cached fleet/tank catalogs
Asset scanning Browser camera QR/barcode decoding with high-contrast manual search fallback
Backend API RESTful JSON API with idempotency keys and optimistic concurrency checks
Database PostgreSQL ledger storing immutable dispense events, meter totalizers, and dips
Reporting & export Depot variance summaries and scheduled ERP-compatible accounting exports
Automated testing Vitest unit tests for meter arithmetic and offline queue replay scenarios

Engineering Trade-offs & Solutions

Architectural Dilemma Chosen Solution & Rationale
Native Android/iOS builds vs. Vue TypeScript PWA Delivered an installable Vue PWA backed by Workbox and IndexedDB, eliminating native deployment delays across mixed yard tablets while keeping offline resilience intact.
Server-side balance decrement vs. totalizer-ordered event ledger Recorded opening and closing pump totalizer readings on every event so the backend can sort out-of-order offline uploads and detect unmetered draws automatically.
Blocking network save vs. optimistic IndexedDB outbox Committed every completed dispense locally first with a unique UUID key, letting operators move straight to the next vehicle in line even inside underground garages.
Free-text vehicle entry vs. cached catalog + QR scan Paired camera QR decoding with fuzzy offline catalog search, stopping typo-driven orphan records that previously broke cost-centre reporting.

Security & Reliability

Operators authenticate with scoped shift credentials backed by short-lived session tokens and configurable inactivity locks tailored for shared depot tablets. Every synced dispense transaction preserves the authenticated operator ID, device identifier, local capture timestamp, and server ingestion timestamp inside an append-only audit table—preventing silent post-hoc alterations while allowing authorized supervisors to attach documented correction entries.

Idempotency keys prevent double-billing or double-deducting litres when shaky yard Wi-Fi drops mid-POST. If an operator attempts to upload a conflicting meter adjustment or an asset flagged as decommissioned since the morning sync, the record enters an explicit supervisor review queue rather than failing silently or blocking valid subsequent dispenses.

Performance & Scale

Fuel yards demand large touch targets, high-contrast outdoor legibility, and zero interface lag while wearing gloves. The Vue component tree keeps bundle sizes compact through route-level code splitting, caching application shells in Workbox so cold launches take place locally without waiting on network round-trips.

Catalog synchronization uses incremental delta cursors rather than pulling the full enterprise fleet registry on every shift refresh. Even depots managing thousands of plant items and subcontractors sync changes rapidly over edge cellular connections, while PostgreSQL partitioned ledger tables keep multi-year wet-stock variance queries fast for finance audits.

Operational Outcomes

Moving fuel custody from clipboards into a validated Vue and TypeScript field workflow eliminated transcription guesswork at the pump and closed the gap between physical tank levels and fleet allocation reports. Operators complete refuelling handovers rapidly regardless of site connectivity, and depot managers gain timely visibility into meter continuity, bulk deliveries, and asset-level fuel efficiency from a single web ledger.

01 — Questions

asked about this kind of project

Why build a Vue and TypeScript Progressive Web Application instead of a native mobile app for fuel yards?

Depot crews operate a mix of ruggedized Android handhelds, shared yard tablets, and contractor phones where MDM rollout cycles slow down hotfixes. A Vue and TypeScript PWA deploys instantly across browsers, installs cleanly to the home screen, and still persists offline dispense transactions reliably in IndexedDB.

How does the application prevent impossible or mistyped meter readings at the pump?

Every pump stores its last verified closing totalizer value locally alongside the active catalog. The TypeScript domain layer enforces monotonic meter progression—blocking closing figures lower than opening values, flagging abnormal volume spikes against vehicle tank capacity, and handling mechanical meter rollovers explicitly.

What happens if two fuel attendants record dispenses from the same mobile bowser while offline?

Dispense records are submitted as append-only events carrying opening and closing meter readings, timestamps, and operator IDs rather than simple balance decrements. When both devices reconnect, the server sequences events by meter totalizer order, exposing any physical gap or overlapping reading to depot supervisors for review.

How do operators verify vehicles or plant machinery without reliable connectivity?

At shift start or whenever online, the PWA syncs a compact snapshot of authorized sites, pumps, fuel grades, and active fleet assets into IndexedDB. Operators scan QR tags via the device camera or filter by fleet registration offline with zero server round-trips.

How is fuel shrinkage or wet-stock variance surfaced for depot managers?

By uniting bulk delivery dockets, periodic physical tank dip measurements, and metered dispense totals inside one PostgreSQL ledger, the web console computes expected versus measured tank stock continuously and isolates discrepancies to specific shifts, bowsers, or fuel grades.

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.