What problem does it solve?
Delivers a proven framework for hard tenant isolation across Go services, per-tenant PostgreSQL schemas, and NATS JetStream messaging. The patterns cover tenant-id propagation in Go types, schema routing, tenant-specific NATS subjects, and per-tenant feature toggles and rate limits.
Core Features & Use Cases
- TenantID in Go Structs: Ensure every domain model includes a TenantID field for routing, logging, and tracing.
- Schema-Per-Tenant Isolation: Use per-tenant schemas to enforce database isolation via search_path without tenant_id columns.
- NATS Subject Tenant Segment: Enforce tenant segmentation in all JetStream subjects to maintain tenant-scoped messaging boundaries.
- Tenant Context Propagation Chain: Propagate tenant identity through JWT, HTTP headers, Go context, and across inter-service calls.
- Per-Tenant Feature Toggles: Enable/disable features per tenant with dedicated storage and routing.
- Per-Tenant Rate Limiting: Apply per-tenant rate limits to prevent cross-tenant performance impact.
- End-to-end Patterns: Provide end-to-end guidance from domain models to messaging and data access layers.
Quick Start
Apply patterns when designing any tenant-scoped data structures, service boundaries, and messaging that require strict isolation.
Quick Start
Apply patterns when designing any tenant-scoped data structures, service boundaries, and messaging that require strict isolation.