Team Tasks
A multi-tenant SaaS task tracker built to prove out Supabase Row Level Security, Clerk auth, and real Stripe subscription billing working together.
- Year:
- 2026
- Role:
- Independent Project
- Next.js
- TypeScript
- Supabase
- PostgreSQL
- Clerk
- Stripe
- Tailwind CSS
- Vitest
A self-directed project built to gain hands-on, production-grade experience with a stack that kept appearing in client and job requirements: Supabase with Row Level Security, Clerk authentication, and real Stripe subscription billing (not one-time checkout). Organizations, memberships, and tasks are fully isolated at the database level, verified with an automated test that proves one org can never read another's data.
Problem
I wanted to close a specific, recurring gap: I kept encountering roles and client projects that required Supabase RLS, Clerk/Auth0 integration, and Stripe subscription billing, technologies I hadn't used together in production. Rather than claim familiarity I didn't have, I built a real, working multi-tenant SaaS app to gain and prove that experience honestly.
Approach
Built a Next.js app where each user belongs to an organization, with strict Row Level Security ensuring no user can access another org's data, enforced using Supabase's native Third-Party Auth integration with Clerk (reading the Clerk user id via auth.jwt() in RLS policies, rather than the older JWT-template workaround). Along the way I discovered that tables created via direct migrations don't inherit Supabase's default role grants, a table-level gotcha separate from RLS itself, and fixed it with an explicit grants migration. Integrated Stripe subscriptions end to end: a Checkout flow, a webhook handler that verifies request signatures before touching the database, and plan-based feature gating (free orgs are capped at 3 tasks, with a proper upgrade prompt rather than a silent failure). Wrote three kinds of tests: component tests, a pure unit test for the Stripe status logic, and a genuine RLS integration test that signs in as two separate users and confirms cross-org isolation.
Outcome
A fully working, deployed multi-tenant SaaS app with database-enforced tenant isolation, real subscription billing, and a documented, testable auth/RLS integration, plus a public repo and README detailed enough to serve as reference material for similar production work.