A Remix 3 guest book starter built with @pitlane/dev, packaged for Vercel by Nitro, with PostgreSQL via remix/data-table.
| Runtime | Package manager | Database | Deploys to |
|---|---|---|---|
| Node (Vercel Functions) | pnpm | PostgreSQL | Vercel |
npx giget github:pitlane-tools/templates/vercel my-app
cd my-appThis template uses Vite+ as the canonical toolchain for dev, build, lint, format, and task running. Pick one:
# Unix script
curl -fsSL https://vite.plus | bash
# Homebrew
brew install vite-plus
# Powershell
irm https://vite.plus/ps1 | iexvp install # install dependencies
vp dev # start PGlite + migrate + dev serverThis template uses PostgreSQL in every environment.
For local development, vp dev automatically starts a project-local
PGlite database (PostgreSQL compiled to WebAssembly), applies
migrations, and starts the app — no Docker, no Postgres install. The app connects
through a normal pg client and the DATABASE_URL injected by the dev task; local
data persists in .data/postgres.
vp dev # persistent local database in .data/postgres
vp run dev:ephemeral # temporary in-memory database
vp run db:reset # delete the persistent local databaseProduction requires a real PostgreSQL server, configured as DATABASE_URL. The same
schema, migrations, and client are used in development and production. Note PGlite's
limits: it multiplexes one underlying connection, so don't treat it as a stand-in for
testing lock contention, pool behavior, or throughput.
vp dev # PGlite + migrations + dev server
vp build # production build (Nitro portable output)
vp preview # preview the production build
vp check # format, lint, and type-check
vp run db:migrate # apply pending migrations (uses DATABASE_URL)
vp run db:reset # delete the local PGlite database
vp run typecheck # typecheck using tscFollow the Vercel deploy guide. Short version:
-
Provision a PostgreSQL database — the Vercel Marketplace Neon integration works well — and note its connection string.
-
Link the project once locally, which creates the IDs CI needs:
vpx vercel login vpx vercel link
-
Add the repository secrets:
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID(the IDs are in.vercel/project.jsonafter linking), andDATABASE_URL(for CI migrations; also set it in the Vercel project environment for the runtime). -
Push to
main: CI pulls project config, migrates, builds withvercel build, and uploads the artifact withvercel deploy --prebuilt.
To deploy from your machine instead:
vpx vercel pull --yes --environment=production
vp run db:migrate # with DATABASE_URL pointing at production
vpx vercel build --prod && vpx vercel deploy --prebuilt --prodThe Vite build always runs in your CI (or locally) — never on Vercel.