Per-Tenant Database Isolation

•
16
•

Implements multi-tenant data architecture using dedicated Rivet Actors for robust data isolation and per-tenant migrations.

This skill provides patterns and implementation guidance for building database-per-tenant architectures using RivetKit. By mapping each tenant to a unique Rivet Actor, developers can ensure absolute data isolation where datasets and migrations are scoped to individual tenants rather than shared tables. It supports various state backends, including JSON, SQLite, and Drizzle ORM, offering a scalable solution for SaaS applications that require strong security boundaries and independent database lifecycles.

主要功能

01Actor-based isolation using tenant IDs as unique actor keys
02Comprehensive security patterns for JWT-based tenant verification
03Real-time event broadcasting for tenant-specific data mutations
04Automated per-tenant migrations that roll out as actors wake up
0516 GitHub stars
06Support for multiple state backends including JSON, SQLite, and Drizzle

使用场景

01Building SaaS platforms requiring strict regulatory data isolation between customers
02Implementing per-tenant relational schemas with independent migration paths
03Creating real-time dashboards where updates are restricted to specific tenant connections