Separate databases, not WHERE tenant_id = ?
Shared-table multi-tenancy puts every customer in the same tables and relies on global scopes, composite indexes and code review to prevent leaks. laravel-tenanted takes the opposite stance: isolate customer data structurally so a forgotten filter can never cross tenant boundaries.
Want shared-table row-level scoping or Postgres RLS? That is a different model and belongs in a separate package.
Why SQLite changes the math
Database-per-tenant used to mean burning server connection limits and paying for idle clusters. With SQLite, an inactive tenant costs 0 RAM and 0 connections, provisions in ~1 ms, runs reads in-process with zero noisy neighbors, and backs up or deletes as a single file.
Deploying on stateless containers? Pair with laravel-litebucket to store every tenant SQLite database directly on S3, Cloudflare R2, or Laravel Cloud Object Storage.
Inspired by activerecord-tenanted
Built in the spirit of Basecamp's activerecord-tenanted ("Everybody Gets a Database") — proving that structural isolation can feel effortless when the framework handles routing, fail-closed guards, migrations, cache, queues and files natively.
Designed from the ground up for laravel-rust's async Tokio runtime using DatabaseManager::using_connection and laravel::context.