Prerequisites
Ensure you have the following installed:Installation
Install Node.js dependencies
The monorepo uses npm workspaces managed by Turborepo.This installs dependencies for:
- Root workspace (Turborepo)
apps/web(Next.js frontend)apps/api(Express backend)
Set up Python environment (optional)
For faster Monte Carlo simulations, set up the Python environment:
The Python simulation engine is optional. The app can run simulations in TypeScript if Python is not configured.
Configure environment variables
Running the Development Server
- All Services (Recommended)
- API Only
- Web Only
Run both the API and web app concurrently using Turborepo:This starts:
- API server on
http://localhost:3001 - Web app on
http://localhost:3000
Project Structure
Development Workflow
Making Changes
Both the API and web app support hot reload:- API (Express + tsx): Automatically restarts on file changes in
apps/api/src/ - Web (Next.js): Fast Refresh updates the browser on changes in
apps/web/
Running Linters
Building for Production
apps/api- TypeScript compiled todist/apps/web- Next.js optimized production build in.next/
Seeding Demo Data
Populate the Nessie API with demo customer data:- Demo customer (Alex Morgan)
- Bank accounts (checking, savings, credit card)
- 12 months of realistic transaction history
- Merchants with categories
Testing the API
Common Issues
Port already in use
Port already in use
If ports 3000 or 3001 are already in use:
API key errors
API key errors
If you see “NESSIE_API_KEY not set” warnings:
- Ensure your
.envfile is at the repository root (not inapps/api/) - Verify the environment variables are loaded:
- Restart the dev server after adding keys
Python simulation not working
Python simulation not working
If simulations fail or are slow:
- Check if Python virtual environment is activated
- Verify NumPy is installed:
pip list | grep numpy - The app falls back to TypeScript simulation if Python fails
Gemini API rate limits
Gemini API rate limits
The Gemini 2.0 Flash model has rate limits. If you hit them:
- Wait a minute and try again
- The app falls back to mock parsing automatically
- Consider upgrading to a paid Gemini API plan
Module not found errors
Module not found errors
If you see TypeScript module errors:
Next Steps
Environment Variables
Configure all required API keys
Production Deployment
Deploy Drift to production
API Reference
Explore available API endpoints
Architecture
Understand how Drift works