KitLab Gifts
View projectPlatform for HR teams in Bolivia to manage employee gifting end to end: company onboarding, employee directory with birthdays and anniversaries, gift request flow, and order tracking. Built on Next.js App Router and Supabase, with Row Level Security enforcing data isolation by company at the database and a strict two-role middleware enforcing access at the edge.
Two-role auth with strict, non-overlapping route surface: hr_admin in /dashboard, kitlab_admin in /admin. Enforced once in middleware.ts, no scattered per-component checks. Postgres RLS underneath as defense in depth: if a fetch ever escaped its company scope, the database would still block it.
Supabase backend with RLS at the core of access control. Every table with a company_id filters by auth.uid() automatically, so client code never scopes by company manually. The database enforces isolation, the app trusts it.
Server Components for data fetching (SSR Supabase client so RLS applies automatically), Client Components with TanStack Query for interactive surfaces, Route Handlers with Zod for sensitive mutations. Chose Route Handlers over Server Actions for explicit error and validation control.
Order Kanban (Pending, Production, Shipped, Delivered) built click-based instead of drag-and-drop. A modal per card carries status history and the advance action. Skipping a DnD library kept the bundle light and accessibility intact for a flow that never moves backward.