← All work · Platform & DevOps

Multi-Broker Trading Backend & Delivery Pipeline

One codebase, many brokerages — each deployed to its own server with a single approved click.

Role: Architect & lead engineer

The challenge

Several brokerages ran the same Node.js/Express backend as separate repositories on separate servers. Every fix had to be repeated, versions drifted apart, and adding a new broker meant cloning yet another repo.

The solution

Unified everything into a single multi-tenant codebase where each broker is defined purely by configuration and environment. A GitHub Actions pipeline builds one Docker image, publishes it to GHCR and promotes it per broker behind a manual approval gate.

What was built

  • Per-broker environments with secrets managed in GitHub Environments
  • One Docker image, runtime configuration from each broker’s env file
  • Manual “publish” approval per broker after a successful build
  • Dev and production pipelines, tested end-to-end with a self-hosted runner
  • Automatic GHCR image clean-up and optional Telegram deploy notifications
  • Nginx + Certbot automation for each broker domain

Outcome

  • Brokers onboard by adding configuration, not a new repository
  • A single fix ships to every brokerage from one pull request
  • Repeatable, auditable deployments with a human approval step

Technology

Node.js, Express, Docker, GitHub Actions, GHCR, Nginx, Certbot, Ubuntu, Telegram Bot API

Case study by Shahfayaz Khan.