trong.
Enterprise solution

Tran Tien Dat

One commerce hub behind a website, Facebook, TikTok and a Mini App.

Year
2026
Client
Tran Tien Dat
Role
Lead engineer
Duration
5 months

Case study

The brief

An e-commerce operation that sells across a website, Facebook, TikTok and a Zalo Mini App, while fulfilment happens in Pancake POS. Four storefronts, one warehouse, and no single place where anyone could see what was actually happening.

The approach

An Express + MongoDB backend as the hub, with the storefronts as thin clients: a Next.js site, a Fuse React control panel, a Zalo Mini App, plus a small Python search service kept separate so product search could be tuned without redeploying the API.

Twenty-six route groups carry the integrations: Pancake for orders, warehouse transfers, returns and exchanges, each with its own cron reconciliation; Facebook pages, posts and ads; TikTok; web push; and an AI layer (OpenAI and Gemini, with a stored prompt library) used for product copy.

The harder parts

Every external platform fails differently and none of them apologise. Pancake syncs run as cron reconciliations rather than one-shot calls, because a webhook that never arrives is not an exception — it is Tuesday. Tokens for four platforms each expire on their own schedule, so they're modelled explicitly and refreshed on a job rather than caught as errors during checkout.

Stack

  • Express
  • MongoDB
  • Next.js
  • Fuse React
  • Zalo Mini App
  • Python
  • Pancake POS API
  • Facebook Graph API
  • OpenAI
  • Gemini
  • AWS S3