- Neon connection string (already wired into
.envfiles). - Vercel projects for both the web app and API (Hobby tier is fine while usage stays light).
pnpminstalled locally.
Populate the following variables in both Vercel projects (web + API):
DATABASE_URL(Neon pooled connection string; store only in Vercel/secret manager)NEXTAUTH_SECRETNEXTAUTH_URLAPI_BASE_URLNEXT_PUBLIC_API_BASE_URL(web only, points to the API’s/apiprefix)- Google OAuth credentials (
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_API_KEY) - Gmail OAuth credentials (
GMAIL_OAUTH_CLIENT_ID,GMAIL_OAUTH_CLIENT_SECRET,GMAIL_OAUTH_REDIRECT_URI) - Any AI provider keys you intend to use (
OPENROUTER_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY) TOKEN_ENCRYPTION_KEY
- In Vercel, create a new project pointing to
apps/webas the root directory. - Build command:
pnpm --filter @email-automation/web build - Install command:
pnpm install --frozen-lockfile - Output:
.next - Configure domains (e.g.
app.yourdomain.com) and ensureNEXTAUTH_URLmatches the deployed URL.
- Create a second Vercel project pointing to
apps/api. - Install command:
pnpm install --frozen-lockfile - Build command:
pnpm --filter @email-automation/api build - Vercel automatically detects the
api/directory; the newapi/index.mjsfile wraps the NestJS express instance so requests to/api/*run through the serverless handler. - Set
API_BASE_URLandNEXT_PUBLIC_API_BASE_URLin the web project to the deployed API URL (e.g.https://voltamail-api.vercel.app/api). - After the first deploy, run Prisma migrations via
pnpm --filter @email-automation/database db:migratelocally (or wire a GitHub Action) pointing at the Neon database to keep schemas in sync.
- Copy
.env.exampleto.env(if not already) and ensure the NeonDATABASE_URLis present. - Start Postgres is no longer required locally; Prisma will connect directly to Neon.
- Run
pnpm install, thenpnpm devfor the monorepo experience, or target individual apps withpnpm --filter @email-automation/web dev/pnpm --filter @email-automation/api dev.