How epeltz33/stockwatch works
Main Components
A. Frontend Layer:
• Dual-frontend architecture:
• Traditional Flask templates (in app/templates/)
• Plotly Dash components (in frontend/)
• How these interact with the backend
B. Backend Layer:
• Flask Application Core
• Blueprint Modules:
• Auth Blueprint (authentication)
• Main Blueprint (core pages)
• Stock Blueprint (stock-related operations)
• User Blueprint (user management)
• Services Layer:
• Stock Services
• User Services
C. External Services:
• Polygon.io API Integration
• Cache System (indicated by cache_monitor.py)
D. Data Layer:
• SQLite Database
• SQLAlchemy ORM
• Migration System (Alembic)
Component Relationships
[Client Browser] ←→ [Frontend Layer (Flask Templates + Plotly Dash)]
• ↓↑
[Authentication Layer (auth.py)] → [User Services]
• ↓↑
[Application Core (Flask)] → [Blueprints]
• ↓↑
[Services Layer] → [Stock Services, User Services]
• ↓↑
[External API Layer] → [Polygon.io API]
• ↓↑
[Data Layer] → [SQLite + SQLAlchemy]
Important Elements to Emphasize
A. Security Flow:
• Authentication flow through auth blueprint
• Secure routes and middleware
B. Data Flow:
• Stock data retrieval path from Polygon.io
• Caching mechanism for optimization
• Database interactions
C. User Interface Components:
• Separate flows for template-based pages vs. Dash components
• How they integrate in the frontend
Specific Implementation Details
• app.py (Main application entry)
• config.py (Configuration management)
• extensions.py (Flask extensions)
• models.py (Database models)