mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-26 16:56:33 +00:00
No description
Prep for multi-tenant PostgreSQL:
shared/tenant.ts: tenant model, schema name derivation, search_path
SQL helper. Schema-per-tenant: each tenant gets tenant_<uuid> schema,
public schema holds tenant registry + global admins.
migrations-pg.ts: two migration sets:
- PUBLIC_MIGRATIONS: tenants + global_admins + schema_migrations tables
- TENANT_MIGRATIONS: full BetterFrame table set in PG-native types
(SERIAL, TIMESTAMPTZ, JSONB, native BOOLEAN). Mirrors SQLite schema
1:1 but with PG conventions.
DbAdapter + SqliteAdapter + PgAdapter already existed. Next steps:
1. Repository async conversion (155 sync calls → await adapter.*)
2. Tenant provisioning endpoint (create schema + run migrations)
3. Request middleware: session → tenant_id → SET search_path
4. Global admin UI for tenant management
|
||
|---|---|---|
| .github/workflows | ||
| deploy | ||
| docs | ||
| kiosk | ||
| nodered | ||
| scripts | ||
| server | ||
| .gitattributes | ||
| .gitignore | ||
| CLAUDE.md | ||
| docker-compose.coolify.yml | ||
| docker-compose.yml | ||
| LICENSE-AGPL.txt | ||
| LICENSE-COMMERCIAL.md | ||
| LICENSE.md | ||
| package-lock.json | ||
| package.json | ||
| sec-config.yaml | ||
| tsconfig.base.json | ||