exit lab
~/lab/performance

Performance Lab

Caching, optimistic UI, background jobs, and data-access decisions that keep these apps fast and reliable — pulled straight from what shipped, not synthetic benchmarks.

Caching

Kept data behind Supabase RLS and routed only AI calls through JWT-verified Next.js handlers

Hengo

Background Jobs

Six Vercel cron jobs, each a bearer-secret-protected API route, cover recurring transactions, budget alerts, monthly reports, savings updates, and cleanup

Money Flow

Data Access

Supabase Row Level Security scopes every row to its owner at the database layer

Money Flow

Role-split API surface (distributor/* vs retailer/*) over one shared schema, with role-scoped queries

H-Phsar

Reliability

A daily cron syncs every table to a second Postgres (Neon), so recovery never depends on one provider

Money Flow