- Status: Accepted
- Date: 2026-02-22
- Deciders: Project maintainers
Taskdeck started as a single-tenant SQLite application. The cloud/collaboration roadmap requires supporting multiple users and eventually organizations. Three multi-tenancy models were evaluated for the transition from single-tenant to multi-tenant.
Adopt shared-schema + TenantId as the immediate target:
- Add
TenantIdcolumn to all tenant-scoped tables. - Enforce tenant predicates in all repository queries (global query filter in EF Core).
- Cross-tenant access always returns 403 (never leaks existence via 404).
- Preserve existing SQLite storage for local-first single-user mode.
Plan a promotion path to database-per-tenant for high-isolation tiers (enterprise, regulated industries) in later versions.
- Database-per-tenant: Strongest isolation, simplest queries (no filter needed), but operational complexity (migrations, connection management, backup per tenant) is prohibitive for an early-stage product.
- Schema-per-tenant: Middle ground but PostgreSQL-specific; doesn't work with SQLite; adds schema migration complexity.
- Positive: Minimal schema change; works with SQLite and future PostgreSQL; low operational overhead; single migration path.
- Negative: Tenant isolation is application-enforced (bug = data leak); query performance degrades at extreme tenant counts without partitioning; all tenants share resource limits.
- Neutral: Promotion to database-per-tenant is additive, not a rewrite.
docs/analysis/2026-02-22_multi-tenancy-strategy-adr.md— full comparison document- ARCH-01 in
docs/IMPLEMENTATION_MASTERPLAN.md