Computer & Gaming E-commerce: Complete Flows

Single-vendor shop for Bangladesh (BDT). Built from BRD.md v1.3 and spec.md v1.2.

Business at a glance

One seller (the Super Admin) sells computers, parts and gaming gear online to young buyers across Bangladesh, from several internal branches.

Objectives

  • Sell nationwide, 24/7
  • Win young buyers with a fast, modern site
  • Be found on Google
  • Capture demand with pre-orders
  • Keep COD losses low
  • Run with a small team
  • Accurate stock and money

In scope

  • Storefront (Bangla/English, dark mode, installable)
  • Online payment, COD, EMI, pre-order
  • Specs, compare, PC Builder, search
  • Several branches, total stock shown
  • Orders, couriers, returns, warranty
  • Promotions, loyalty, reviews
  • Roles, audit, reports, CMS, SEO

Out of scope (v1)

  • Other sellers (multi-vendor)
  • Native mobile apps
  • Counter sales (POS)
  • Branch pickup
  • Full accounting, HR, payroll
  • International shipping
  • Any link to the Tohfa POS ERP

Technology

  • Laravel 12 + Inertia v2 + Vue 3
  • SSR for the storefront (SEO)
  • PostgreSQL, Redis, Meilisearch
  • Tailwind CSS, CDN images
  • See architecture.html

Owner's decisions

Values marked "setting" can be changed in the admin panel without a developer.

TopicDecision
Cash on deliveryNo order value limit; phone OTP required; outside Dhaka the delivery charge is paid in advance; switched off after 2 refused parcels (setting)
Pre-order20% advance (setting, per-product override) or full payment; balance due 5 days after stock arrives (setting); full refund if the customer cancels
Returns7-day window (setting); refunds above a set amount need a second approver
PaymentSSLCommerz (cards, net banking, EMI), bKash and Nagad directly; stock held 15 minutes during payment (setting)
CouriersPathao, Steadfast, RedX at launch; more added from settings
DeliveryZones: inside Dhaka, suburbs, outside Dhaka; free delivery threshold off at launch
BranchesSeveral physical branches, each with its own stock; customers see only total stock, never a branch; orders auto-assigned to the nearest branch that can fill them; staff see only their branches
SKULEN-LAP-156-LUM00001 style, children -01, -02; pattern configurable by the Super Admin; SKUs never change
Prices & languageVAT-inclusive prices; storefront Bangla + English; admin English only; dark theme default
Loyalty1 point per ৳100, 1 point = ৳1 (settings)
Digital productsAfter launch

Requirement map

How the BRD's requirement groups connect. Codes are the BRD requirement ID prefixes.

flowchart LR
  subgraph SF["Storefront"]
    ST["ST Home and navigation"]
    SR["SR Search and filters"]
    PD["PD Product page"]
    TL["TL Compare and PC Builder"]
    CK["CK Cart and checkout"]
    PM["PM Payment"]
    PO["PO Pre-order"]
    AC["AC Customer account"]
    EN["EN Engagement"]
  end
  subgraph AD["Admin panel"]
    CA["CA Catalogue and SKU"]
    IN["IN Inventory and branches"]
    OR["OR Orders and fulfilment"]
    DL["DL Delivery and couriers"]
    RT["RT Returns, refunds, warranty"]
    CU["CU Customers and support"]
    PR["PR Promotions and marketing"]
    CM["CM Content and SEO"]
    RP["RP Reports and dashboard"]
    ADM["AD Administration, roles, audit"]
  end
  ST --> SR --> PD --> CK --> PM
  PD --> TL --> CK
  PD --> PO --> PM
  CK --> OR
  PM --> OR
  AC --> RT
  CA --> PD
  CA --> SR
  IN --> PD
  IN --> OR
  OR --> DL
  DL --> RT
  PR --> PD
  PR --> CK
  CM --> ST
  CU --> OR
  EN --> PD
  OR --> RP
  IN --> RP
  ADM --> AD
  

Users & access

