Skip to content

feat(deploy): uniform per-app Vercel configs (#20) - #23

Closed
kuyacarlo wants to merge 2 commits into
feat/mvp-stabilizefrom
feat/vercel-monorepo-config-20
Closed

feat(deploy): uniform per-app Vercel configs (#20)#23
kuyacarlo wants to merge 2 commits into
feat/mvp-stabilizefrom
feat/vercel-monorepo-config-20

Conversation

@kuyacarlo

Copy link
Copy Markdown
Contributor

Summary

Closes #20 (repo-side). Aligns committed Vercel config with the three real Vercel projects instead of one app-local file plus a dead legacy API config.

  • apps/web/vercel.json: Next.js preset, pnpm install --frozen-lockfile, pnpm --filter @worksight/web build, telemetry off. Dropped the outputDirectory override (the nextjs preset resolves it correctly relative to Root Directory).
  • apps/api/vercel.json: removed the legacy builds/routes block, which silently disabled Vercel's install and build steps, so dist/main.js was never produced. Now zero-config with dist output.
  • apps/docs/vercel.json: same shape, .vitepress/dist output.
  • Removed committed NEXT_PUBLIC_* values, including the Supabase anon key. Env is dashboard-managed per environment. (The key is a public anon key guarded by RLS, but it should not live in the repo; it remains in git history, so rotate if you want it gone.)
  • doc/DEPLOYMENT.md + README.md: per-project table with the actual Root Directory values and dashboard steps, plus an honest note that the API has no serverless handler yet (main.ts calls app.listen()), so Docker remains its working path.

Why not a single root vercel.json

Vercel loads exactly one vercel.json per project — the one at that project's dashboard Root Directory — and never merges a root file with a nested one. One project also builds one output. So three targets need three configs; "centralized" means uniform, not shared.

Dashboard state (already applied)

Project Root Directory Install Build Output
worksight apps/web pnpm install --frozen-lockfile pnpm --filter @worksight/web build preset
worksight-api apps/api same pnpm --filter @worksight/api build dist
worksight-docs apps/docs same pnpm --filter @worksight/docs build .vitepress/dist

All three: production branch canary, source files outside Root Directory enabled, skip-deploys-for-unaffected-projects enabled. The committed files now match these settings, so dashboard and repo no longer drift.

Test plan

  • All three vercel.json files parse as valid JSON
  • pnpm --filter @worksight/api build succeeds (nest build)
  • Web build verified via Vercel preview on the stacked MVP: Stabilize install, type-check, and common build #15 branch with the same install/build commands
  • Prettier clean on all changed files
  • Confirm preview deployment on this PR builds web from apps/web

Stacked on feat/mvp-stabilize (#21).

Made with Cursor

The repo had a single apps/web/vercel.json with hardcoded env plus a
legacy builds/routes block on the API, while three Vercel projects
(worksight, worksight-api, worksight-docs) each read config from their
own Root Directory. Vercel loads exactly one vercel.json per project and
never merges a root file with a nested one, so centralization here means
uniform per-app configs sharing the same workspace primitives.

- apps/web: nextjs preset, pnpm --filter build, telemetry off, no
  outputDirectory override (preset default is correct)
- apps/api: drop legacy builds/routes, which disabled Vercel's install
  and build steps entirely; output dist
- apps/docs: same shape, output .vitepress/dist
- remove committed NEXT_PUBLIC_* values incl. the Supabase anon key;
  env stays dashboard-managed per environment
- doc/DEPLOYMENT.md + README: per-project table matching the applied
  dashboard settings (Root Directory, canary, skip-unaffected), and an
  honest note that the API still lacks a serverless handler

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worksight Ready Ready Preview, Comment Jul 25, 2026 6:56am
worksight-api Ready Ready Preview, Comment Jul 25, 2026 6:56am
worksight-docs Ready Ready Preview, Comment Jul 25, 2026 6:56am

@kuyacarlo

Copy link
Copy Markdown
Contributor Author

Rolled up into #27 (feat/mvp-integration), which merges the MVP stack against canary and is verified end to end (type-check, lint, API tests, all three builds, plus a live API + web smoke through /demo). This PR stays open for per-workstream review.

pnpm --filter <pkg> build runs only that package's script and does not build
its workspace dependencies first, so nest build fails with TS2307 on
@worksight/common in a clean Vercel checkout. Turbo's dependsOn: ["^build"]
handles the ordering. Caught by the worksight-api preview deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kuyacarlo

Copy link
Copy Markdown
Contributor Author

Rolled into #27 (merged to canary). Closing child PR.

@kuyacarlo kuyacarlo closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant