Skip to content
vinhnq.com
All projects

Wala-ICT

BitBuild

Multi-tenant construction procurement SaaS

Main Backend Engineer · Team of 4 · first sprint to production

The problem

A new multi-tenant product needed clear boundaries and purchase flows that never duplicate.

Architecture

RequestReleaseTenantsweb clientsREST APIHexagonal · JWT · RBACPostgreSQLwith Redis and MinIOGitLab CIDocker Compose
BitBuild multi-tenant backend

Simplified view, no client internals.

What I delivered

  • Restructured the codebase into a multi-module hexagonal architecture, with ArchUnit tests enforcing boundaries.
  • Used idempotency keys against duplicate purchase orders and advisory locks for run-once scheduled jobs.
  • Set up GitLab CI and Docker Compose deployments with health checks.
  • Built multi-tenant authentication: JWT with refresh-token rotation, Redis-based revocation, social login, and RBAC with data scopes (self, assigned sites, tenant-wide).
  • Owned the domain model, PostgreSQL schema, and REST APIs for procurement, contract, approval, and supplier modules.

Key decisions

Enforce architecture with tests

ArchUnit tests keep layer boundaries from eroding as the multi-module hexagonal codebase grows.

Assume every send and job can repeat

Idempotency keys stop duplicate purchase-order transmission, and PostgreSQL advisory locks make scheduled jobs run once across instances.

Stack

Java 21 · PostgreSQL · Redis · GitLab CI

All projects