Two kinds of account with separate sign-in. The Super Admin is the seller; there is no seller registration.

flowchart LR
  subgraph CUST["Customers - storefront"]
    G["Guest<br/>browse, search, compare,<br/>PC Builder, buy with phone OTP"]
    R["Registered customer<br/>orders, tracking, wishlist, saved builds,<br/>alerts, points, returns, warranty, reviews"]
  end
  subgraph STAFF["Staff - admin panel"]
    SA["Super Admin = the seller<br/>every permission, every branch"]
    RB["Role builder<br/>permission grid by module"]
    T1["Store Manager<br/>all branches"]
    T2["Branch Manager<br/>own branches"]
    T3["Catalog Manager"]
    T4["Inventory Manager"]
    T5["Order Manager"]
    T6["Customer Support"]
    T7["Warranty / Service Officer"]
    T8["Marketing Manager"]
    T9["Accountant"]
    T10["Auditor<br/>view only"]
    CR["Any custom role"]
  end
  G -->|registers with the same phone| R
  SA -->|creates and edits| RB
  RB --> T1
  RB --> T2
  RB --> T3
  RB --> T4
  RB --> T5
  RB --> T6
  RB --> T7
  RB --> T8
  RB --> T9
  RB --> T10
  RB --> CR
  SA -->|invites staff, assigns roles and branches| U["Staff user"]
  U --> BQ{"Has all-branch access?"}
  BQ -->|yes| ALL["Sees every branch"]
  BQ -->|no| OWN["Sees only assigned branches"]
  
Customer typeWhoWants
Gamer (16–28)Latest GPUs, consoles, peripheralsPre-orders, flash deals, what fits their build
Student / first-time buyerLaptop or budget PCEMI, clear advice, reviews
Freelancer / creatorWorkstation parts, monitorsFast delivery, warranty, VAT invoice
PC builderEnthusiastExact specs, compatibility, comparison
Guest buyerOne-offBuy without an account

Roles & permissions flow

Permissions say what a user can do; branch assignment says where.

flowchart TD
  A["Super Admin signs in<br/>2-step sign-in"] --> B["Roles: new role or clone a template"]
  B --> C["Tick permissions by module"]
  C --> D{"Editor holds every ticked permission?"}
  D -->|no| E["Blocked: nobody can grant what they do not hold"]
  E --> C
  D -->|yes| F["Role saved, audit log entry"]
  F --> G["Users: invite by email, 72-hour link"]
  G --> H["Assign roles and branches"]
  H --> I{"Role can change settings, roles or approve refunds?"}
  I -->|yes| J["2-step sign-in required"]
  I -->|no| K["Normal sign-in"]
  J --> L["Every request checked:<br/>permission policy + branch scope"]
  K --> L
  L --> M["Sensitive actions written to the audit log"]
  

Shopping journey

From first visit to after-sale. Stock shown is always the total across branches.

flowchart TD
  H["Home<br/>banners, flash deals, new arrivals,<br/>pre-order launches, brands"] --> NAV{"How do they look?"}
  NAV --> S["Instant search<br/>typo tolerant, Bangla and English"]
  NAV --> CAT["Category, brand or collection page<br/>spec filters, price, availability, sort"]
  NAV --> PCB["PC Builder"]
  S --> PDP["Product page<br/>gallery, variant picker, price + EMI,<br/>total stock, specs, warranty, reviews, Q and A"]
  CAT --> PDP
  PDP --> ACT{"Action"}
  ACT -->|compare| CMP["Compare up to 4"]
  CMP --> PDP
  ACT -->|wishlist or notify me| WL["Wishlist and stock / price alerts"]
  ACT -->|add to PC Builder| PCB
  ACT -->|add to cart or buy now| CART["Cart"]
  PCB --> CART
  CART --> CO["Checkout"]
  CO --> DONE["Order placed<br/>confirmation page + SMS and email"]
  DONE --> TRK["Track order<br/>account, or order number + phone"]
  TRK --> DEL["Delivered"]
  DEL --> AFTER["Review, return, warranty claim, loyalty points"]
  

