How visualdigitalagency/options-strategy-dashboard works
Theta Desk is an options-selling screener with learning features, paper trading, and an admin-gated Zerodha integration. Users sign in, review screened Nifty 50 setups, inspect a stock’s strategy details, then place paper orders and track positions. The API also serves account, learning, calendar, and portfolio features; a separate worker refreshes market data and manages scheduled trading tasks. Edges reflect the excerpts, SOURCE INDEX references, and README statements; unsampled subsystem details are represented at their documented module paths.
Main entry points: server.py JSON-RPC API · rpc.js RPC client · worker.py Scheduled worker · virtual.py Virtual trading
Components 23
User experience
- Dashboard
frontend/src/App.jsx - Sign-in UI
frontend/src/auth.jsx - RPC client
frontend/src/rpc.js - Screener
frontend/src/pages/Overview.jsx - Stock detail
frontend/src/pages/StockDetail.jsx - Strategy builder
frontend/src/pages/Builder.jsx - Portfolio
frontend/src/pages/Portfolio.jsx - Charts
frontend/src/components/Charts.jsx - Learning progress
engine/progress.py
Market analysis
- Screening rules
engine/risk_rules.py - Market data fetch
engine/data_fetch.py - Market calendar
engine/market_calendar.py
Trading
- Virtual trading
engine/virtual.py - Broker integration
engine/broker.py - Zerodha adapter
engine/brokers/zerodha.py
API and identity
- JSON-RPC API
server.py - Accounts and permissions
engine/auth.py
Background services
- Scheduled worker
engine/worker.py - PostgreSQL
engine/db.py - Redis cache
engine/cache.py
Other components
- Trader
- NSE market data
- Zerodha API
Connections 28
- Trader → Dashboard: uses
README.md - Dashboard → Screener: routes to
frontend/src/App.jsx - Dashboard → Sign-in UI: provides auth
frontend/src/App.jsx - Sign-in UI → RPC client: calls
frontend/src/auth.jsx - Screener → RPC client: requests data
- Stock detail → RPC client: requests data
- Strategy builder → RPC client: requests data
frontend/src/pages/Builder.jsx - Portfolio → RPC client: requests data
frontend/src/pages/Portfolio.jsx - Stock detail → Charts: renders
- Strategy builder → Charts: renders
frontend/src/pages/Builder.jsx - Portfolio → Charts: renders
frontend/src/pages/Portfolio.jsx - RPC client → JSON-RPC API: sends RPC
frontend/src/rpc.js - JSON-RPC API → Accounts and permissions: dispatches auth
server.py - JSON-RPC API → Screening rules: dispatches screening
server.py - JSON-RPC API → Virtual trading: dispatches trading
server.py - JSON-RPC API → Broker integration: dispatches broker
server.py - JSON-RPC API → Market calendar: serves calendar
server.py - JSON-RPC API → Learning progress: dispatches progress
server.py - Screening rules → Market data fetch: uses prices
engine/risk_rules.py - Market data fetch → NSE market data: fetches quotes
- Virtual trading → PostgreSQL: stores positions
engine/virtual.py - Virtual trading → Redis cache: caches snapshots
engine/virtual.py - Scheduled worker → Virtual trading: runs EOD pass
engine/worker.py - Scheduled worker → Market calendar: refreshes calendar
engine/worker.py - Scheduled worker → Screening rules: refreshes screen
- Scheduled worker → Redis cache: locks work
engine/worker.py - Broker integration → Zerodha adapter: uses adapter
engine/broker.py - Zerodha adapter → Zerodha API: connects