Features: - FastAPI backend with stocks, news, signals, watchlist, analytics endpoints - React frontend with TailwindCSS dark mode trading dashboard - Celery workers for news fetching, sentiment analysis, pattern detection - TimescaleDB schema for time-series stock data - Docker Compose setup for all services - OpenAI integration for sentiment analysis
1.4 KiB
1.4 KiB
Copilot Instructions for MarketScanner
Project Overview
MarketScanner is a "fear-to-fortune" trading intelligence system that identifies buying opportunities by analyzing how stocks historically respond to panic-inducing news.
Tech Stack
- Backend: Python 3.12 + FastAPI + Celery + PostgreSQL/TimescaleDB + Redis
- Frontend: React 18 + TypeScript + TailwindCSS + Vite
- Infrastructure: Docker + Docker Compose
Key Concepts
- Panic Detection: Monitor news sentiment and price drops to identify panic events
- Pattern Matching: Match current panic against historical recovery patterns
- Confidence Scoring: Calculate buy signal confidence based on historical success rates
- Real-time Monitoring: Continuous news and price data fetching via Celery workers
Code Style
- Python: Follow PEP 8, use type hints, async/await for database operations
- TypeScript: Strict mode, functional components with hooks
- Use structured logging (structlog)
- Prefer composition over inheritance
Database
- TimescaleDB hypertables for time-series data (stock_prices)
- UUID primary keys
- Soft deletes where appropriate
API Design
- RESTful endpoints under
/api/v1/ - Pydantic schemas for validation
- Pagination with skip/limit
Testing
- pytest for Python
- Mock external APIs in tests
- Test critical business logic (pattern matching, confidence scoring)