WAVES 2 - Adv. Sales Platform
Mobile Developer & UI/UX Designer at SpiralCode Innovates LLP
Case Study Narrative
The business context and technical outcomes of this project.
Merging primary and secondary sales created extreme validation challenges in the field, with salespersons bypassing rules and losing data in dead zones.
Ensure zero data loss for orders and checkouts in remote areas, enforce strict checkout rules (forced checkout constraints) to prevent fake shop visits, and automate travel expense auditing.
Implemented an offline-first architecture with BLoC, combining instant local database validation with a deferred, fire-and-forget sync queue using exponential retry backoff, alongside background mileage calculations based on GPS paths.
Ensured 100% reliable order synchronization, reduced fake shop check-ins through forced check-outs, and eliminated manual travel expense entry errors.
Offline-First Sync Architecture
Hover over any system node in the diagram below to inspect its technical details and implementation responsibility.
Flutter UI
BLoC
Repository
Local Hive
Background Sync
ERPNext API
Flutter UI
Reactive presentation layer with optimistic state updates.
BLoC
Business logic component handling local state validation.
Repository
Bridges local data and network services seamlessly.
Local Hive
Fast, zero-latency local key-value database.
Background Sync
3-stage transactional queue with exponential retry backoff.
ERPNext API
Central enterprise system receiving verified sync records.
Hover over any system component block to inspect the engineering implementation details.
Key Engineering Challenges
A detailed breakdown of low-level infrastructure and systems problems successfully solved during implementation.
The Challenge
Problem Statement
Merging primary and secondary sales created complexity in validation and data synchronization. The goal was to enforce strict sales discipline (e.g., forced checkout) while ensuring zero data loss in offline environments.
Research & Decisions
Sync Architecture
Adopted a 'Fire-and-Forget' UI pattern. Time & Location are captured at trigger, while heavy resolution (Google Maps API) happens in the background.
Sync Architecture
Adopted a 'Fire-and-Forget' UI pattern. Time & Location are captured at trigger, while heavy resolution (Google Maps API) happens in the background.
Validation
Combined instant local validation with deferred server-side checks. Photo proof is compressed locally before being queued for upload.
Validation
Combined instant local validation with deferred server-side checks. Photo proof is compressed locally before being queued for upload.
Resilience
Fail-safe Logic: The app stores reference data for manual sync if the 3-retry background worker encounters persistent network failure.
Resilience
Fail-safe Logic: The app stores reference data for manual sync if the 3-retry background worker encounters persistent network failure.
Features & Implementation
Technologies Used
Project Interface Flow
Visual layout mapping the primary interface checkpoints and telemetry data pipelines of the application.



