All work

Case study 01 Multi-tenant SaaS

Together CRM

A production B2B CRM serving multiple business clients — an API gateway in front of roughly twelve domain services, with every tenant's data in its own database.

Role
Full Stack Engineer & Agile Lead
Company
WJS Digital Innovations
Period
2024 — 2026
Focus
Architecture, backend, production operations

fig. 01 — gateway + domain services · db per tenant

requests api-gateway auth · rbac/abac ≈12 domain services svc·01 svc·02 svc·03 svc·04 svc·05 svc·06 svc·07 svc·08 svc·09 svc·10 svc·11 svc·12 redis rabbitmq socket.io docker · aws · k6 load tests db / tenant tenant_a tenant_b tenant_c tenant_n …
Illustrative diagram — not a product screenshot.

Business clients needed one CRM that felt like their own: their data isolated, their permissions respected, and their teams updated in real time.

As the product grew, so did its capabilities — contacts, messaging, notifications, background processing and integrations. The platform had to keep adding features without letting one tenant's data, load or failures leak into another's.

  • 01Feature ownershipTook features from product requirement through API design, UI implementation, deployment and validation.
  • 02Service designDefined service boundaries, REST APIs and RPC contracts between domain services.
  • 03SecurityImplemented authentication, RBAC/ABAC authorization and strict tenant isolation.
  • 04ProductionDeployed with Docker on AWS behind Nginx and PM2, and investigated and fixed live issues.
  • 05QualityLed CRM testing and quality validation with 50+ Google developers through a Technion QA partnership.

NoteTogether CRM was built by a team. This page describes the parts I owned or co-owned, at a level of detail that doesn't expose internal implementation.

A request enters through the Express gateway, which authenticates the caller, establishes tenant context and routes to the owning domain service. Services talk over REST and RPC, hand long-running work to RabbitMQ, use Redis for caching and coordination, and push updates to connected users through Socket.IO.

01

Isolation without duplication

Every service must read and write only the current tenant's database — without each feature re-implementing tenant handling.

02

Authorization everywhere

Role- and attribute-based rules have to be enforced consistently across a dozen services.

03

Real-time without cross-talk

Messages and notifications must reach the right users of the right tenant, and nobody else.

04

Fast APIs, heavy work

Imports, notifications and integrations can't block request/response cycles.

05

Debugging across hops

One user action can touch the gateway, several services, a queue and a database.

06

Confidence under load

Critical endpoints need evidence, not assumptions, before traffic grows.

  1. Resolve context once, at the edgeThe gateway authenticates the request and establishes tenant and user context, which travels with the request to downstream services.
  2. Database per tenantEach tenant has its own MongoDB database, so isolation is enforced by where data lives — not only by query filters.
  3. Centralized authorizationRBAC/ABAC checks are applied consistently, keeping permission logic out of individual feature code.
  4. Asynchronous by default for heavy workBackground jobs run through RabbitMQ; Redis handles caching and coordination between instances.
  5. Scoped real-time deliverySocket.IO delivers messages and notifications only to the intended users within a tenant.
  6. Measure before trustingk6 load tests exercised critical endpoints, and production issues were traced through logs across services.
Backend
  • Node.js
  • TypeScript
  • Express
  • REST
  • RPC
Data
  • MongoDB
  • Redis
Messaging & real-time
  • RabbitMQ
  • Socket.IO
Infrastructure & testing
  • AWS
  • Docker
  • Nginx
  • PM2
  • k6

The platform runs in production for multiple business clients — and taught me that most reliability is decided by early architectural choices.

  • Isolation decided at the data layer is simpler to reason about, review and explain.
  • Clear service contracts matter more than the number of services.
  • Queues and caches buy speed only when you can see what they are doing.
  • Load tests and real production debugging teach different lessons — both are needed.