01 · Personal · Multi-tenant SaaS

FLOWCOMMERCE

A production-grade multi-tenant SaaS platform for fitness businesses.

Next.jsNestJSPrismaPostgreSQLRedisRabbitMQTypeScriptSwaggerDocker

Challenge

Managing memberships, subscriptions, payments and attendance across multiple branches is difficult.

  • ✓Multi-tenant isolation across gym chains without fragmenting the codebase
  • ✓Immutable financial records, invoicing, and comprehensive audit trails
  • ✓Event-driven subscription & payment workflows via RabbitMQ

Engineering Decisions

  • ✓DDD modular monolith over premature microservices — one deployable unit with extractable bounded contexts
  • ✓Event-driven subscription and payment flows via RabbitMQ for reliable async processing
  • ✓Immutable financial records with comprehensive audit trails for compliance

Architecture

CLIENTSNEXT.JS FRONTENDMULTI-TENANTNESTJS MODULAR MONOLITHEVENT-DRIVEN MESSAGINGDATA LAYERPLATFORMGym AdminMember PortalSSR / APINext.js App RouterDashboardAnalyticsBillingAttendanceRESTTenant AGym ChainTenant BStudioRBACRoles · PermissionsisolatedDDD · MODULAR MONOLITHAuthMembershipSubscriptionsPaymentsInvoicingAttendanceAnalyticsRabbitMQEvent HandlersasyncDomain Eventspub/subRedisPostgreSQLPrisma ORMAudit LogsimmutableDockerSwaggerHealth / ReadinessCI/CD ReadyUnit · E2E Tests

Hover Tenant, Frontend, Domain modules, Payments, RabbitMQ, Redis, or PostgreSQL to explore each flow.

Swipe left to explore the full diagram →

Impact

  • ✓Full gym lifecycle: membership → subscription → payment → attendance
  • ✓DDD modular monolith — extractable to microservices when scale demands
  • ✓Dockerized deploy with health checks, Swagger, Redis cache, and CI/CD foundation