Files
invest-copilot/BRAIN.md
T

19 lines
849 B
Markdown
Raw Normal View History

# BRAIN.md
2026-05-30 11:28:59 -04:00
## Architecture (invest-copilot)
- **Backend:** FastAPI (`src/backend/main.py`) — routers, services, models, schemas, Celery tasks
- **Frontend:** Next.js 15 App Router — pages, components (shadcn/ui), Zustand stores, TanStack Query hooks
- **Data:** TimescaleDB (PostgreSQL), Redis cache, MinIO storage
- **Pipeline:** `src/data-pipeline/` — price/SEC/news ingestion, `pipeline.py` orchestrator
- **Real-time:** Celery → Redis Pub/Sub → SSE/WebSocket (`stream.py`) → frontend
2026-05-30 11:28:59 -04:00
## Key Patterns
- Frontend → FastAPI Router → Service → SQLAlchemy → TimescaleDB
- Auth: JWT + session via middleware
- Strategy → DB → Celery evaluation → Alert → SSE push
2026-05-30 11:28:59 -04:00
## Invariants
- TimescaleDB hypertables for all time-series data
- Never assume DB schema — read migrations first
- Research → design → implement flow