Three Vercel projects deploy from the same monorepo. Each has its own Root Directory and env-var scope, but all three pull from the same Git history.
| Vercel project | Root Directory | Domain | Build command |
|---|---|---|---|
| matters-web | repo root (.) | matters.ai, www.matters.ai | pnpm run build (default) |
| matters-workspace | apps/workspace | workspace.matters.ai | next build (default) |
| matters-webdocs | apps/webdocs | webdocs.matters.ai | next build (default) |
Each Vercel project must set its own env vars — Vercel does not share them across projects in
the same org. For the public site this means CLERK_*, WORDPRESS_*, MONGODB_*, MUX_*,
SALESFORCE_* etc. For workspace it means the same vars (it consumes the same backends). For
webdocs it means almost nothing — just NEXT_PUBLIC_* flags if any.
| Hostname | Record | Target |
|---|---|---|
matters.ai | A | Vercel apex (76.76.21.21) |
www.matters.ai | CNAME | cname.vercel-dns.com |
workspace.matters.ai | CNAME | cname.vercel-dns.com |
webdocs.matters.ai | CNAME | cname.vercel-dns.com |
After adding each subdomain in Vercel, copy the assigned CNAME target Vercel gives you and paste it into the DNS provider. Vercel issues SSL certificates automatically once DNS resolves.
matters-workspace Vercel project pointing at this repo, Root Directory
apps/workspace. Don't add the domain yet.CLERK_PUBLISHABLE_KEY, CLERK_SECRET_KEY, CLERK_WEBHOOK_SECRET,
MONGODB_CONNECTION_STRING, WORDPRESS_URL, WORDPRESS_HOSTNAME,
WORDPRESS_WEBHOOK_SECRET, SLACK_DEMO_WEBHOOK_URL, MUX_*, SALESFORCE_*,
MAILERLITE_*, SENTRY_*)._not-found prerender succeeds..matters.ai in the Clerk dashboard. This enables SSO across
matters.ai ↔ workspace.matters.ai.workspace.matters.ai to the Vercel project. Wait for SSL.WORKSPACE_SUBDOMAIN_URL=https://workspace.matters.ai on the matters-web Vercel project.
This activates the gated /workspace/* and /auth/* permanent redirects defined in root
next.config.ts.Each Vercel project keeps the last ~20 deployments. To roll back:
Vercel dashboard → matters-workspace → Deployments → click the prior deploy → "Promote to Production"
If the rollback target is older than 20 deploys, redeploy the relevant Git SHA from the Deployments → New Deployment flow.
ENOSPC during webpack build — disk full on the build machine. Clear .next/ and
labs/.next/ (the labs sibling app is large). Locally:
rm -rf .next labs/.next apps/workspace/.next.border-border etc.) — apps/workspace needs
apps/workspace/tailwind.config.ts re-exporting the root config. Already in place; check
it's not deleted.apps/workspace
ships a instrumentation.ts stub to short-circuit auto-detection. Don't delete it.pk_test_dummy).
Real keys build clean. Configure Vercel env vars before triggering a build.Pre-commit hooks (Husky) run pnpm run type:check. CI runs via
.github/workflows/ci.yml (type-check + lint + build) on every PR and on push to main /
monorepo, but it does not hard-gate merges today — lint is continue-on-error, so
merging without fully green CI is still allowed. Turning CI into a required status check is on
the PROD_CHECKLIST.