Performance Audit 2026 06 16
Assistance performance audit — 2026-06-16
Scope: read-only inspection of frontend/backend performance-relevant configuration, tests, and artifacts for Cloudflare-hosted surfaces. No product code was changed.
Commands run#
1$ find apps -maxdepth 2 \( -name 'next.config.*' -o -name 'vite.config.*' -o -name 'wrangler.*' -o -name 'open-next.config.*' -o -name 'package.json' \) | sort2apps/academy/next.config.cjs3apps/academy/open-next.config.ts4apps/academy/package.json5apps/academy/wrangler.jsonc6apps/blog/next.config.mjs7apps/blog/open-next.config.ts8apps/blog/package.json9apps/blog/wrangler.jsonc10apps/design-system/next.config.mjs11apps/design-system/open-next.config.ts12apps/design-system/package.json13apps/design-system/wrangler.jsonc14apps/docs/next.config.mjs15apps/docs/open-next.config.ts16apps/docs/package.json17apps/docs/wrangler.jsonc18apps/manager/package.json19apps/manager/vite.config.ts20apps/manager/wrangler.toml21apps/ui-library/next.config.mjs22apps/ui-library/open-next.config.ts23apps/ui-library/package.json24apps/ui-library/wrangler.jsonc25apps/www/next.config.mjs26apps/www/next.config.test.ts27apps/www/package.json28apps/www/wrangler.toml1$ mise exec -- pnpm exec turbo run build --filter=www --dry=json | head -802• turbo 2.9.63{4 "packages": ["www"],5 "envMode": "strict",6 "tasks": [{ "taskId": "www#build", "hash": "c6028c40dfb114d7", ... }]7}8Oops! Turbo has crashed.9A report has been written to /tmp/report-a46d59b9-c210-452e-b6e3-8c81d1872186.toml1$ mise exec -- pnpm exec turbo run test --filter=www --dry=json | head -802• turbo 2.9.63{4 "packages": ["www"],5 "envMode": "strict",6 "tasks": [{ "taskId": "www#test", "hash": "f2eb12592af8432a", ... }]7}8Oops! Turbo has crashed.9A report has been written to /tmp/report-3278114a-f40a-43af-9c9a-34b846286dc6.tomlCloudflare hosting model#
apps/www/wrangler.tomlis Cloudflare Pages (pages_build_output_dir = ".next-build") with service bindings toassistance-blogandassistance-docsWorkers.apps/manager/wrangler.tomlis Cloudflare Pages (pages_build_output_dir = "build").- Docs/blog/academy/design-system/ui-library use OpenNext Cloudflare Worker configs with
.open-next/worker.jsand assets from.open-next/assets; docs also bindsNEXT_INC_CACHE_KVand D1 search inapps/docs/wrangler.jsonc.
Bundle/build risks#
- Broad static-generation concurrency can be resource-heavy.
.mise.tomlsets Turbo cache on tmpfs plusNODE_OPTIONS=--max-old-space-size=8192andUV_THREADPOOL_SIZE=16; multiple Next configs setexperimental.cpus: 16. This is optimized for a large build host, but six parallel Next builds can still be memory/CPU intensive. - Build verification is currently narrow. README says runtime proof covers one representative
apps/wwwpath, not the full multi-app matrix. The documenteddocs/runtime/S02-RUNTIME-PROOF.mdwas not present in this checkout, so durable runtime evidence may have drifted or moved. - Turbo dry-run currently crashes after producing partial JSON. The crash makes cache/build status introspection less reliable for quick audits even though task metadata is emitted first.
- Worker size pressure is known.
apps/blog/next.config.mjsaliases@vercel/ogout underOPEN_NEXTbecause its WASM files push the Worker toward the 3 MiB free limit. - Type errors are bypassed in some production builds.
apps/www/next.config.mjsandapps/blog/next.config.mjssettypescript.ignoreBuildErrors: true; performance builds can ship even if separate typecheck coverage is missed.
Cache/static generation behavior#
apps/www/next.config.mjs:output: 'export',images.unoptimized: true, optional asset CDN prefix, static Pages output. Redirects/rewrites are intentionally disabled when exporting; blog/docs routing is delegated through Pages Functions/service bindings.apps/docs/next.config.mjs:output: 'standalone'; non-OpenNext builds useconfig/next-cache-handler.mjswithcacheMaxMemorySize: 0; OpenNext builds rely on KV incremental cache. Headers includeCDN-Cache-ControlviasurrogateCache('/:path*', 3600).apps/blog/next.config.mjs:output: 'standalone',basePath: '/blog',images.unoptimized: true, and OpenNext-specific server bundle slimming.apps/manager/vite.config.ts: manual chunks split charts, router, query, UI, and React vendors for perceived performance and cacheability.- Backend academy catalog has a 5-minute in-memory
CachedCatalogwith 256-entry cap (backend/internal/academy/service/cache.go), plus SQL indexes in migrations includingbackend/migrations/008_performance_indexes.up.sql.
Verification coverage found#
- Unit/integration tests exist across apps via Vitest: e.g.
apps/www/__integration__/landing-page.test.tsx,apps/docs/__integration__/guide-page.test.tsx,apps/blog/test/smoke.test.ts,apps/manager/vitest.config.ts. - E2E scripts exist in root
package.json:e2e:www,e2e:docs,e2e:academy,e2e:manager; top-levele2eonly runs www and academy. - No obvious Lighthouse/Web Vitals budget gate was found in the inspected scripts/artifacts.
- Backend has
make test, Prometheus HTTP metrics middleware (backend/internal/shared/metrics/metrics.go), and HTTP server timeouts in academy/saas APIs; no broad backend load/performance test gate was found.
Cloudflare-relevant bottlenecks to watch#
- OpenNext Worker bundle size, especially docs/ui-library pages with MDX, Shiki/Twoslash, API/search code, and server externals.
- KV incremental cache hit rate for docs/blog/academy; cold misses can become Worker CPU latency.
- Static export image behavior:
images.unoptimizedshifts optimization responsibility to source assets/CDN. - Manager chunking is explicit, but without bundle-size budgets regressions can pass tests.
- Backend APIs are not Cloudflare-hosted in the current model, but frontend perceived latency depends on API timeouts, DB indexes, and cache hit rates.
Recommended next verification (safe but not run here)#
- Add or run app-specific bundle analysis:
ANALYZE=truefor Next apps and Vite bundle visualizer/size budget for manager. - Run focused Cloudflare builds for each Worker app (
build:cf) and record Worker script size/assets size. - Add a lightweight Lighthouse/Web Vitals CI gate for representative Pages/Worker routes.
- Restore or relocate the missing runtime proof artifact referenced by README, or update README to the current evidence path.