Environment Setup¶
Current MVP
Local development environment setup covers the backend, data pipeline, and Next.js frontend.
Prerequisites¶
| Tool | Version | Purpose |
|---|---|---|
| Python | ≥ 3.12 | Backend and data pipeline |
| Node.js | ≥ 20 | Next.js frontend |
| Docker Desktop | Latest | All services via Compose |
| uv | Latest | Fast Python package management |
| Git | Latest | Version control |
Clone the Repository¶
Environment Variables¶
Copy the example env file and fill in your values:
# .env — required variables
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/finsight
REDIS_URL=redis://localhost:6379
OPENAI_API_KEY=sk-...
LANGFUSE_PUBLIC_KEY=pk-...
LANGFUSE_SECRET_KEY=sk-...
SECRET_KEY=your-jwt-secret
Backend Setup¶
Frontend Setup¶
Docker Services¶
Start all infrastructure services (PostgreSQL, Redis, Elasticsearch):
pgvector Extension¶
# Ensure pgvector is enabled
docker compose exec postgres psql -U postgres -d finsight -c "CREATE EXTENSION IF NOT EXISTS vector;"