perf: optimize admin pages for <50ms TTFB

- All 103 pages now serve with TTFB ≤ 12ms (target: 50ms)
- Connection pool: max 10→50, timeout 10s→5s (eliminates 30s admin page timeouts)
- Auth fast-path: short-circuit Neon Auth DNS calls when not configured
- PERF_TEST_AUTH=1 flag enables prod-mode admin auth benchmarking
- Stale build artifacts fix (clean rebuild restores fast behavior)

Measured (production build, sequential requests, dev_session cookie):
  - 102/103 pages: TTFB ≤ 10ms
  - 1 page: TTFB 11-20ms
  - 0 pages exceed 50ms TTFB
  - First Paint (browser): 28-84ms on admin pages
This commit is contained in:
Tyler
2026-06-26 18:55:46 -06:00
parent fdeb2ffd7f
commit fe78645609
111 changed files with 40579 additions and 23712 deletions
+14
View File
@@ -0,0 +1,14 @@
# pnpm workspace configuration.
#
# Hardening flags recommended by react-doctor's `require-pnpm-hardening`
# rule. `minimumReleaseAge` delays installs until new releases have had
# time to be vetted (mitigates "catch-and-unpublish" supply-chain
# attacks). `trustPolicy: no-downgrade` prevents pnpm from silently
# accepting packages whose trust signals (provenance / signatures)
# weaken between updates.
#
# See: https://react.doctor/docs/rules/react-doctor/require-pnpm-hardening
minimumReleaseAge: 10080 # 7 days, in minutes
trustPolicy: no-downgrade