Athas Boilerplate

Performance Guidelines

shared

Baseline performance review criteria for backend and frontend changes.

Backend baseline

  • avoid unbounded list queries
  • use pagination and indexed filters
  • prefer projection/query services for list endpoints
  • use async queues for heavy non-critical operations

Frontend baseline

  • avoid expensive render loops
  • avoid repeated waterfall fetch patterns
  • paginate or virtualize large lists
  • keep shared UI usage consistent to avoid drift

Review checklist

  1. Any N+1 or unbounded query risks?
  2. Any oversized payload or expensive render path?
  3. Are baseline checks green?

Minimum checks

bun run typecheck
bun run depcruise:backend
bun run depcruise:frontend
bun run --filter @athas/admin-console build
bun run --filter @athas/client-console build

Baseline instrumentation

Use the baseline tooling to measure command durations against configured budgets:

bun run perf:baseline
bun run perf:baseline:enforce
bun run storybook:perf
bun run storybook:perf:enforce

Artifacts and budgets live in docs/performance/.

Storybook metrics

  • Measure Storybook build duration and emitted asset sizes from dist/storybook/assets.
  • Track total bundle bytes, JS bytes, CSS bytes, and largest asset size.
  • Keep thresholds in docs/performance/budgets.json and adjust intentionally when component surface area grows.

On this page