Skip to main content

System architecture

Bot Ban Hang uses a multi-service monorepo architecture — services live in the same repo but are deployed and scaled independently.

Overview diagram

Services

api_oms — Order Management Service

Core sales business management:

  • Order — Create, update, cancel orders
  • Product & Variant — Product and variant management (size, color, ...)
  • Inventory — Stock management, auditing
  • Shipping — Integration with 8 shipping carriers
  • Billing — Invoices, payments
  • Loyalty — Points program, promotions
  • Vendor — Supplier management
  • Integration — Facebook sync, partner webhooks

api_payment — Payment Gateway

Centralized payment gateway with multi-platform integration:

PlatformType
MoMoE-wallet
ZaloPayE-wallet
VNPayPayment gateway
StripeInternational payments
SquarePOS
MPOSMobile POS
SePayAutomatic bank transfer
Bank transferBank
CashCOD

web_payment — Payment UI

Next.js payment interface for customers — displays payment forms, QR codes, redirects to payment gateways.

Tech Stack

  • Runtime: Node.js 20+
  • Backend: NestJS
  • Frontend: Next.js · React 18
  • ORM: Prisma
  • Database: PostgreSQL
  • Package Manager: pnpm