PC Builder

Compatibility rules are data that staff can adjust, not code.

flowchart TD
  A["Open PC Builder<br/>or start from a ready-made build"] --> B["Pick a slot, e.g. CPU"]
  B --> C["Picker shows compatible products<br/>show-all switch flags the rest"]
  C --> D["Add part"]
  D --> E["Check rules:<br/>CPU socket = board socket<br/>RAM type, slots, max GB<br/>board form factor fits case<br/>GPU length, cooler height<br/>M.2 slots, PSU wattage x 1.3"]
  E --> F{"Any rule broken?"}
  F -->|yes| G["Warning shown, part flagged"]
  G --> B
  F -->|no| H{"All required slots filled?"}
  H -->|no| B
  H -->|yes| I["Total price and estimated wattage"]
  I --> J{"Next"}
  J --> K["Save to account"]
  J --> L["Share by link"]
  J --> M["Quotation PDF"]
  J --> N["Add whole build to cart<br/>plus optional assembly service"]
  

Checkout & place order

Totals are always recalculated on the server; the order, stock reservation and payment record are created in one transaction.

flowchart TD
  A["Cart"] --> B{"Signed in?"}
  B -->|no| OTP["Guest: phone number + OTP"]
  B -->|yes| ADDR
  OTP --> ADDR["Address: division, district, area"]
  ADDR --> DLV["Delivery charge:<br/>zone x shipping class x weight"]
  DLV --> PMQ{"Payment method"}
  PMQ --> ON["Card, net banking or EMI<br/>SSLCommerz"]
  PMQ --> MW["bKash or Nagad"]
  PMQ --> PRE["Pre-order:<br/>20% advance or full"]
  PMQ --> CODQ{"COD allowed?<br/>OTP verified, COD not switched off,<br/>not digital, no unpaid pre-order"}
  CODQ -->|no| PMQ
  CODQ -->|yes| DHK{"Outside Dhaka?"}
  DHK -->|yes| ADV["Pay the delivery charge online first"]
  DHK -->|no| REV
  ADV --> REV
  ON --> REV
  MW --> REV
  PRE --> REV
  REV["Review: one coupon, loyalty points, totals"] --> PLACE["Place order"]
  PLACE --> T1["Recalculate totals on server"]
  T1 --> T2["Choose fulfilment branch"]
  T2 --> T3["Lock and check stock"]
  T3 --> T4["Create order and lines"]
  T4 --> T5{"Online payment?"}
  T5 -->|yes| H1["Reserve stock as a 15-minute payment hold"]
  H1 --> GW["Go to payment gateway"]
  T5 -->|no, COD| H2["Reserve stock for the order"]
  H2 --> PEND["Order pending<br/>staff confirm by call or OTP"]
  

Online payment

An order is paid only after the gateway confirms it server-to-server. Repeated callbacks do nothing.

sequenceDiagram
  autonumber
  participant C as Customer
  participant S as Shop server
  participant G as Gateway - SSLCommerz, bKash, Nagad
  C->>S: Place order
  S->>S: Payment record initiated, 15-minute stock hold
  S->>G: Start payment
  G-->>C: Payment page - card, wallet or EMI
  C->>G: Pay
  G-->>S: Callback or IPN
  S->>G: Server-to-server validation
  alt Valid and amount matches
    S->>S: Payment paid, order confirmed, hold becomes order reservation
    S-->>C: Success page, SMS and email
  else Failed or cancelled
    S-->>C: Failed page, retry allowed until the hold expires
  end
  Note over S: Hold expired - order cancelled, stock released
  Note over S,G: Daily job - gateway settlements vs recorded payments
  

Price & promotions

One pricing service decides every price, everywhere.

