Skip to content

balalr92/finally

 
 

Repository files navigation

FinAlly — AI Trading Workstation

A visually stunning AI-powered trading workstation that streams live market data, simulates portfolio trading, and integrates an LLM chat assistant that can analyze positions and execute trades via natural language.

Built entirely by coding agents as a capstone project for an agentic AI coding course.

Features

  • Live price streaming via SSE with green/red flash animations
  • Simulated portfolio — $10k virtual cash, market orders, instant fills
  • Portfolio visualizations — heatmap (treemap), P&L chart, positions table
  • AI chat assistant — analyzes holdings, suggests and auto-executes trades
  • Watchlist management — track tickers manually or via AI
  • Dark terminal aesthetic — Bloomberg-inspired, data-dense layout

Architecture

Single Docker container serving everything on port 8000:

  • Frontend: Next.js (static export) with TypeScript and Tailwind CSS
  • Backend: FastAPI (Python/uv) with SSE streaming
  • Database: SQLite with lazy initialization
  • AI: OpenAI GPT-5.4 mini with structured outputs
  • Market data: Built-in GBM simulator (default) or Massive/Polygon.io API (optional)

Quick Start

# Clone and configure
cp .env.example .env
# Add your OPENAI_API_KEY to .env

# macOS/Linux
./scripts/start_mac.sh

# Windows
./scripts/start_windows.ps1

# Or run directly with Docker
docker build -t finally .
docker run -v finally-data:/app/db -p 8000:8000 --env-file .env finally

Open http://localhost:8000.

Environment Variables

Variable Required Description
OPENAI_API_KEY Yes OpenAI API key for AI chat
MASSIVE_API_KEY No Polygon.io key for real market data; omit to use the built-in simulator
LLM_MOCK No Set true for deterministic mock LLM responses (testing)

Project Structure

finally/
├── frontend/    # Next.js static export
├── backend/     # FastAPI uv project
├── planning/    # Project documentation and agent contracts
├── scripts/     # Start/stop helpers (Mac and Windows)
├── test/        # Playwright E2E tests
└── db/          # SQLite volume mount (runtime)

License

See LICENSE.

About

FinAlly Capstone Project - LLM driven Trader Workstation for Simulated Trading

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 64.5%
  • TypeScript 30.0%
  • PowerShell 2.6%
  • Shell 1.0%
  • Dockerfile 0.8%
  • CSS 0.8%
  • JavaScript 0.3%