BetterFrame/server
Mitchell R 66653af360
feat: implement multi-tenant support with PG schema isolation
Adds tenant management for PostgreSQL deployments. Each tenant gets its
own PG schema (tenant_<slug>) with a full set of BetterFrame tables.
SQLite deployments stay single-tenant with no behavior change.

Key changes:
- Run PUBLIC_MIGRATIONS (tenants + global_admins tables) during PG init
- Auto-create "default" tenant (schema=public) on first boot
- createTenantSchema() runs TENANT_MIGRATIONS in a new PG schema
- DbAdapter.setSearchPath() for per-request schema switching (PG)
- Tenant CRUD in Repository (listTenants, create, update, delete)
- Middleware resolves bf_tenant cookie and sets search_path per request
- Admin UI: /admin/tenants with CRUD + tenant switching via cookie
- Tenant dropdown in topbar (Layout) when >1 tenant exists
- Tenant nav item in sidebar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 07:22:01 +02:00
..
src feat: implement multi-tenant support with PG schema isolation 2026-05-26 07:22:01 +02:00
.gitignore build fixes for bsb 2026-05-10 01:46:11 +02:00
bsb-tests.json refactor(db): move service-store from BSB plugin to shared/db library 2026-05-24 02:48:32 +02:00
package.json fix(docker): package name betterframe + copy nodered workspace pkg 2026-05-24 03:17:43 +02:00
tsconfig.json adding initial project 2026-05-10 01:09:13 +02:00