How sircharan/stocky-ai works
Stocky AI is a personal Indian-markets trading assistant delivered through a Telegram bot and a web chat, with a separate marketing site. Users submit natural-language requests or choose a web feature; the bot or web API dispatches requests to trading, market-data, analysis, and research capabilities, then returns results in the originating interface. The web product also persists conversations, watchlists, and feedback. The README documents additional feature breadth beyond the sampled code; those branches are represented at subsystem level, while edges are limited to documented or excerpted relationships.
Main entry points: app/main.py REST API routes · chat.py Chat API · bot/main.py Bot runtime · nlp.py Bot commands
Components 26
Web chat and API
- Chat interface
stocky-web/frontend/src/app/chat/ChatShell.tsx - Chat API
stocky-web/backend/app/handlers/chat.py - REST API routes
stocky-web/backend/app/main.py - Application database
stocky-web/backend/app/database.py - Conversation context
stocky-web/backend/app/context_manager.py - User features
stocky-web/backend/app/handlers/watchlist.py
Research and intelligence
- Stock analysis
stocky-web/backend/app/handlers/analyse.py - Research council
stocky-web/backend/app/handlers/council.py - Market intelligence
stocky-web/backend/app/handlers/scan.py - AI model clients
stocky-web/backend/app/ai_client.py - Unified data layer
stocky-web/backend/app/services/data_enricher.py
Trading services
- Trade operations
stocky-web/backend/app/handlers/trading.py - Options analytics
stocky-web/backend/app/handlers/options.py
Telegram assistant
- Bot runtime
stocky-ai/bot/main.py - Bot commands
stocky-ai/bot/handlers/nlp.py - Bot stock analysis
stocky-ai/bot/handlers/analyse.py - Bot trade commands
stocky-ai/bot/handlers/trading.py - Bot Kite client
stocky-ai/bot/kite_client.py - Bot database
stocky-ai/bot/database.py
Marketing site
- Marketing pages
stocky-landing/src/app/page.tsx - Waitlist endpoint
stocky-landing/src/app/api/waitlist/route.ts
Other components
- Web user
- Zerodha Kite
- Dhan market data
- Telegram user
- Site visitor
Connections 25
- Web user → Chat interface: uses
README.md - Chat interface → REST API routes: sends requests
README.md - REST API routes → Chat API: routes chat
stocky-web/backend/app/main.py - REST API routes → Market intelligence: routes features
stocky-web/backend/app/main.py - REST API routes → Trade operations: routes trades
stocky-web/backend/app/main.py - REST API routes → Options analytics: routes options
stocky-web/backend/app/main.py - Chat API → Application database: persists conversations
README.md - Chat API → Conversation context: uses context
- Chat API → AI model clients: requests responses
- Research council → AI model clients: calls agents
- Stock analysis → Unified data layer: enriches data
- Market intelligence → Unified data layer: uses market data
- Trade operations → Zerodha Kite: places orders
README.md - Options analytics → Dhan market data: gets options data
README.md - User features → Application database: persists preferences
README.md - Telegram user → Bot runtime: sends commands
README.md - Bot runtime → Bot commands: dispatches commands
stocky-ai/bot/main.py - Bot commands → Bot stock analysis: dispatches analysis
stocky-ai/bot/handlers/nlp.py - Bot commands → Bot trade commands: dispatches trades
stocky-ai/bot/handlers/nlp.py - Bot stock analysis → Bot database: logs activity
stocky-ai/bot/handlers/analyse.py - Bot trade commands → Bot Kite client: executes trades
README.md - Bot Kite client → Zerodha Kite: calls broker
stocky-ai/bot/kite_client.py - Bot runtime → Bot database: initializes store
stocky-ai/bot/main.py - Site visitor → Marketing pages: views
README.md - Marketing pages → Waitlist endpoint: submits signup