pnpm workspace containing the Next.js dashboard and the Cloudflare PageSpeed worker.
| Package | Path | Deploy |
|---|---|---|
| Web | apps/web |
Vercel — root directory apps/web |
| Worker | apps/worker |
Cloudflare Workers — project root apps/worker |
Both apps deploy from this repo via dashboard Git integrations (no GitHub Actions required).
From the repo root:
pnpm install
pnpm dev:web # Next.js at http://localhost:3000
pnpm dev:worker # wrangler devOther root scripts: pnpm test, pnpm typecheck, pnpm build:web, pnpm check:worker.
| App | Env file | Required variables |
|---|---|---|
apps/web |
.env (see .env.example) |
PAGESPEED_INSIGHTS_API, TURSO_*, NEXT_PUBLIC_POSTHOG_*, WORKER_URL |
apps/worker |
.dev.vars (see .dev.vars.example) |
PAGESPEED_INSIGHTS_API |
If you still have .env at the repo root from before the monorepo move, copy it to apps/web/.env.
In the Vercel project for web-perf-reporting:
-
Root Directory —
apps/web -
Install Command (monorepo lockfile at repo root):
cd ../.. && pnpm install --frozen-lockfile
-
Build Command —
pnpm build(runs inapps/web) -
Environment variables — include existing vars plus
WORKER_URL(production worker URL, e.g.https://web-perf-report-cf.<account>.workers.dev) -
Ignored Build Step (optional):
git diff HEAD^ HEAD --quiet -- apps/web pnpm-lock.yaml pnpm-workspace.yaml package.json
In Workers & Pages → web-perf-report-cf (or reconnect Git):
- Repository —
MaxwellCohen/web-perf-reporting, branchmain - Root directory —
apps/worker - Wrangler config —
apps/worker/wrangler.toml - Secrets —
PAGESPEED_INSIGHTS_API(dashboard orwrangler secret) - KV/R2 bindings in
wrangler.tomlmust match your account
After migration, archive the standalone web-perf-report-cf repo.
- Web app details:
apps/web/README.md - Worker:
apps/worker/README.md