Zum Inhalt springen

Architecture Overview

Multi-tenant SaaS with strict Row Level Security on all tables.

LayerTechnology
FrontendReact 18 + TypeScript + Vite 5
UIshadcn/ui + Tailwind CSS v4 (oklch)
BackendSupabase (PostgreSQL + Auth + Edge Functions)
StateTanStack React Query + React Hook Form + Zod
Routingreact-router-dom v6

Every table has a tenant_id column enforced by RLS policies using get_jwt_tenant_id(). Module entitlements are checked at three layers: frontend (ModuleGuard), backend (checkModuleEntitlement()), database (tenant_modules).

RoleAccess
SaaS OwnerAll tenants, all modules
Tenant AdminOwn tenant, all enabled modules
Tenant UserOwn tenant, assigned modules
Individual UserOwn data only

~68 Edge Functions in supabase/functions/ with shared withAuth() middleware. Self-hosted on Hetzner, deployed via scripts/deploy-functions.sh.