Kovasect is a production-grade multi-tenant SaaS application designed to demonstrate bulletproof data isolation using Supabase Row Level Security (RLS).
This project is a portfolio proof of competence, focusing on security architecture, database-layer access control, and clean SaaS design.
- True Multi-Tenancy: Complete data isolation enforced at the database level.
- Advanced RLS: Comprehensive Row Level Security policies for all entities.
- Role-Based Access Control (RBAC): Distinct permissions for
adminandmemberroles. - Cross-Organization Membership: Users can belong to multiple organizations with different roles in each.
- Realistic Mock Data: A comprehensive seeding system for demonstration and testing.
- Frontend: Next.js 15+ (App Router), TypeScript, Vanilla CSS.
- Backend: Supabase (Postgres, Auth, RLS).
- Deployment: Optimized for Vercel and Supabase Cloud.
Kovasect follows a Zero-Trust approach to client-side data filtering. All security logic is moved from the application layer to the database layer.
The heart of Kovasect is its RLS policies. Every table is protected, ensuring that:
- Users can only see data from organizations they belong to.
- Members cannot modify data they didn't create.
- Admins have full control within their organization context.
The project uses a standard multi-tenant schema:
organizations: The root tenant entity.organization_members: The junction table defining user access and roles.tasks: A business entity used to demonstrate scoped access.
- Node.js & npm
- Docker Desktop (for local Supabase development)
-
Clone and Install:
git clone https://github.com/otobrixai/kovasect.git cd kovasect npm install -
Start Supabase:
npx supabase start
-
Configure Environment: Create
apps/web/.env.localbased on.env.example. You can get your local keys usingnpx supabase status. -
Seed Mock Data:
npm run seed
-
Run the App:
cd apps/web npm run dev
apps/web: The Next.js frontend application.supabase/migrations: Versioned SQL migrations for schema and RLS.scripts: Maintenance and seeding scripts.core: Shared logic and type definitions.
This repository intentionally includes a Browser-Based Seeding Page and Mock Data Scripts to facilitate easy demonstration. In a true production environment, these would be restricted or removed.
Built by Otobrix AI. Focused on industrial-grade SaaS security.