PR Description - #181
Open
Paul-Orlando wants to merge 6 commits into
Open
PR Description#181Paul-Orlando wants to merge 6 commits into
Paul-Orlando wants to merge 6 commits into
Conversation
- Fix: GET endpoints no longer write to database - Perf: Optimize queries, cache portfolio values, use threadpool for reads - Duplication: Extract metrics.py, consolidate trade models - Code quality: Split functions, remove dead code, improve error handling - All 87 tests pass, lint clean, live server verified Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Watchlist with live price updates via SSE - Portfolio heatmap and P&L charts - Trade execution form - AI chat panel with model integration - Dark theme (Bloomberg-inspired) - All API endpoints connected - Mock data for development Also gitignore the runtime SQLite database (keep db/.gitkeep), per PLAN.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Node 20: Build Next.js frontend (static export) - Python 3.12: Run FastAPI backend + serve static frontend - Volume mount for SQLite persistence - Reads .env for API keys - Single container on port 8000 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- scripts/start_mac.sh, start_windows.ps1: build image if needed, run container with volume + .env, wait for health, open browser, print instructions - scripts/stop_mac.sh, stop_windows.ps1: stop and remove container, keep data volume - Idempotent: safe to run repeatedly (uses 'docker container inspect' so an existing image is not mistaken for a container) - .gitattributes: force LF for *.sh so scripts work when committed from Windows - docker-compose.yml: fixed volume name so compose and scripts share one database Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- test/e2e/test_full_workflow.spec.ts: 10-step serial workflow (fresh start, price streaming + flashes, manual buy, AI chat, AI trade, AI watchlist add, heatmap, sell, P&L chart, SSE reconnect) - Page objects for header, watchlist, trade form, positions, chat, heatmap, P&L chart - Helpers: trade/chat actions, backend cross-checks, flash MutationObserver, and a severable TCP proxy for a real SSE connection drop - test/docker-compose.test.yml: production image (LLM_MOCK=true, fresh in-memory DB) + separate Playwright container; screenshots/traces/videos kept on failure - Frontend: add data-testid attributes for stable selectors (no behavior change) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Layer 1 (Code): Rate limit chat (15/hr) and trades (20/hr) per IP - Layer 2 (Provider): Documented OpenRouter spend cap (set manually in the web UI) - In-memory sliding-window limiter with Railway proxy support - Returns 429 with retry-after on limit exceeded - Updated RAILWAY.md with protection documentation - All 91 tests passing, locally verified 429 responses Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-Agent Trading Backend Implementation
Overview
Complete implementation of the FinAlly AI trading workstation backend as a final project for the AI Coder: Complete Claude Code & Coding Agents Course.
What's Included
Architecture
Backend
Testing & Quality
Key Design Decisions
Files Changed
backend/app/main.py- FastAPI routes and startupbackend/app/db.py- SQLite layer with schema initializationbackend/app/agents/- 6 agent modules (base, portfolio, risk, analyzer, watchlist, orchestrator, metrics)backend/tests/api/- End-to-end API testsbackend/db/schema.sql- Database schema (7 tables, 10 indexes, seed data)pyproject.toml- Updated dependencies (litellm, pydantic, httpx)Testing
Next Steps
Notes
feature/multi-agent-architecture