flowchart TD
  A["Variant unit price"] --> B{"Flash deal active with quantity left?"}
  B -->|yes| P1["Deal price"]
  B -->|no| C{"Variant on pre-order?"}
  C -->|yes| P2["Pre-order price"]
  C -->|no| D{"Sale price within dates?"}
  D -->|yes| P3["Sale price"]
  D -->|no| E{"Quantity tier reached?"}
  E -->|yes| P4["Tier price"]
  E -->|no| P5["Selling price"]
  P1 --> F
  P2 --> F
  P3 --> F
  P4 --> F
  P5 --> F
  F["Cart level:<br/>automatic offers, then one coupon, then loyalty points"] --> G{"Below minimum selling price?"}
  G -->|yes| H["Held at the minimum<br/>unless staff have price override"]
  G -->|no| I["Line total"]
  H --> I
  I --> J["Order total = lines + delivery - discounts<br/>VAT-inclusive, BDT"]
  

Branch assignment

Branches are internal. The customer never learns which branch ships the order, and the delivery charge never depends on it.

flowchart TD
  A["New order"] --> M{"Fulfilment mode setting"}
  M -->|manual| Q["To-assign queue<br/>all-branch staff pick a branch"]
  M -->|auto| B["Candidates: active branches that ship online<br/>and can fill every line"]
  B --> C{"Any candidate?"}
  C -->|yes| R["Rank: same district, same division,<br/>lowest priority, most stock"]
  R --> S["Assign the first, reserve stock there"]
  C -->|no| T["Assign the branch that fills most lines<br/>flag: needs branch action"]
  T --> U{"Staff decide"}
  U -->|default| V["Transfer missing items to that branch<br/>packing waits for receipt"]
  U -->|if split allowed| W["Split into two shipments"]
  S --> X["Branch staff fulfil"]
  V --> X
  W --> X
  Q --> X
  X --> Y{"Move before packing?"}
  Y -->|yes, with reassign permission| Z["Reassign: reservations move, change logged"]
  Z --> X
  Y -->|no| PK["Continue to packing"]
  

Order lifecycle

Orders can be edited until they are packed. Every status change goes to the order timeline and the audit log.

stateDiagram-v2
  [*] --> pending : order placed
  pending --> confirmed : paid online or COD confirmed
  pending --> cancelled : payment hold expired or cancelled
  confirmed --> processing : picking
  processing --> packed : serials scanned, invoice and label
  packed --> shipped : handed to courier
  shipped --> delivered : courier confirms
  shipped --> delivery_failed : refused or unreachable
  delivered --> returned : return approved and received
  confirmed --> cancelled : cancel with reason
  processing --> cancelled : cancel with reason
  [*] --> pre_ordered : pre-order placed
  pre_ordered --> awaiting_stock
  awaiting_stock --> ready : stock allocated and fully paid
  ready --> confirmed
  awaiting_stock --> cancelled : balance unpaid or customer cancels
  delivered --> [*]
  delivery_failed --> [*]
  returned --> [*]
  cancelled --> [*]
  note right of packed : no edits after this point
  

Fulfilment & delivery

flowchart TD
  A["Confirmed order at its branch"] --> B["Processing: pick items"]
  B --> C{"Serial-tracked product?"}
  C -->|yes| D["Scan serials<br/>linked to the order line for warranty"]
  C -->|no| E
  D --> E["Packed: VAT invoice with business name,<br/>packing slip"]
  E --> F["Book courier: Pathao, Steadfast, RedX or Manual<br/>using the branch's pickup account"]
  F --> G["Tracking number and label<br/>status by webhook, polling as fallback"]
  G --> H["Shipped: stock leaves on-hand<br/>SMS with tracking link"]
  H --> I{"Outcome"}
  I -->|delivered| J["Delivered: points added, review request,<br/>COD amount due from courier"]
  I -->|refused or unreachable| K["Delivery failed: parcel back to branch,<br/>stock back in, COD refusal counted"]
  K --> L{"Refusals reached the limit of 2?"}
  L -->|yes| M["COD switched off for this customer<br/>staff can restore it"]
  L -->|no| N2["COD stays on"]
  J --> N["COD reconciliation:<br/>collected vs paid in by each courier"]
  

Pre-order

