MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-8

1.0.5 Vercel project link + preview deploys on PR + production env from `main`

Done
Description

Estimate: 15m · Depends on: 1.0.4

Hook the repo up to Vercel so every PR gets a preview deploy and main deploys to production. Plus a managed Postgres for the deployed app (Neon or Vercel Postgres). This is the last Subtask in Story 1.0 — once it ships, the repo is fully deployable and the next Story can start adding features.

Why this comes last in the story: deploys need CI to be green (Subtask 1.0.4), they need a working database (1.0.2), and they need the lint/build scripts (1.0.3). Running deploy setup before those exist would produce broken first deploys that look like the platform's fault.

What you'll do: Create the Vercel project via dashboard or vercel CLI. Link the GitHub repo so preview deploys fire on every PR. Add a Neon (or Vercel Postgres) database; configure DATABASE_URL in Vercel as both preview and production env vars (Neon's branch databases work nicely for previews). Add vercel.json if needed for build commands. Trigger a deploy of main; verify the placeholder page renders at the production URL.

Note on this being a deploy-type Subtask: some steps require Vercel dashboard clicks (creating the project, adding env vars) and aren't fully automatable by a coding agent in v1. The Subtask's prompt should explicitly tell the user what manual steps to take, then let the coding agent finish the in-repo work (vercel.json, README updates).

Acceptance criteria

  • Vercel project linked to the GitHub repo.
  • Preview deploy fires automatically on every PR; preview URL is posted to the PR by Vercel's GitHub integration.
  • Production deploy fires on every push to main; production URL is reserved (subdomain or apex; final domain decision lives in Epic 5).
  • Managed Postgres provisioned (Neon or Vercel Postgres); DATABASE_URL set as preview + production env vars; Prisma migrations run on deploy.
  • Preview deploys use a separate database branch / schema (Neon's branch feature, or a dedicated preview DB).
  • Placeholder page renders at the production URL.
  • README.md updated with a "Deploys" section: which platform, preview URL pattern, how to roll back.
  • Story 1.0 marked complete only when the placeholder page is live at the production URL.

Context refs

  • Vercel docs (Next.js deployment, env vars, preview deploys)
  • Neon docs (branch databases, Prisma integration)
  • .github/workflows/ci.yml (from 1.0.4) — to coordinate CI gate with deploy
  • README.md (from 1.0.4) — to extend with the deploy section
Status
Done
Type
Sub-task