How iota-008/orb-strategy works
Purpose and entry points
IntraTrade is a real-time NSE intraday signal dashboard. The React SPA starts at ORB Strategy/dashboard/src/index.js and composes its UI in ORB Strategy/dashboard/src/App.js. The Node service starts from ORB Strategy/server/index.js, exposing REST APIs and a Socket.IO signal stream.
Frontend application
The dashboard presents market-open/closed state, Kite authentication callback flow, strategy selection, and live stock signals. Primary views/components are under:
• ORB Strategy/dashboard/src/components/home.js
• ORB Strategy/dashboard/src/components/stocks.js
• ORB Strategy/dashboard/src/components/KiteCallback.js
The browser calls /api/* for session, algorithm, watchlist, and market-status operations, then consumes Socket.IO broadcasts for incremental signal updates.
API and session boundary
Express routing separates API endpoints from engine orchestration:
• ORB Strategy/server/routes/index.js
• ORB Strategy/server/routes/api.js
• ORB Strategy/server/controllers/method.js
The controller is the integration boundary for Zerodha Kite Connect: it establishes/authenticates Kite access, obtains market status, manages subscriptions, and coordinates the ticker lifecycle with Socket.IO clients.
Streaming signal engine
KiteTicker delivers full-mode ticks for the selected NSE watchlist. On each tick, the engine retains instrument-specific state, invokes the active strategy, filters actionable Buy/Sell results, and broadcasts the resulting signal set. The strategy registry enables live switching without restarting the market stream:
• ORB Strategy/server/controllers/method.js
• ORB Strategy/server/algos/index.js
• ORB Strategy/server/data/nse_symbols.js
nse_symbols.js supplies the Nifty 50/100/500 subscription universes; environment configuration determines the active list and strategy thresholds.
Quantitative strategy boundary
Strategies are independent stateful-per-instrument calculation modules behind a common algorithm interface:
• ORB Strategy/server/algos/orb.js
• ORB Strategy/server/algos/vwap.js
• ORB Strategy/server/algos/momentum.js
• ORB Strategy/server/algos/ema.js
ORB captures an opening price range; VWAP and momentum compare LTP against intraday references; EMA detects crossover events. Each generates direction and stop-loss values, while the controller owns tick transport, strategy selection, and client broadcast.
Runtime and deployment
The system runs Node.js/Express plus Socket.IO and a separately built React static site. Docker builds the SPA into nginx and packages the backend:
• ORB Strategy/dashboard/Dockerfile
• ORB Strategy/dashboard/nginx.conf
• ORB Strategy/server/Dockerfile
• docker-compose.yml
Production traffic is intended to pass through Traefik with TLS: SPA requests go to nginx, /api and health traffic to Express, and /socket.io to the realtime server. Zerodha Kite Connect is the external market-data and authentication dependency.
Delivery boundary
GitHub Actions deploys the repository to a remote Docker Compose host:
• .github/workflows/deploy.yml
• .env.production.example
Secrets, Kite credentials, domain configuration, market hours, watchlist size, and strategy parameters are runtime/deployment concerns rather than application source state.
Main entry points: method.js Kite and stream controller · docker-compose.yml Traefik TLS router · App.js Dashboard shell · stocks.js Live stocks view
Components 18
React dashboard
- SPA entry
ORB Strategy/dashboard/src/index.js - Dashboard shell · Composes authentication, market state, and live-signal UI.
ORB Strategy/dashboard/src/App.js - Dashboard views
ORB Strategy/dashboard/src/components/home.js - Live stocks view
ORB Strategy/dashboard/src/components/stocks.js - Kite auth callback
ORB Strategy/dashboard/src/components/KiteCallback.js
Signal service
- Server entry
ORB Strategy/server/index.js - Express routes
ORB Strategy/server/routes/index.js - API endpoints · Session, algorithm, watchlist, and market-status operations.
ORB Strategy/server/routes/api.js - Kite and stream controller · Owns authentication, subscriptions, ticker lifecycle, and Socket.IO broadcasts.
ORB Strategy/server/controllers/method.js - Signal stream · Publishes actionable signal sets to connected dashboards.
ORB Strategy/server/index.js - Strategy registry · Enables live strategy switching without restarting the stream.
ORB Strategy/server/algos/index.js - Signal strategies · ORB, VWAP, momentum, and EMA produce direction and stop-loss values per instrument.
ORB Strategy/server/algos/orb.js
Market integration
- NSE watchlist universes · Supplies Nifty 50, 100, and 500 subscription lists.
ORB Strategy/server/data/nse_symbols.js - Zerodha Kite Connect · Provides authentication and full-mode market ticks.
Production delivery
- Static-site nginx · Serves the built React SPA.
ORB Strategy/dashboard/nginx.conf - Traefik TLS router · Routes SPA, API, health, and Socket.IO traffic.
docker-compose.yml - Docker Compose host · Runs the frontend and backend production services.
docker-compose.yml - GitHub deployment · Deploys the repository to the remote Compose host.
.github/workflows/deploy.yml
Connections 22
- SPA entry → Dashboard shell: mounts
- Dashboard shell → Dashboard views: composes
- Dashboard shell → Live stocks view: composes
- Dashboard shell → Kite auth callback: handles auth return
- Dashboard views → Traefik TLS router: REST /api
- Live stocks view → Traefik TLS router: Socket.IO
- Traefik TLS router → Static-site nginx: SPA traffic
- Traefik TLS router → Server entry: API and realtime traffic
- Server entry → Express routes: registers
- Express routes → API endpoints: dispatches
- API endpoints → Kite and stream controller: invokes
- Kite and stream controller → Zerodha Kite Connect: authenticates and subscribes
- Zerodha Kite Connect → Kite and stream controller: full-mode ticks
- Kite and stream controller → NSE watchlist universes: selects instruments
- Kite and stream controller → Strategy registry: selects active strategy
- Strategy registry → Signal strategies: resolves algorithm
- Kite and stream controller → Signal stream: broadcasts signals
- Signal stream → Live stocks view: incremental updates
- GitHub deployment → Docker Compose host: deploys
- Docker Compose host → Static-site nginx: runs frontend image
- Docker Compose host → Server entry: runs backend image
- Traefik TLS router → Docker Compose host: routes to services