Skip to main content
Status: Active
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

Budget defaults match Workbox 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):
  1. Chrome DevTools → Performance → record navigation.
  2. Or Playwright trace + performance marks where needed.
Record dates and rough LCP/TTI in PR descriptions when claiming perf wins.

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.ts
  • scripts/perf/report-build-chunks.ts
  • scripts/perf/check-vite-budgets.ts
  • ADR-019 — Next.js / Turbopack deferral