A visually stunning AI-powered trading workstation that streams live market data, lets you trade a simulated portfolio, and integrates an LLM chat assistant that can analyze positions and execute trades on your behalf. Think Bloomberg terminal with an AI copilot.
- Live price streaming via SSE — prices flash green/red on change with sparkline mini-charts
- Simulated portfolio — $10,000 virtual cash, instant market order fills, no fees
- Portfolio visualization — treemap heatmap by P&L weight + portfolio value chart over time
- AI chat assistant — ask about your portfolio, get analysis, execute trades via natural language
- Dual market data — built-in simulator (default) or real data via Massive/Polygon.io API
# Copy and configure environment variables
cp .env.example .env
# Add your OpenRouter API key (required for AI chat)
# Build and run
docker run -v finally-data:/app/db -p 8000:8000 --env-file .env finally
# Or use the provided scripts
./scripts/start_mac.shOpen http://localhost:8000.
| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY |
Yes | OpenRouter key for LLM chat (uses Cerebras inference) |
MASSIVE_API_KEY |
No | Polygon.io key for real market data (simulator used if absent) |
LLM_MOCK |
No | Set true for deterministic mock LLM responses (testing) |
| Layer | Technology |
|---|---|
| Frontend | Next.js (TypeScript, static export), Tailwind CSS, Lightweight Charts |
| Backend | FastAPI (Python), uv, SQLite |
| AI | LiteLLM → OpenRouter → Cerebras (fast inference) |
| Deployment | Single Docker container, port 8000 |
Docker Container (port 8000)
├── FastAPI
│ ├── /api/* REST endpoints
│ ├── /api/stream/* SSE price streaming
│ └── /* Static Next.js frontend
├── SQLite (volume-mounted at db/finally.db)
└── Background tasks: market data (~500ms), portfolio snapshots (30s)
# Backend
cd backend && uv sync && uv run uvicorn app.main:app --reload
# Frontend
cd frontend && npm install && npm run dev# Backend unit tests
cd backend && uv run pytest
# E2E tests (requires Docker)
cd test && docker compose -f docker-compose.test.yml up