AI-Powered Stock Analysis & Market Intelligence Platform
A full-stack trading intelligence platform — real-time market data, a 15-factor AI Oracle scoring engine, global macro intelligence, Sentinel shadow-portfolio monitoring, and automated Gemini-powered email alerts. Free to deploy. Use your own API keys.
🎬 Live Demo → — Try it without an account. | 📦 Deploy in 15 min →
DISCLAIMER: This is an educational project for portfolio demonstration purposes. Not financial advice. See DISCLAIMER.md for full details.
- Live stock quotes and price tracking
- Technical indicators (RSI, MACD, Bollinger Bands)
- Volume analysis and market trends
- Multiple timeframe charts (1D, 5D, 1M, 6M, 1Y)
- Oracle Score™ — Proprietary 15-factor technical analysis system
- Trading Profile — Set your style (Day / Swing / Long-Term) and every AI output adapts:
- Deep-dive analysis, Oracle factor interpretations, email recommendations, backtesting defaults, and rebalancer thresholds all adjust to your horizon
- AI Market Intelligence — Automated hourly email alerts with:
- Gemini 2.0 Flash AI with Google Search grounding
- Macro intelligence snapshot injected into every analysis (VIX, DXY, BTC, Gold, 10Y yield, Fear & Greed, sector rotation, yield curve)
- Personalized stock recommendations (BUY/HOLD/SELL) with confidence scores, locked to your trading-style timeframe
- Portfolio impact analysis with Oracle-based stop-loss suggestions
- Market catalysts with clickable source links
- Watchlist generation for emerging opportunities
- TL;DR summaries and portfolio health metrics
- Customizable frequency (hourly/daily/weekly)
- Market Preview — Pre-market heads-up every weekday at 9 AM
- Market Close Summary — End-of-day recap at 5 PM (Mon-Fri)
- Sentiment analysis from news and social media
- Pattern recognition and trend prediction
- Global Pulse — VIX, DXY (live
DX-Y.NYB), BTC, Gold, 10Y yield, P/C ratio — all real-time in topbar + macro page - World Intelligence — 11 global market indices, sector rotation bars, real yield curve, Fear & Greed gauge
- Swing Screener — 30+ candidates filtered by RSI, off-52wk-high, price; Oracle signal badge for passing stocks
- Dividend Screener — 14 candidates sorted by effective yield after 30% NRA withholding
- Key Peers — semiconductor peers (NVDA, AMD, INTC, MU, LRCX, AMAT) for TSM/ASML context
- Tab-based layout — Global Pulse | World Intelligence
- Track positions locally — no brokerage connection required
- Add positions at
/simulation(Sentinel dashboard) with ticker, quantity, entry price - Live P&L, unrealized gains, 7-day sparklines, allocation donut chart
- Performance history chart (Lightweight Charts area series)
- Background monitor: Sentinel Engine checks every 5 min during market hours, sends email alerts on price breaches and Oracle score changes
- Bulk import via JSON
- Price alerts (above/below thresholds)
- Percentage change notifications
- Technical indicator triggers
- Email and in-app notifications
- Pre-configured industry watchlists (Tech Giants, EV, AI, Crypto)
- Custom watchlist creation
- Real-time tracking of multiple stocks
- Quick access to favorite symbols
- BYOK (Bring Your Own Keys) — Each user uses their own API keys
- End-to-end encryption for API credentials
- Secure session management
- No shared rate limits between users
| Feature | Silicon Oracle | Traditional Platforms |
|---|---|---|
| Cost | 100% Free | $10-50/month |
| Setup | 15 minutes | Hours of configuration |
| API Keys | Your own (BYOK) | Shared (rate limited) |
| AI Analysis | Gemini AI included | Extra cost or unavailable |
| Deployment | One-click cloud | Complex self-hosting |
| Multi-User | Built-in support | Usually single-user |
| Mobile | Responsive PWA | Native app required |
-
Fork this repository
git clone https://github.com/HarshShroff/Silicon-Oracle.git cd Silicon-Oracle -
Push to your GitHub
git remote set-url origin https://github.com/YOUR_USERNAME/silicon-oracle.git git push -u origin main
-
Set up Supabase Database (REQUIRED for production)
- Go to supabase.com and create free account
- Create new project (takes ~2 minutes to provision)
- Go to Settings → Database → Copy the URI connection string
- It looks like:
postgresql://postgres:[PASSWORD]@db.[PROJECT].supabase.co:5432/postgres
-
Deploy on Render
- Go to dashboard.render.com
- Click "New +" → "Blueprint"
- Connect your GitHub repo
- Click "Apply"
- CRITICAL: Add environment variable:
DATABASE_URL=<your-supabase-connection-string> - Wait 5-10 minutes
-
Done! Visit your URL and sign up
Important: Without Supabase, your data will be lost on every deploy/restart!
Your app, your keys! Silicon Oracle uses a unique BYOK (Bring Your Own Keys) architecture:
- Deploy the app (no API keys needed during deployment)
- Users sign up for their own accounts
- Each user adds their own API keys in Settings
- Keys are encrypted and stored per-user in database
- Everyone has independent rate limits and usage
No shared rate limits — Your keys, your quota More secure — Keys encrypted per-user Cost-effective — App owner doesn't pay for everyone Scalable — Add unlimited users Transparent — Users control their own API usage
| Service | Purpose | Free Tier | Get It |
|---|---|---|---|
| Finnhub | Market data | 60 calls/min | finnhub.io |
| Gemini | AI analysis & market intelligence | 60 requests/min | ai.google.dev |
| Gmail | Email alerts (optional) | Free | Use your Gmail + App Password |
| Job | When | What |
|---|---|---|
| Market Preview | 9:00 AM | Pre-market heads-up & portfolio impact |
| Sentinel Monitor | Every 5 min, 9 AM – 4 PM | Real-time position alerts |
| AI Market Intelligence | Every hour, 10 AM – 4 PM | Personalized stock picks via Gemini + macro snapshot |
| Market Close Summary | 5:00 PM | Today's performance recap |
| Daily Digest | 5:30 PM | Full portfolio summary + top opportunities |
All jobs respect your per-user notification preferences (toggle in Settings → Email). Any job can be triggered manually from the browser console — see API docs.
- Python 3.11+
- Node.js (for Tailwind CSS)
- Git
-
Clone the repository
git clone https://github.com/HarshShroff/Silicon-Oracle.git cd Silicon-Oracle -
Install Python dependencies
pip install -r requirements.txt
-
Install Node dependencies (for Tailwind CSS)
npm install
-
Build Tailwind CSS
npm run build:css # Or for watch mode: # npm run build:css -- --watch
-
Set up secrets (optional)
cp .env.example .env # Edit .env with your keys -
Run the app
python3.11 run_flask.py
-
Open your browser
http://localhost:5001
Frontend (Jinja2 + Alpine.js)
Analysis Sentinel Watchlist Scanner
Page (Simulation) Page Page
Flask Backend (Python)
Routes: main_bp, api_bp, auth_bp, sentinel_bp, sentinel_ui_bp
Services Layer
• StockService (market data — Finnhub + yfinance)
• OracleService (15-factor AI scoring)
• SentinelEngine (shadow position monitoring)
• MarketIntelligenceService (Gemini email generation + macro)
• AlertEngine (threshold notifications)
• EmailService (SMTP via user's Gmail)
External Services
• Finnhub API (market data)
• Google Gemini (AI analysis)
• yfinance (historical data)
• Supabase (database + auth)
Silicon-Oracle/
flask_app/ # Main Flask application
routes/ # URL routes (main, api, auth, sentinel, sentinel_ui)
services/ # Business logic services
templates/ # Jinja2 HTML templates
static/ # CSS, JS, images
models/ # Data models
agent/ # Agent orchestration module
runtime.py # AgentRuntime — Gemini-planned tool-call loop
execution_registry.py # Tool & command registry
permissions.py # Permission-gated tool blocking
session_store.py # JSON-persisted session store
utils/ # Utility modules
database.py # Database operations
encryption.py # API key encryption
ticker_utils.py # Ticker validation helpers
run_flask.py # Application entry point
requirements.txt # Python dependencies
render.yaml # Render deployment config
Dockerfile # Docker configuration
- Flask — Web framework
- Gunicorn — WSGI server
- APScheduler — Background tasks
- PostgreSQL — Database (Supabase recommended)
- SQLite — Local development only
- Cryptography — Fernet encryption
- Jinja2 — Templating
- Tailwind CSS — Styling (TradingView-inspired dark palette)
- Alpine.js — Reactive interactivity
- Lightweight Charts v4 — TradingView-style financial charts
- Chart.js — Allocation donuts & supplementary charts
- Finnhub — Market data
- Google Gemini — AI analysis & market intelligence
- yfinance — Historical data
- Render/Railway/Fly.io — Hosting
- GitHub Actions — CI/CD (optional)
- Docker — Containerization
Encryption at Rest — API keys encrypted with Fernet Secure Sessions — HTTPOnly, Secure cookies CSRF Protection — Flask-WTF enabled Environment Variables — No secrets in code HTTPS Enforced — Automatic on cloud platforms Input Validation — All user inputs sanitized Rate Limiting — Per-user API quotas
| Metric | Value |
|---|---|
| Response Time | <500ms average |
| Cold Start | ~30s (free tier) |
| Concurrent Users | 100+ (scales automatically) |
| API Calls/min | Unlimited (per-user keys) |
| Database | PostgreSQL (Supabase free: 500MB) |
| Build Time | 5-10 minutes |
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit with clear messages
git commit -m "Add amazing feature" - Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
- Follow PEP 8 for Python code
- Add tests for new features
- Update documentation
- Keep commits atomic and well-described
This project is licensed under the MIT License - see the LICENSE file for details.
- Finnhub for excellent market data API
- Google for Gemini AI access
- Render for free hosting
- Flask community for amazing framework
- Full Docs (pages, APIs, architecture): DOCS.md
- Deployment Guide: DEPLOYMENT.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Real-time stock analysis
- AI-powered Oracle scoring (15-factor system)
- Trading Profile (Day / Swing / Long-Term) — AI adapts everywhere
- AI Market Intelligence with automated email alerts + macro snapshot
- Market Preview (pre-market) & Close Summary (post-market) emails
- Sentinel shadow portfolio — track positions, live P&L, allocation donut, sparklines
- Multi-user BYOK system
- Watchlists and smart alerts
- Portfolio rebalancer with style-aware thresholds
- Agent orchestration module — Gemini-planned tool routing
- Simulation page: Performance History + Allocation Donut (50/50 side-by-side layout)
- TradingView-style UI with Lightweight Charts v4
- Public live demo page (no account required)
- Manual email-job trigger endpoint for testing
- Responsive design (mobile + desktop)
- Options trading analysis
- Crypto portfolio support
- Multi-agent workflows
- Portfolio backtesting
- Mobile app (React Native)
- Social features (share trades, strategies)
- Custom indicators and strategies
- Machine learning models
- Automated trading bots
- API for developers
Harsh Shroff
- Email: harshrofff@gmail.com
- LinkedIn: linkedin.com/in/harshroff
- GitHub: @HarshShroff
- Issues: GitHub Issues
- Discussions: GitHub Discussions