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 with per-user limits

Hengo

Background Jobs

Vercel Cron and Workflow jobs handle budget alerts, spending spikes, reminders, weekly summaries, and monthly reports as independently authorized routes

Luyra

Data Access

A thin lib/api → route handler → service → repository pipeline validates input, checks auth, derives user_id server-side, and keeps SQL isolated

Luyra

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

H-Phsar

Reliability

Neon is the native application database while Supabase remains the identity provider, giving Luyra a clean path toward a future Spring Boot backend

Luyra