Skip to content

Tenant isolation (RLS) + AI cost-control stubs + docs - #7

Open
haroondev999 wants to merge 2 commits into
TempoLabsAI:mainfrom
haroondev999:feature/tenant-rls-costcontrol-2025-10-26
Open

Tenant isolation (RLS) + AI cost-control stubs + docs#7
haroondev999 wants to merge 2 commits into
TempoLabsAI:mainfrom
haroondev999:feature/tenant-rls-costcontrol-2025-10-26

Conversation

@haroondev999

Copy link
Copy Markdown

This PR adds several productionization changes:

  • Tenant isolation: AsyncLocalStorage tenant context, Nest TenantInterceptor, Prisma middleware to scope queries by organization_id, and RLS policy SQL (backend/deploy/rls_policies.sql).
  • AI cost-control: starter Nest module, service, and middleware to enforce per-organization budgets.
  • Docs: Claude.production.md (production plan) and backend/docs/tenant_isolation.md.

Notes:

  • These are initial stubs and migration helpers. Please review and run migrations/test in staging before promoting to production.
  • CI will surface type errors; I'm happy to iterate on follow-up commits.

Co-authored-by: automated-agent devnull@example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant