How tds2k5/tradelab works
TradeLab is a Flask stock-trading simulator: users register or sign in, inspect quotes and portfolio value, then buy or sell shares and review transaction/history views. Flask routes in app.py own these workflows and persist account and portfolio changes through db.py; helpers.py supplies cached quote, search, and historical-market data. The source excerpts confirm these relationships, but the README is empty and much of app.py is unsampled, so uncertain route-to-template and ancillary feature links are omitted.
Main entry points: app.py Flask workflows · db.py SQL access · helpers.py Stock search · finance.db SQLite database
Components 15
Web workflows
- Flask workflows
app.py - Account access
app.py - Buy and sell
app.py - Portfolio view
app.py - Price history
app.py
Market data
- Stock search
helpers.py - Quote lookup
helpers.py - Historical prices
helpers.py - Market movers
helpers.py
Persistence
- SQL access
db.py - SQLite database
finance.db
Browser UI
- UI interactions
static/interactions.js
Other components
- Investor
- Yahoo Finance
- Web browser
Connections 19
- Investor → Flask workflows: uses
app.py - Flask workflows → Account access: handles auth
app.py - Flask workflows → Buy and sell: routes trades
app.py - Flask workflows → Portfolio view: renders portfolio
app.py - Flask workflows → Price history: serves history
app.py - Flask workflows → SQL access: queries
app.py - Buy and sell → SQL access: updates holdings
app.py - Portfolio view → SQL access: reads holdings
app.py - Account access → SQL access: checks users
app.py - Flask workflows → Quote lookup: looks up quotes
app.py - Flask workflows → Stock search: searches stocks
app.py - Price history → Historical prices: loads prices
app.py - Portfolio view → Market movers: shows movers
app.py - Quote lookup → Yahoo Finance: fetches quote
helpers.py - Stock search → Yahoo Finance: searches listings
helpers.py - Historical prices → Yahoo Finance: fetches prices
helpers.py - Market movers → Yahoo Finance: downloads prices
helpers.py - SQL access → SQLite database: reads and writes
db.py - Web browser → UI interactions: runs scripts