FMCG Sales & Distribution Platform
A custom management application developed around sales and distribution workflows in a manufacturing and retail business environment.
01Operational Bottlenecks in FMCG Field Sales
Developed for high-volume retail distribution operations in Bangladesh (FMCG sector). The business operated across hundreds of retail outlets with mobile field representatives who required dependable inventory tracking and fast secondary sales booking.
Field sales previously relied on manual order slips and delayed phone communications. Discrepancies between mobile van stock and central distributor warehouses were common, and poor cellular reception frequently halted transactions.
Field sales representatives operating in suburban and rural trade areas frequently lost cellular reception inside concrete retail markets. When orders were placed without real-time stock checks, delivery vans would arrive with partial loads, creating high dispute rates with retail shopkeepers and delayed reconciliation.
02Engineering Scope & Responsibilities
As a software engineer on this project, I was responsible for:
- +Backend API Architecture: Designing modular REST endpoints in Python/FastAPI for order booking, stock checks, and attendance verification.
- +Database Schema Design: Modeling PostgreSQL schemas for multi-warehouse stock allocations, batch numbers, near-expiry flags, and territory access boundaries.
- +Offline Synchronization Protocol: Establishing an idempotent client-side SQLite buffer and sync queue ensuring orders never drop during network disconnects.
- +Deployment & Operations: Containerizing backend services via Docker, setting up Nginx reverse proxying, and configuring automated database backups.
03Operational Dispatch & Order Entry Console
Simulated reproduction of the primary dispatch and inventory status matrix used by territory managers and dispatch supervisors.
| STORE / OUTLET | BATCH ID | SKU / COMMODITY | QTY | EXPIRY RISK | STATUS |
|---|---|---|---|---|---|
Rahman Store (Dhanmondi #2) Beat Seq #04 · Check-in 09:42 AM | B26-0881 | Packaged Beverage (250ml) | 48 cs | Normal (84d) | Committed |
Ananda General Store Beat Seq #05 · Check-in 10:15 AM | B26-0742 | Dry Goods Carton (1kg) | 24 cs | Near-Expiry (14d) | Dispatched |
Bhai Bhai Grocery Beat Seq #06 · Check-in 10:50 AM | B26-0912 | Retail Consumer Pack (500g) | 12 cs | Normal (180d) | Committed |
04Key Engineering Decisions
Geofenced Check-In & Proximity Sorting
DECISION 01Implemented client-side Haversine distance calculations to sort scheduled outlet beats without taxing server resources, coupled with server-verified GPS geofence checks.
Dual-Phase Stock & Near-Expiry Alerts
DECISION 02Designed database models supporting lot/batch tracking, warning field representatives when selecting batches nearing expiry, and preventing over-commitments of physical van stock.
Crash-Proof Offline Buffer (locations.db)
DECISION 03Built a dedicated background tracking isolate that writes GNSS coordinates into a local SQLite database with distance-threshold filtering to prevent battery drain, batch-flushing on reconnect.
Strict Territory-Scoped Authorization
DECISION 04Enforced record scoping at the database query layer so Area Managers and Territory Officers only access records within their assigned operational jurisdictions.
05Field Realities & Trade-offs
Intermittent 2G/3G Connectivity
Field reps frequently operate in dense bazaar markets with dropped packets. We decoupled order creation from server confirmation, queuing payloads locally with idempotent replay keys.
Warehouse Return & Scrap Consistency
Handling damaged or expired retail returns required strict multi-stage verification before adjusting distributor credit lines or returning goods to virtual scrap locations.
Client identity and proprietary business records are kept confidential under non-disclosure terms. Architecture descriptions reflect actual implemented technical workflows without fabricated metrics.