How winillnwang/us-stock-intelligence-platform works
This is a Django-based US stock information platform. Its principal workflow ingests daily prices from Alpha Vantage, validates and transforms records, stores stock and OHLCV data, then serves authenticated REST queries and server-rendered search/detail pages with price analytics. A management command and standalone script provide ingestion entry points. The README also documents JWT and OpenAPI/Swagger capabilities, but their implementation details were not sampled; those links are therefore documented rather than inferred from unseen code.
Main entry points: models.py Stock Models · alpha_vantage.py Price Service · views.py Stock API · update_stock_prices.py Update Command
Components 18
Data Ingestion
- Update Command
backend/stocks/management/commands/update_stock_prices.py - Fetch Script
scripts/fetch_stock_data.py - Stock Config
scripts/stock_config.py - Price Service
backend/stocks/services/alpha_vantage.py
Price Data
- Price Validation
backend/stocks/services/alpha_vantage.py - Price Persistence
backend/stocks/services/alpha_vantage.py - Stock Models
backend/stocks/models.py - MySQL Data
- Stock Admin
backend/stocks/admin.py
Web Experience
- Search and Analytics
backend/stocks/views.py - Stock Pages
backend/stocks/templates/stocks
API Delivery
- Stock API
backend/stocks/api/views.py - API Serializers
backend/stocks/api/serializers.py - API Routes
backend/stocks/api/urls.py - JWT Authentication
backend/config/settings.py - OpenAPI Docs
backend/config/urls.py
Other components
- API Client
- Alpha Vantage
Connections 19
- Update Command → Stock Models: looks up
backend/stocks/management/commands/update_stock_prices.py - Update Command → Price Service: updates prices
backend/stocks/management/commands/update_stock_prices.py - Fetch Script → Stock Config: loads settings
scripts/fetch_stock_data.py - Fetch Script → Price Service: fetches and cleans
scripts/fetch_stock_data.py - Price Service → Alpha Vantage: requests prices
backend/stocks/services/alpha_vantage.py - Price Service → Price Validation: transforms data
backend/stocks/services/alpha_vantage.py - Price Service → Price Persistence: saves prices
backend/stocks/services/alpha_vantage.py - Price Persistence → Stock Models: writes records
backend/stocks/services/alpha_vantage.py - Stock Models → MySQL Data: persists via ORM
README.md - Search and Analytics → Stock Models: queries stocks
backend/stocks/views.py - Search and Analytics → Stock Pages: renders pages
backend/stocks/views.py - API Routes → Stock API: routes requests
backend/stocks/api/urls.py - Stock API → Stock Models: queries records
backend/stocks/api/views.py - Stock API → API Serializers: serializes results
backend/stocks/api/views.py - Stock API → JWT Authentication: requires authentication
backend/stocks/api/views.py - API Client → Stock API: requests data
README.md - API Client → JWT Authentication: obtains tokens
README.md - API Client → OpenAPI Docs: views documentation
README.md - Stock Admin → Stock Models: manages records
backend/stocks/admin.py