← BACK TO WORK INDEX
01 · CLIENT PROJECT / BUSINESS SOFTWARE

FMCG Sales & Distribution Platform

A custom management application developed around sales and distribution workflows in a manufacturing and retail business environment.

CATEGORY
Client Project / Business Software
STATUS
In Active Client Deployment
TECHNOLOGIES
PythonFastAPIPostgreSQLFlutterSQLiteDocker

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.

CORE OPERATIONAL PROBLEM

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.

FMCG_SECONDARY_SALES_ENGINE · PROD_NODE_01
ACTIVE
GEOFENCE ACCURACY
± 8.4 meters
Haversine verified
OFFLINE BUFFER
0 pending
SQLite local commit
ACTIVE BEATS
14 Reps
Live GNSS streaming
STORE / OUTLETBATCH IDSKU / COMMODITYQTYEXPIRY RISKSTATUS
Rahman Store (Dhanmondi #2)
Beat Seq #04 · Check-in 09:42 AM
B26-0881Packaged Beverage (250ml)48 csNormal (84d)Committed
Ananda General Store
Beat Seq #05 · Check-in 10:15 AM
B26-0742Dry Goods Carton (1kg)24 csNear-Expiry (14d)Dispatched
Bhai Bhai Grocery
Beat Seq #06 · Check-in 10:50 AM
B26-0912Retail Consumer Pack (500g)12 csNormal (180d)Committed

04Key Engineering Decisions

Geofenced Check-In & Proximity Sorting

DECISION 01

Implemented 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 02

Designed 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 03

Built 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 04

Enforced 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.

CONFIDENTIALITY NOTICE

Client identity and proprietary business records are kept confidential under non-disclosure terms. Architecture descriptions reflect actual implemented technical workflows without fabricated metrics.

← Back to Work IndexNext Case Study: Construction Management →