Presentation
Next.js App Router, React Server Components, focused client interactions, Tailwind CSS, and shadcn/ui primitives.
Restaurant operations workspace
Fictional portfolio environment
Engineering case study
A production-style portfolio architecture built around data integrity, privacy, and reproducible demo behavior.
Next.js App Router, React Server Components, focused client interactions, Tailwind CSS, and shadcn/ui primitives.
Framework-independent TypeScript for unit conversion, costing, customer matching, validation, normalization, and preview planning.
Authenticated Server Actions validate every mutation and invoke small tenant-scoped queries or transactional RPCs.
PostgreSQL relations, checks, indexes, generated totals, triggers, deterministic seed data, and row-level security.
auth.users → profiles → company_members → companies
companies → customers → orders → order_items → products
products → recipes → recipe_items → ingredients
ingredients → purchases + stock_movements + adjustments
Every mutable business table carries company_id. RLS derives the visitor's company from auth.uid(), so workspaces cannot read or write each other.
Invisible anonymous auth
No login screen; each browser receives its own authenticated demo tenant.
Transactional inventory
Ingredient rows lock in stable ID order before completed orders consume stock.
Least privilege
No service-role key. Public RPCs derive company identity server-side.
Boundary validation
TypeScript validates previews and PostgreSQL enforces final constraints.
One RPC clears only the current tenant and restores exact fictional counts.
Schema, RLS, functions, seed, and pgTAP assertions live in version control.
Portfolio preview active; add public Supabase variables to enable live workspaces.