flowchart TD
  A["Staff mark a variant as pre-order<br/>expected date, price, quantity limits, advance %"] --> B["Product page: Pre-order badge and date"]
  B --> C["Customer orders<br/>20% advance or full; price locked"]
  C --> D["Order: pre_ordered, then awaiting_stock"]
  D --> E{"Expected date changes?"}
  E -->|yes| F["Everyone notified<br/>may cancel for a full refund"]
  D --> G["Goods received at a branch"]
  G --> H["Allocate to pre-orders, oldest first<br/>stock reserved at that branch"]
  H --> I{"Fully paid?"}
  I -->|yes| J["Ready, then normal fulfilment"]
  I -->|no| K["SMS and email: pay the balance within 5 days"]
  K --> L{"Paid in time?"}
  L -->|yes| J
  L -->|no| M["Cancelled, advance refunded,<br/>stock goes to the next pre-order"]
  H --> N["Leftover stock: variant becomes in stock"]
  

Returns & refunds

flowchart TD
  A["Customer requests a return within 7 days<br/>reason and photos"] --> B{"Eligible?<br/>return-eligible product,<br/>unopened or defective on arrival"}
  B -->|no| R["Rejected, customer notified"]
  B -->|yes| C["Approved: courier pickup or drop-off"]
  C --> D["Received at a branch"]
  D --> E{"Condition of each unit"}
  E -->|resaleable| F["Back to stock, serial in stock"]
  E -->|damaged| G["Damage write-off, serial damaged"]
  F --> H["Refund requested"]
  G --> H
  H --> I{"Above the approval amount?"}
  I -->|yes| J["Second approver with refund approval"]
  I -->|no| K
  J --> K["Refund processed"]
  K --> L{"How was it paid?"}
  L -->|online| M["Back through the same gateway"]
  L -->|COD| N["bKash, Nagad, bank or store credit"]
  K --> O["Earned points reversed,<br/>redeemed points returned"]
  

Warranty claim

flowchart TD
  A["Customer: My devices or order, then Claim<br/>or staff look up the serial number"] --> B["Check validity:<br/>delivery date + warranty period"]
  B --> C{"Within warranty?"}
  C -->|no| X["Rejected: expired"]
  C -->|yes| D["Submitted, then received at a branch"]
  D --> E["Sent to brand or service centre"]
  E --> F{"Result"}
  F -->|repaired| G["Repaired"]
  F -->|replaced| H["Replaced: new serial linked,<br/>keeps the remaining warranty"]
  F -->|physical damage or burn| I["Rejected"]
  G --> J["Returned to customer"]
  H --> J
  I --> J
  J --> K["Customer notified at every step<br/>and sees the claim in the account"]
  

Add a product

A 10-step form that can be saved as a draft at any step. The Excel bulk upload runs the same rules.

flowchart TD
  P0["Catalogue setup<br/>categories: code, spec template, variation themes, SKU field<br/>brands: code; attributes; warranty policies"] --> A["New product or Excel bulk upload"]
  A --> S1["1 Identity: name, type, category, brand, model"]
  S1 --> S2["2 Specifications from the category template"]
  S2 --> T{"Variable product?"}
  T -->|yes| S3["3 Variations: theme, values,<br/>combinations, bulk fill"]
  T -->|no| S4
  S3 --> S4["4 Pricing per variant:<br/>selling, regular, minimum, sale, tiers, EMI"]
  S4 --> S5["5 Inventory: availability, opening stock per branch,<br/>serial tracking, pre-order settings"]
  S5 --> S6["6 Images: main, gallery of 8, photos per colour, video"]
  S6 --> S7["7 Description: 5 bullets, rich text, in the box"]
  S7 --> S8["8 Warranty and return eligibility"]
  S8 --> S9["9 Shipping: weight, size, class"]
  S9 --> S10["10 SEO and visibility"]
  S10 --> SK["Save: SKUs generated"]
  SK --> Q{"Listing quality check"}
  Q -->|blocking error| FX["Fix: image, price, required spec, weight,<br/>pre-order date"]
  FX --> S1
  Q -->|passed, maybe warnings| PB{"Publish?"}
  PB -->|not yet| DR["Saved as draft"]
  PB -->|yes| LIVE["Live: search index and sitemap updated"]
  

