Completed Web Application

AlphaCue Imports — Import E-commerce Platform with Affiliate Network and Landed-Cost Accounting

An import business running end to end on one system: storefront, reseller network, and books that know what every shipment actually cost.

AlphaCue Imports — Import E-commerce Platform with Affiliate Network and Landed-Cost Accounting
01 — THE PROBLEM

An importer buying from China and selling in Bangladesh is running three businesses at once and usually tracking none of them properly. The real cost of a product isn't known at order time — the freight charge doesn't exist until the shipment lands and the agent weighs it, and the agent's billed weight never matches the sum of what you measured. So margins get guessed from the RMB price, loss-making products go unnoticed for months, and stock is a number in a spreadsheet that can't explain where it came from. Layer a commission-paying reseller network on top, and there's a second set of money movements — clicks, attributed orders, pending earnings, bKash payouts, fraud — that no off-the-shelf storefront tracks.

02 — OUR SOLUTION

One Django platform covering all three. A public storefront with product variants, zone-based delivery pricing, and cookie-attributed referral tracking. An affiliate and reseller system with configurable commission rules (global, per-product, and per-affiliate custom pricing), a pending approved paid earnings ledger, withdrawal requests to bKash and Nagad, and a fraud-flag investigation log. Underneath both, a hybrid double-entry ledger built on a hard rule: no balance is ever stored, every figure is derived from summed transaction lines, so nothing can disagree with itself. Posted transactions are immutable corrections happen as reversal entries, never edits and all posting runs through a single atomic service that rejects any entry whose lines don't sum to zero. The costing engine models the China import flow as genuinely two-stage: RMB goods cost at order, then on arrival the agent's billed weight is entered, line weights are scaled to reconcile with it exactly, freight and Bangladesh-side costs are allocated by weight, and a correction percentage lands on the full subtotal producing a true landed cost per unit that flows into FIFO stock batches and follows each unit to the sale.

Outcome

Shipped and in production — the storefront and affiliate system went live first, then the finance module was built out across eleven milestones, all complete. 35 models across three apps, 495 tests, and a documented cPanel deployment path. The system now answers the questions the owner actually asks — how much cash do I have, what does this client owe me, how much is left on the loan, which products are losing money — from one ledger rather than four spreadsheets, and the finance panel was subsequently rebuilt to be usable from a phone.

Key features

  • Public storefront with categories, product variants, multi-image galleries, and attribute-based options
  • Zone-based delivery pricing (inside/outside Dhaka) with a configurable free-delivery threshold
  • Guest and account checkout with order-number generation and full order-status management
  • Affiliate program with cookie-based referral attribution and raw click logging
  • Configurable commission engine — percentage or flat, with global, per-product, and per-affiliate overrides
  • Reseller custom pricing per product per affiliate
  • Commission ledger with a pending approved paid lifecycle
  • Withdrawal requests to bKash and Nagad with a minimum-payout threshold
  • Fraud flagging and investigation log for suspicious referral activity
  • Double-entry ledger where every balance is derived, never stored
  • Immutable transactions — corrections are posted reversals, enforced at the service layer
  • Two-stage China import costing: RMB goods at order, weight-based freight on arrival
  • Weight reconciliation that scales line weights to match the agent's billed total exactly
  • Bangladesh-side costs allocated by weight, with remainders routed so allocations sum exactly
  • FIFO stock batches with a full movement ledger and per-batch consumption records
  • Margin report comparing true landed cost against selling price, sortable to surface loss-makers
  • Client and supplier parties with invoicing, dues tracking, and payment allocation
  • Cash, bank, and mobile-money account management with opening balances posted as transactions
  • Investor capital tracking with profit distribution and per-investor shares
  • Loan management with installment schedules and payment tracking
  • Owner dashboard and reports — cash position, receivables, payables, profit by period, trial balance
  • Mobile-optimised staff finance panel

Tech stack

Django 4.2 Python MySQL WhiteNoise django-ckeditor Pillow Passenger/cPanel Bootstrap Vanilla JS Google Analytics bKash Nagad

Build something similar?

Tell us about your project. We'll share how we'd approach it.

Start a project