The Financial Analytics Agent ships as a single Vercel project — the Next.js web chat UI, the finance REST API, and the eve agent are all served from the same origin, so there are no cross-origin concerns and no per-service base URL variables to manage. The database is a Neon Postgres instance provisioned through the Vercel Marketplace, which automatically injectsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/financial-analytics-agent/llms.txt
Use this file to discover all available pages before exploring further.
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
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.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.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.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.
Build commands
Thepackage.json defines two production build targets:
| Script | Command | Purpose |
|---|---|---|
build | next build | Compiles the Next.js application — web chat UI, API routes, and static assets |
build:eve | eve build | Compiles the eve agent manifest — agent definition, tools, instructions, and channel config |
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
| Variable | Source | Action required |
|---|---|---|
DATABASE_URL | Neon Marketplace integration | Set automatically when Neon is provisioned via the Vercel Storage tab |
MISTRAL_API_KEY | Manual | Add in Project → Settings → Environment Variables in the Vercel dashboard |
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.