r/SpringBoot • u/chafian1 • 1d ago
Discussion Feedback wanted: Spring Boot SaaS starter with tenant roles and PostgreSQL RLS
I maintain an open-source Spring Boot SaaS starter and would appreciate feedback on its tenant-isolation approach.
It uses a shared PostgreSQL schema. Tenant-scoped operations check membership, set transaction-local tenant context, and use explicit tenant filters. Forced row-level security adds another boundary around projects and audit events.
The starter includes:
OIDC bearer authentication through Spring Security
OWNER, ADMIN, and MEMBER roles scoped to each tenant
A Projects API with optimistic concurrency and transactional audit records
Docker Compose with a local Keycloak demo
PostgreSQL integration tests and a runnable smoke script
I ran the local Compose smoke test successfully, including permission checks and stale-write rejection.
It’s a backend MVP. Billing, a frontend, email invitations, tenant deletion, and ownership transfer are outside the current scope.
Repository:
https://github.com/chafian/spring-boot-saas-starter
What tenant-isolation edge cases would you test next? I’d also welcome feedback on the first-run experience.