Skip to main content
Drift requires several API keys and configuration variables to function. These should be stored in a .env file at the root of your monorepo.

Required Variables

Nessie API (Banking Data)

NESSIE_API_KEY=your_nessie_api_key_here
NESSIE_BASE_URL=http://api.nessieisreal.com
NESSIE_API_KEY
string
required
Capital One Nessie API key for accessing demo banking data. Get your key at nessieisreal.com.
NESSIE_BASE_URL
string
default:"http://api.nessieisreal.com"
Base URL for the Nessie API. Defaults to the public Nessie endpoint.

Google Gemini (AI Goal Parsing)

GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_API_KEY
string
required
Google Gemini API key for natural language goal parsing, narrative generation, and conversational AI. Get your key from Google AI Studio.Used for:
  • Parsing user goals from plain English (“Save $50k for a house in 3 years”)
  • Generating personalized financial narratives
  • Powering voice conversation features
  • Creating actionable recommendations
Without a Gemini API key, the app falls back to mock goal parsing with limited pattern matching.

ElevenLabs (Voice Narration)

ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_VOICE_ID=josh
ELEVENLABS_API_KEY
string
ElevenLabs API key for text-to-speech voice narration and speech-to-text transcription. Get your key at elevenlabs.io.Optional - The app works without voice features if this is not set.
ELEVENLABS_VOICE_ID
string
default:"josh"
Voice ID for narration. Available options:
  • josh - Friendly, energetic (default)
  • adam - Deep, authoritative
  • rachel - Warm, professional
  • bella - Soft, reassuring
  • antoni - Confident, punchy
  • domi - Strong, bold

Plaid (Real Bank Connectivity)

PLAID_CLIENT_ID=your_plaid_client_id
PLAID_SECRET=your_plaid_secret
PLAID_ENV=sandbox
PLAID_CLIENT_ID
string
Plaid client ID for connecting real bank accounts. Get credentials at plaid.com/developers.
PLAID_SECRET
string
Plaid secret key corresponding to your client ID.
PLAID_ENV
string
default:"sandbox"
Plaid environment. Options:
  • sandbox - Testing with fake data
  • development - Testing with real credentials
  • production - Live data
Plaid is optional. The app can use Nessie demo data if Plaid is not configured.

Optional Variables

OpenAI (Alternative to Gemini)

OPENAI_API_KEY=your_openai_api_key_here
OPENAI_API_KEY
string
OpenAI API key (used by the Python simulation layer for enhanced analysis). Get your key at platform.openai.com.

Server Configuration

PORT=3001
NEXT_PUBLIC_API_URL=http://localhost:3001
PORT
number
default:"3001"
Port for the Express API server.
NEXT_PUBLIC_API_URL
string
default:"http://localhost:3001"
API base URL accessible from the Next.js frontend. Must be prefixed with NEXT_PUBLIC_ to be available in the browser.

Complete .env Template

# Required - Nessie Banking API
NESSIE_API_KEY=your_nessie_api_key_here
NESSIE_BASE_URL=http://api.nessieisreal.com

# Required - Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key_here

# Optional - ElevenLabs Voice
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
ELEVENLABS_VOICE_ID=josh

# Optional - Plaid Bank Connectivity
PLAID_CLIENT_ID=your_plaid_client_id
PLAID_SECRET=your_plaid_secret
PLAID_ENV=sandbox

# Optional - OpenAI
OPENAI_API_KEY=your_openai_api_key_here

# Server Configuration
PORT=3001
NEXT_PUBLIC_API_URL=http://localhost:3001

Security Best Practices

Never commit your .env file to version control!The .env file should be listed in .gitignore.
1

Use .env.example for templates

Create a .env.example file with placeholder values to commit to your repository:
NESSIE_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
2

Rotate keys regularly

Rotate API keys periodically, especially if they may have been exposed.
3

Use different keys per environment

Use separate API keys for development, staging, and production environments.
4

Set appropriate rate limits

Configure rate limits in your API provider dashboards to prevent abuse.

Verifying Configuration

The API server logs warnings for missing required keys on startup:
Warning: NESSIE_API_KEY not set in environment variables
You can verify your configuration by checking the health endpoint:
curl http://localhost:3001/health

Build docs developers (and LLMs) love