BACK TO ALL PROJECTS
SaaSPERIOD: 2024 – PresentCuritiba, Brazil (Remote)

Multi-Tenant SaaS Engine

Independent Monorepo Architecture for High-Scale Enterprise Web Applications

Conceived and built an independent production-ready SaaS core engineered to power multi-tenant web products with enterprise-grade background task handling, resilient API gateways, and modular code sharing.

ArchitectureMonorepo
Queue EngineBullMQ + Redis
Tenant IsolationMulti-Tenant

THE PROBLEM & CONTEXT

Generic boilerplate frameworks lack robust tenant data separation, reliable queue retries for heavy workflows, and unified type safety between micro-modules.

THE ARCHITECTURAL SOLUTION

Engineered a monorepo featuring reusable NestJS backend modules, shared authentication, distributed worker pools with BullMQ & Redis, and automated invoice/notification integrations.

SYSTEM ARCHITECTURE & DESIGN HIGHLIGHTS

01Monorepo configuration with strict boundary separation and shared TS packages
02Multi-tenant database schema with tenant key scoping using PostgreSQL + Prisma
03Asynchronous background worker threads powered by BullMQ & Redis
04Third-party webhook pipeline for WhatsApp, Email, & Electronic Invoicing (NF-e)

ENGINEERING CHALLENGES

  • Preventing tenant data leaks across asynchronous worker threads in high-concurrency background jobs.
  • Handling idempotent webhook callbacks from financial and governmental APIs under network instability.

LESSONS & KEY TAKEAWAYS

  • Decoupling core business logic into dedicated worker queues guarantees system responsiveness under heavy payload bursts.
  • Monorepos with strict boundary enforcement vastly accelerate feature velocity while maintaining clean architecture.

TECHNOLOGY STACK USED

NestJSTypeScriptPostgreSQLPrisma ORMBullMQRedisNext.jsDockerGitHub ActionsMercado Pago APIFocus NF-eEvolution API
uptime: disponível·region: Curitiba, BR·
resposta em <24h·v2.0.0