Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"enabledPlugins": {
"frontend-design@claude-plugins-official": true,
"context7@claude-plugins-official": true,
"playwright@claude-plugins-official": true
"playwright@claude-plugins-official": true,
"independent-reviewer@emmanuel-tools": true
}
}
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

All project documentation is in the `planning` directory.

The key document is PLAN.md included in full below; the market data component has been completed and is summarized in the file `planning/MARKET_DATA_SUMMARY.md` with more details in the `planning/archive` folder. Consult these docs only when required. The remainder of the platform is still to be developed.
The key document is PLAN.md included in full below. The market data component is fully designed in `planning/MARKET_DATA_DESIGN.md` (implementation-ready code and tests for `backend/app/market/`); background research is in `planning/MARKET_INTERFACE.md`, `planning/MARKET_SIMULATOR.md` and `planning/MASSIVE_API.md`. Consult these docs only when required. No code has been written yet; the whole platform, including market data, is still to be developed.

@planning/PLAN.md
63 changes: 23 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,44 @@
# 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.
An AI-powered trading workstation: live market data, a simulated $10k portfolio, and an LLM chat assistant that can analyze positions and execute trades. Built by coding agents as the capstone of an agentic AI coding course.

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

## Features
- **Designed:** market data subsystem (GBM simulator, Massive API client, price cache, SSE stream). Implementation-ready code and tests are in [planning/MARKET_DATA_DESIGN.md](planning/MARKET_DATA_DESIGN.md)
- **To do:** everything else: implementing market data in `backend/app/market/`, portfolio, watchlist and chat APIs, database, Next.js frontend, Docker packaging

- **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
No application code has been written yet. The full specification is in [planning/PLAN.md](planning/PLAN.md).

## Architecture

Single Docker container serving everything on port 8000:
One Docker container 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**: LiteLLM → OpenRouter (Cerebras inference) with structured outputs
- **Market data**: Built-in GBM simulator (default) or Massive API (optional)
- **Frontend:** Next.js static export (TypeScript, Tailwind)
- **Backend:** FastAPI managed with `uv`, SSE for live prices
- **Database:** SQLite, lazily initialized
- **AI:** LiteLLM → OpenRouter (Cerebras) with structured outputs
- **Market data:** built-in simulator by default, Massive API if a key is set

## Quick Start
## Development

```bash
# Clone and configure
cp .env.example .env
# Add your OPENROUTER_API_KEY to .env

# Run with Docker
docker build -t finally .
docker run -v finally-data:/app/db -p 8000:8000 --env-file .env finally
`backend/` does not exist yet. Once it is built from the design doc (see its implementation checklist):

# Open http://localhost:8000
```bash
cd backend
uv sync --extra dev
uv run pytest # run tests
uv run python market_data_demo.py # terminal demo of live prices
```

## Environment Variables

Set in `.env` at the project root:

| Variable | Required | Description |
|---|---|---|
| `OPENROUTER_API_KEY` | Yes | OpenRouter API key for AI chat |
| `MASSIVE_API_KEY` | No | Massive (Polygon.io) key for real market data; omit to use 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
├── test/ # Playwright E2E tests
├── db/ # SQLite volume mount (runtime)
└── scripts/ # Start/stop helpers
```
| `OPENROUTER_API_KEY` | Yes | OpenRouter key for AI chat |
| `MASSIVE_API_KEY` | No | Real market data; omit to use the simulator |
| `LLM_MOCK` | No | `true` for deterministic mock LLM responses |

## License

Expand Down
59 changes: 0 additions & 59 deletions backend/CLAUDE.md

This file was deleted.

55 changes: 0 additions & 55 deletions backend/README.md

This file was deleted.

1 change: 0 additions & 1 deletion backend/app/__init__.py

This file was deleted.

23 changes: 0 additions & 23 deletions backend/app/market/__init__.py

This file was deleted.

75 changes: 0 additions & 75 deletions backend/app/market/cache.py

This file was deleted.

31 changes: 0 additions & 31 deletions backend/app/market/factory.py

This file was deleted.

Loading