Development Documentation¶
📋 Status: ✅ Core Development Docs Complete | 🚧 Additional Guides In Progress
Overview¶
This section contains comprehensive technical documentation for developers working on or contributing to the Trading System.
Architecture Documentation¶
System Architecture¶
- System Architecture - Complete system design and architecture
- Stock Screener Architecture - AI-powered screener implementation
Database¶
- Database Architecture - Database design, schema, and optimization
Logging¶
- Logging Architecture - Structured logging with PostgreSQL
Workflow Orchestration¶
- Prefect Deployment - Overview and implementation
- Prefect Deployment Operations - Step-by-step runbook
Development Workflow¶
Testing¶
- Testing Strategy - Testing guidelines and best practices
- Session Management Testing - Streamlit session testing
CI/CD¶
- CI/CD Pipeline - Continuous integration and deployment
System Architecture Diagram¶
graph TB
subgraph "Frontend Layer"
Streamlit[Streamlit UI<br/>Port 8501]
end
subgraph "API Layer"
FastAPI[FastAPI Server<br/>Port 8001]
end
subgraph "Service Layer"
DataIngestion[Data Ingestion<br/>✅ v1.0.0]
StrategyEngine[Strategy Engine<br/>🚧 v1.1.0]
Execution[Execution<br/>✅ v1.0.0]
RiskMgmt[Risk Management<br/>🚧 v1.1.0]
Analytics[Analytics<br/>✅ v1.0.0]
Notification[Notification<br/>🚧 v1.1.0]
end
subgraph "Orchestration"
Prefect[Prefect Server<br/>Port 4200]
end
subgraph "Data Layer"
PostgreSQL[(PostgreSQL<br/>trading_system + prefect)]
Redis[(Redis<br/>Cache)]
end
subgraph "External Services"
Alpaca[Alpaca API]
Polygon[Polygon.io]
Yahoo[Yahoo Finance]
Ollama[Ollama LLM]
end
Streamlit --> FastAPI
FastAPI --> DataIngestion
FastAPI --> StrategyEngine
FastAPI --> Execution
FastAPI --> RiskMgmt
FastAPI --> Analytics
DataIngestion --> Polygon
DataIngestion --> Yahoo
DataIngestion --> Alpaca
Analytics --> Ollama
Prefect --> DataIngestion
Prefect --> Analytics
DataIngestion --> PostgreSQL
Execution --> PostgreSQL
Analytics --> PostgreSQL
StrategyEngine --> PostgreSQL
DataIngestion --> Redis
Analytics --> Redis
Execution --> Alpaca
style DataIngestion fill:#00A86B
style Execution fill:#00A86B
style Analytics fill:#00A86B
style StrategyEngine fill:#FFA500
style RiskMgmt fill:#FFA500
style Notification fill:#FFA500
Status Indicators¶
- ✅ Implemented: Feature is complete and working
- 🚧 In Progress: Feature is being developed
- 📋 Planned: Feature is planned for future release
- 🔮 Future: Feature is under consideration
Development Resources¶
Getting Started¶
- Read System Architecture for overview
- Review Database Architecture for data structure
- Check Testing Strategy for testing guidelines
- Follow Prefect Deployment Operations for workflow setup
Code Quality¶
- Formatting: Black (88 char line length)
- Import Sorting: isort
- Linting: Flake8
- Type Checking: mypy
- Testing: pytest
Contributing¶
See CONTRIBUTING.md for contribution guidelines.