Skip to content
Open
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
7 changes: 0 additions & 7 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
{
"enabledPlugins": {
"frontend-design@claude-plugins-official": true,
"context7@claude-plugins-official": true,
"playwright@claude-plugins-official": true
}
}
43 changes: 0 additions & 43 deletions .claude/skills/cerebras/SKILL.md

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/claude-code-review.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/claude.yml

This file was deleted.

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 here:

@planning/PLAN.md
Empty file added Doc/.gitkeep
Empty file.
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

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.
Built entirely by coding agents as a capstone project for an agentic AI coding course. Full spec: [`planning/PLAN.md`](planning/PLAN.md).

## 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
- **Watchlist management** — track tickers manually or via AI (20-ticker cap)
- **Dark terminal aesthetic** — Bloomberg-inspired, data-dense layout

## Architecture
Expand All @@ -19,44 +19,56 @@ 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
- **Database**: SQLite in a named Docker volume, schema initialized on startup
- **AI**: LiteLLM → OpenRouter (Cerebras inference) with structured outputs
- **Market data**: Built-in GBM simulator (default) or Massive API (optional)

## Quick Start

```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
./scripts/start_mac.sh # macOS/Linux
# or
./scripts/start_windows.ps1 # Windows PowerShell

# Open http://localhost:8000
```

Both scripts wrap `docker compose up -d --build`; stop with `scripts/stop_mac.sh` / `scripts/stop_windows.ps1` (data persists in the `finally-data` volume).

## Environment Variables

| 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 |
| `MASSIVE_API_KEY` | No | Massive (Polygon.io) key for real market data; omit to use the simulator |
| `LLM_MOCK` | No | Set `true` for deterministic mock LLM responses (testing) |
| `MARKET_TICK_MS` | No | Market data poll/tick interval; defaults to 500ms (simulator) / 15000ms (Massive) |
| `APP_SHARED_SECRET` | No | Shared secret required on all `/api/*` requests; **required** for any non-localhost deployment |

See [`.env.example`](.env.example) for the full template.

## Project Structure

```
finally/
├── frontend/ # Next.js static export
├── backend/ # FastAPI uv project
├── backend/ # FastAPI uv project (owns DB schema, API, SSE, market data, LLM)
├── planning/ # Project documentation and agent contracts
├── test/ # Playwright E2E tests
├── db/ # SQLite volume mount (runtime)
└── scripts/ # Start/stop helpers
├── test/ # Playwright E2E tests + docker-compose.test.yml
└── scripts/ # Start/stop helpers wrapping docker compose
```

The SQLite database lives in a named Docker volume (`finally-data`), not in the repo tree.

## Testing

- Backend: `pytest` (within `backend/`)
- Frontend: unit tests (within `frontend/`)
- E2E: Playwright suite in `test/`, run against `docker-compose.test.yml` with `LLM_MOCK=true`

## License

See [LICENSE](LICENSE).
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.

Loading