WzGate

Architecture

How the monolith, integration service, and frontend interact.

Shape of the system

The platform is a modular monolith (the CRM backend) plus a focused integration service, with a Next.js frontend on top. They are deployed and scaled independently and never share a database — they integrate through REST and a message bus.

Communication

  • REST + JWT for synchronous calls (frontend → backend, service → service).
  • RabbitMQ (exchange integration-events) for asynchronous events. The integration service publishes events like integration.lead.received; the CRM backend consumes them.

Multi-tenancy

Every request carries an organization context derived from the JWT. Queries are implicitly scoped to that organization, so one deployment serves many tenants safely. See Multi-tenancy.

The integration pipeline

External providers each have an adapter. A webhook arrives, its signature is verified against the raw bytes, the matching integration is loaded, the adapter normalizes the payload, the event is persisted, and a normalized event is published to RabbitMQ. See Integrations.

On this page