DATABASE_URL into the project’s environment. After linking the project and provisioning the database, you run migrations and the seed script once, then deploy.
Prerequisites
Before starting, make sure you have:- A Vercel account with the project repository imported
- The Vercel CLI installed and authenticated (
vercel login) - A Neon Postgres database provisioned via the Vercel Marketplace under your project’s Storage tab — this makes
DATABASE_URLavailable automatically
Deployment steps
1
Link the project
From the repository root, link your local working copy to the Vercel project:Follow the prompts to select your team and project. This writes a
.vercel/project.json file that subsequent CLI commands use to identify the project.2
Pull environment variables
Fetch the production environment variables (including the Neon The pulled file is used by the migration and seed scripts in the next steps. Make sure
DATABASE_URL) into a local .env.local file:MISTRAL_API_KEY is also present — either add it to the Vercel dashboard before pulling, or append it to .env.local manually.3
Run database migration
Apply the schema defined in This creates the
db/schema.sql to your Neon database:departments, categories, transactions, and budgets tables. The script reads DATABASE_URL from .env.local and is safe to re-run — it applies only the pending changes.4
Seed the database
Populate the database with approximately three years of deterministic synthetic financial data:The seed uses a fixed RNG seed (
mulberry32 in agent/lib/rng.ts), so re-running it produces exactly the same dataset. The data is deliberately authored with specific patterns — revenue seasonality, subscription compounding, campaign spend spikes, and infrastructure incidents — so every chart type has something meaningful to display.The seed script only needs to run once. Rerunning it truncates and regenerates the synthetic data, which is fine for a demo but would reset the dataset in production.
5
Deploy to production
Build and deploy the project:This triggers both the Next.js build (
pnpm build) and the eve manifest build (pnpm build:eve), then promotes the result to the production URL.Build commands
Thepackage.json defines two production build targets:
Both run as part of a standard Vercel deployment. The eve manifest is what makes the agent’s
session.started dynamic instructions fire at runtime rather than being frozen at build time.
Vercel configuration
Thevercel.json at the project root currently contains only the schema reference:
vercel.json
package.json and framework detection. The withEve() wrapper in next.config.ts handles mounting the eve agent at /eve/v1/* inside the Next.js app — no additional Vercel rewrites are needed.
The .vercelignore file excludes directories that should not be uploaded to Vercel’s build environment:
Environment variables in production
Node.js version
Thepackage.json declares:
Running migrations in production
For schema updates after the initial deploy, usevercel exec to run the migration script in the production environment without a local DATABASE_URL:
.env.local first when using this approach.