Developer open-sources SaaS boilerplate with real multi-tenancy and row-level security
A developer has released an open-source SaaS starter kit called saas-root, built after repeatedly writing the same authentication, team management, and permissions code across multiple projects. The boilerplate addresses a common shortcoming in existing solutions — fake multi-tenancy that relies on application-level filters rather than true database isolation. It implements PostgreSQL Row-Level Security to enforce data boundaries at the database layer, ensuring users cannot access another organisation's data even if application code contains bugs. Granular permissions are handled via the CASL library, allowing role-specific rules such as members editing only their own tasks. The project also abstracts email delivery behind a provider interface, currently supporting Resend, SMTP, and a console logger for development.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in