Enterprise CRM
ENTERPRISE CRMCloud Platform
Zero-ORM Multi-Tenant Architecture • Pure Spring JDBC & PostgreSQL Functions

The Mission-Critical CRM Platform for High-Consequence Enterprises

Eliminate ORM impedance mismatch with typed PL/pgSQL database functions, atomic transactional outbox events, and authoritative dynamic policy authorization. Every record is cryptographically isolated by tenant context.

Database Access

Zero-ORM Named Functions

Dual-Write Safety

Atomic Outbox Pattern

Tenant Security

Context Isolation (X-Tenant)

Authorization

Authoritative /navigation

Federated Microservices Mesh

Six dedicated domain microservices operating in harmony over PostgreSQL 16 and Redpanda event streaming.

:8081
Live Microservice

tenant-service

Tenant domain resolution, subscription quotas, and cryptographic multi-tenant partition lifecycle.

fn_tenant_resolve & fn_tenant_create
:8082
Live Microservice

identity-service

User identity orchestration, Argon2id credential protection, and corporate directory synchronization.

fn_user_authenticate & fn_user_create
:8083
Live Microservice

auth-service

Fine-grained policy evaluations (Tenant → Role → Policy → Scope) and authoritative dynamic navigation menus.

fn_navigation_permitted_menus
:8084
Live Microservice

crm-service

Enterprise Accounts and Contacts lifecycle with optimistic concurrency locks and audit trails.

fn_customer_upsert & fn_contact_create
:8085
Live Microservice

sales-service

High-velocity inbound Lead scoring, Deal pipeline transitions, and weighted revenue forecasting.

fn_lead_upsert & fn_deal_stage_transition
:8086
Live Microservice

activity-service

Chronological unified timeline auditing, task scheduling, reminders, and corporate interaction logs.

fn_activity_log & fn_task_schedule
Architectural Invariants

Deterministic Execution Through Database Functions

Conventional ORMs introduce N+1 query overhead, unoptimized dirty checking, and fragile schema synchronization. Our architecture delegates data integrity strictly to named PL/pgSQL routines with explicit parameter bindings and strict constraint enforcement.

Zero Object-Relational Impedance

Direct Spring JDBC function mapping; no Hibernate session cache pollution.

Guaranteed Tenant Derivation

Tenant context is extracted authoritatively from JWT claims, never trusted from client payloads.

Idempotent Mutation Pipeline

Built-in Idempotency-Key headers and atomic platform.outbox_event dispatch.

crm-pipeline.flow

// Client Component -> BFF -> Microservice -> Function

1. Client: POST /api/customers

2. BFF: Inject X-Correlation-ID & X-Tenant-ID

3. crm-service:8084: Validates payload with Bean Validation

4. Spring JDBC: CALL crm.fn_customer_upsert(...)

5. Atomic Outbox: INSERT INTO platform.outbox_event

6. Return: ApiResponse<CustomerResponse>