SKU generation

Pattern from Settings, default BRAND-CATEGORY-SPEC-PREFIX+5-digit number. Only users with the SKU settings permission can change it.

flowchart TD
  A["Product saved for the first time"] --> B["Read the SKU pattern from settings"]
  B --> C["BRAND = brand code, e.g. LEN"]
  B --> D["CATEGORY = category code, e.g. LAP"]
  B --> E["SPEC = category's SKU field, cleaned<br/>15.6 inch becomes 156, 16 GB becomes 16G<br/>dropped if empty"]
  B --> F2["PREFIX = LUM"]
  C --> F["Lock the counter, take the next number<br/>never reused"]
  D --> F
  E --> F
  F2 --> F
  F --> G["Parent SKU, e.g. LEN-LAP-156-LUM00001"]
  G --> H{"Variable product?"}
  H -->|no| I["The parent SKU is the SKU that is sold"]
  H -->|yes| J["Child SKU per variant: -01, -02, ...<br/>new variants take the next suffix"]
  I --> K["SKU frozen forever<br/>barcode defaults to the SKU"]
  J --> K
  

Inventory & branches

Every change is an append-only stock movement at one branch. The storefront shows only the total.

flowchart LR
  PO["Purchase order<br/>for a branch"] --> GR["Goods received at the branch<br/>quantity, cost, serials"]
  GR --> MV["Stock movements<br/>append-only ledger"]
  GR --> AVG["Average cost updated"]
  GR --> PA["Pre-order allocation"]
  ADJ["Adjustment or damage"] --> MV
  CNT["Stock count finalized"] --> MV
  TR["Transfer between branches<br/>dispatched, in transit, received"] --> MV
  SH["Order shipped"] --> MV
  RET["Return received"] --> MV
  MV --> PS["Stock per branch<br/>on hand and reserved"]
  RES["Reservations<br/>15-minute payment hold or order"] --> PS
  PS --> TOT["Storefront: total available<br/>across all branches"]
  PS --> LOW["Low-stock alert"]
  PS --> STAFF["Staff see their branches;<br/>other branches read-only"]
  

Notifications

All sending is queued and logged. Templates are editable in both languages.

ToChannelEvents
CustomerSMS + emailOTP, order placed, payment received or failed, confirmed, shipped with tracking, delivered, cancelled; pre-order stock arrived, balance due, reminder, date changed; return, refund and warranty updates
CustomerEmail / pushBack in stock, price drop, abandoned cart, review request
StaffAdmin panel + emailNew order, COD to confirm, payment mismatch, low stock, new return, refund request or warranty claim, failed delivery, order needing branch action

Build phases

Launch = phases 1–7 plus the must-have items of 9 and 10.

flowchart LR
  P1["1 Foundation<br/>sign-in, roles, audit,<br/>settings, data table"] --> P2["2 Catalogue<br/>specs, variants, SKU,<br/>images, import"]
  P2 --> P3["3 Inventory<br/>branches, serials,<br/>transfers, reservations"]
  P3 --> P4["4 Storefront<br/>search, filters, product,<br/>compare, SEO"]
  P4 --> P5["5 Checkout and payment<br/>OTP, COD, cards,<br/>bKash, Nagad, EMI"]
  P5 --> P6["6 Orders and delivery<br/>branch choice, couriers,<br/>invoices, notifications"]
  P6 --> P7["7 Pre-order"]
  P7 --> P8["8 PC Builder"]
  P8 --> P9["9 After-sale<br/>returns, refunds,<br/>warranty, reviews"]
  P9 --> P10["10 Growth<br/>coupons, flash deals,<br/>loyalty, reports, blog"]
  

Full BRD

The complete text of BRD.md, as it was when this page was generated.

Show the full BRD

Full specification

The complete text of spec.md, as it was when this page was generated.

Show the full specification