Owner: Platform Architecture
Related: ADR-008 (Vite SPA), TURBOREPO_USAGE.md, MICROFRONTENDS_RUNBOOK.md This document operationalizes the Performance Architecture plan: measure before changing runtime topology (microfrontends count, framework migrations), and keep Vite/Rolldown + Turborepo as the primary levers.
1. What to baseline
2. Commands
maximumFileSizeToCacheInBytes (2 MiB) for the four precache-critical entry patterns (index-*, vendor-react-*, vendor-radix-*, vendor-supabase-*). Override with VITE_BUDGET_CRITICAL_CHUNK_BYTES.
3. Route timing (manual)
There is no single automated “route timing” suite in-repo today. For critical flows (login, dashboard, heavy tables, PDF export):- Chrome DevTools → Performance → record navigation.
- Or Playwright trace +
performancemarks where needed.
4. Microfrontends
Path-based splits are deployment concerns; they do not replace bundle discipline. Before activating Phase 3:- Follow MICROFRONTENDS_ACTIVATION_CHECKLIST.md.
- Re-baseline Web Vitals on preview (runbook soak).
5. Turborepo
Turborepo improves CI and local task latency, not browser JS size. See TURBOREPO_USAGE.md for remote cache setup and cache-hit diagnostics.See also
scripts/perf/capture-baseline.tsscripts/perf/report-build-chunks.tsscripts/perf/check-vite-budgets.ts- ADR-019 — Next.js / Turbopack deferral