Mobile & realtime · Full-stack delivery · 2024 — 2025

Offline-First Field Sales App & Realtime Tracking

A mobile ordering system for the field sales representatives of a regional distribution business: a full local replica of ERP master data, orders and credit notes composed offline and sent when connectivity returns, and a realtime tracking backend that shows directors where their teams are.

role
Full-stack engineer
period
2024 — 2025
stack
IonicAngularCapacitorSQLiteLeafletASP.NET CoreSignalRSQL Server
// 01 context

The challenge

Sales representatives work in shops and warehouses with unreliable connectivity, yet every order depends on current customers, price lists, promotional discounts, stock and payment terms held in the ERP. The app had to work fully offline, reproduce the ERP’s pricing rules exactly, never lose a document, and later feed a live map of representatives and their customer visits without draining phone batteries.

// 02 delivery

What I contributed

  1. 01

    Built the Ionic and Angular app on Capacitor with a local SQLite replica of ERP master data — customers, delivery sites, products, price lists, promotions, stock, payment terms — refreshed on demand and once a day.

  2. 02

    Implemented order and credit-note workflows with a three-state document lifecycle (draft, closed, sent) so that a failed send degrades safely to “closed” and is retried later instead of being lost.

  3. 03

    Reproduced ERP pricing on the device: customer rebates, time-boxed promotional discounts with wildcard matching, VAT-inclusive and VAT-exclusive totals, and a confirm-amount step for credit notes.

  4. 04

    Added barcode scanning scoped to the active sales programme, a map-based picker to geotag delivery sites, and an offline queue that replays location updates when the network returns.

  5. 05

    Designed and implemented the realtime tracking backend: an ASP.NET Core SignalR hub with per-user latest-location storage, visit logging, route stops and a director dashboard filtered to each director’s team.

  6. 06

    Shipped self-updating app distribution, connectivity-aware notifications, local schema migrations and automatic purging of old documents.

System viewOffline-First Field Sales App & Realtime Tracking
MOBILE APPIONIC · SQLITE REPLICASYNC APIMASTER DATA · ORDERSCREDIT NOTESERPSQL SERVERTRACKING HUBSIGNALR · PRESENCEVISITS · ROUTESDIRECTORSLIVE MAPOFFLINE QUEUE · RETRYGPS · VISITSLATEST LOCATION PER USER
// 03 architecture

Key decisions

01

Replicate, don’t request

The device holds the whole master-data set it needs; the network is only for sending documents and refreshing the replica, so a lost signal never blocks a sale.

02

Closed is a safe state

Documents move draft → closed → sent. Anything that fails on the way to the server falls back to closed — visible, retryable, never lost.

03

Presence from the connection

Online status derives from the SignalR connection lifecycle stored on the user record; live positions live in one row per user, upserted, instead of an in-memory cache that dies with the process.

04

Trade history for battery

The tracker keeps the latest location per representative and explicit visit events rather than a GPS trail — enough for the dashboard, cheap on the phone.

// 04 result

The outcome

Representatives compose and send orders from anywhere with the ERP’s own prices, documents survive bad connectivity, and directors see their teams and visits live on a map — all on top of the existing ERP without changing how it stores its data.

// contact

Have a complex system? Let’s make the next change safer and more useful.