Skip to content
~nguyen-huu-trung
← Back to projects

Conexa · Platform for an e-commerce agency

An e-commerce operations platform integrated with Shopee

A backend syncing orders, stock, ads and reports for many Shopee shops, an admin console for the operations team and a public website — with the Node.js backend upgraded to Go step by step without downtime.

Role
Lead developer — backend, admin console (with a second developer), website
Period
2025 – 2026
Stack
TypeScriptNode.jsGoNext.jsReactMUIPostgreSQLRedisClaude APIDockerGitHub ActionsNginx

note: Private client work — described at architecture level only, no source or customer data.

  • Shopee

    orders, stock, ads, reports

  • 0

    downtime while upgrading the backend

  • 2

    languages across console and website

  • Log

    every change is logged

The problem

The agency runs ads and operations for many Shopee shops at once. They needed one place to see each shop’s orders, stock, ad performance and reports, schedule budget changes, and get alerts when something goes wrong.

The first version, which I wrote in Node.js, ran as a single process. As shops and background tasks grew it became heavy and hard to scale — but it was live and wrote directly to customers’ ad budgets, so it could not be stopped for a rewrite.

The approach

  1. 01

    Shopee integration

    Orders, stock, products, ad campaigns and reports for each shop are synced into PostgreSQL. When Shopee rate-limits a call the system waits and retries, and when a session expires it logs in again on its own.

  2. 02

    Upgraded piece by piece, not rewritten at once

    The backend was split into small Go services by area (accounts, campaigns, reporting, content) and moved over one part at a time. During the move the old and new versions ran side by side and their results were compared before the old one was switched off.

  3. 03

    Safe background jobs

    Scheduled tasks (budget updates, data collection, report exports) run in the background, with a lock so nothing runs twice and automatic retries on failure. Large reports run as jobs with progress, so users can close the tab and come back for the file.

  4. 04

    A role-based admin console

    A Next.js console for the operations team: campaigns, schedules, budget rules, alerts and reports, in Vietnamese and English. Access is split by level (manager, leader, staff) and by shop; API keys stay on the server and never reach the browser.

  5. 05

    AI suggests, a person approves

    Every hour Claude looks at the numbers and suggests raising or lowering a budget. Rules in code decide whether the suggestion is applied automatically or waits for a person to approve it, and every decision is logged with its reason.

  6. 06

    Running production

    Logs, alerts to the team chat on errors, a health check for every service, and automated deploys with GitHub Actions. When production moved to a new server, data was synced ahead following a runbook, so the move took only a few minutes of downtime; the database is backed up nightly.

Architecture

Front ends

admin console

Next.js · role-based · vi/en

website

server-rendered · blog

Entry

API gateway

JWT, routing

Services

accounts

accounts, sign-in

campaigns

schedules, budgets

reporting

metrics, reports

content

website content

Background

workers

scheduled jobs

AI suggestions

Claude + human approval

Data

PostgreSQL

Redis

cache, locks

Two Next.js front ends behind one gateway; Go services per area own the data, heavy work runs on workers.

Outcome

  • The operations team runs its day on a bilingual console, with each person seeing only the shops and data they are allowed to.
  • The Node.js backend was replaced by Go services without stopping the system; background work now runs across several workers instead of one process.
  • AI budget suggestions run in production but always within the rules, and anything that needs approval waits for a person.
  • The public website and its bilingual blog read content from the same backend and render on the server so Google can index them.
  • The business logic and source belong to the client; what is shown here stops at architecture and approach.