Skip to content
MartinsAI.
All work
Architecture & core modules in progressLead architecture & engineering

BluuPay v3

Multi-tenant SaaS ERP & retail POS for African SMEs

BluuPay v3 is a ground-up engineering blueprint for a multi-tenant SaaS ERP and retail point-of-sale platform, built as a modular monolith inside a Bun workspaces + Turborepo monorepo. The system is scoped across nine functional modules and sixteen industry verticals, with seven separate applications — web, marketing, e-commerce, admin, POS, mobile, and docs — sharing a common core.

The architecture leans on MikroORM's defineEntity pattern for schema definition, TriggerDev v3 for background job orchestration, oRPC for end-to-end type-safe API contracts, and BetterAuth paired with Zitadel for authentication and identity. Real-time data sync between the POS clients and the backend runs through ElectricSQL and TanStack DB, which matters for retail environments where connectivity can't be assumed to be reliable.

The full scope is tracked as a 151-task design-first task registry, sequencing the module and vertical rollout before implementation begins in earnest. Earlier work on the same system focused on the financial core specifically: bank account management and settlement processing in Laravel, using BCMath-safe precision arithmetic to avoid floating-point drift in money calculations, optimistic locking to keep concurrent settlement writes correct, and general-ledger account patterns for auditability.

Highlights

  • Nine-module, sixteen-vertical scope sequenced into a 151-task design-first registry before implementation
  • BCMath-safe precision arithmetic and optimistic locking for settlement correctness under concurrent writes
  • ElectricSQL + TanStack DB for local-first sync across POS terminals with unreliable connectivity

Stack

TypeScriptLaravelBunMikroORMPostgreSQLElectricSQLTanStack DBoRPCTriggerDevBetterAuthZitadel

Have something similar in mind?

Let's talk