A modern stock market analytics platform with AI-powered insights, real-time data, and portfolio tracking.
- Real-time stock data from Polygon.io API
- Historical price charts with multiple views (Line, Area, Volume)
- OHLC data (Open, High, Low, Close)
- Market cap & volume statistics
- Company search with autocomplete
- AI Chat Assistant - Ask questions about stocks, markets, and investing (powered by Gemini)
- AI Stock Summaries - Get instant AI-generated analysis for any stock
- AI Market News - Daily market news generated by AI (no API rate limits!)
- Multiple Watchlists - Create and manage watchlists
- Track stocks - Add/remove stocks from watchlists
- Real-time prices - View current prices for watchlist items
- Stock News - Latest news articles from Polygon.io
- Cash Flow Statements - Quarterly financial data
- Income Statements (Coming Soon)
- Balance Sheets (Coming Soon)
- Clean, matte dark theme
- Responsive design
- Inter & JetBrains Mono fonts
- Smooth animations
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS |
| Backend | Django 4, Django REST Framework |
| Database | SQLite (dev), PostgreSQL (prod) |
| Authentication | Firebase Auth (Email/Password) |
| Stock Data | Polygon.io API |
| AI | Google Gemini 2.5 Flash |
- Python 3.10+
- Node.js 18+ & npm
- Git
stonklytics/
βββ backend/ # Django API
β βββ api/ # Auth, Chat, Watchlist, Summary endpoints
β βββ stock/ # Stock data, News, Financials endpoints
β βββ backend/ # Django settings
β βββ .env # Environment variables (create this)
β βββ manage.py
β βββ requirements.txt
βββ frontend/ # React + Vite
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ api.js # API client
β β βββ firebase.ts # Firebase config
β β βββ index.css # Global styles
β βββ package.json
β βββ vite.config.js
βββ README.md
git clone https://github.com/yuktakul04/stonklytics.git
cd stonklyticscd backend
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install -U pip
pip install -r requirements.txt
# Create .env file
touch .envAdd the following to backend/.env:
POLYGON_API_KEY=your_polygon_api_key
GEMINI_API_KEY=your_gemini_api_keyRun migrations and start the server:
python manage.py migrate
python manage.py runserverBackend runs at: http://127.0.0.1:8000
Open a new terminal:
cd frontend
npm install
npm run devFrontend runs at: http://localhost:5173
| Variable | Description | Required |
|---|---|---|
POLYGON_API_KEY |
API key from Polygon.io | Yes |
GEMINI_API_KEY |
API key from Google AI Studio | Yes |
Configure your Firebase project credentials:
const firebaseConfig = {
apiKey: "your-api-key",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project",
storageBucket: "your-project.appspot.com",
messagingSenderId: "your-sender-id",
appId: "your-app-id"
};| Method | Endpoint | Description |
|---|---|---|
| POST | /api/signup |
Create new user |
| POST | /api/login |
User login |
| GET | /api/profile |
Get user profile |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/stock/data/?ticker=AAPL |
Get stock data |
| GET | /api/stock/data/historical/?ticker=AAPL&from=2024-01-01&to=2024-12-01 |
Historical prices |
| GET | /api/stock/search/?q=apple |
Search companies |
| GET | /api/stock/news/?ticker=AAPL&limit=5 |
Stock news |
| GET | /api/stock/financials/?ticker=AAPL |
Financial statements |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat |
AI chat assistant |
| GET | /api/summary/{symbol} |
AI stock summary |
| GET | /api/market-news |
AI-generated market news |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/watchlist |
Get all watchlists |
| POST | /api/watchlist/create |
Create watchlist |
| POST | /api/watchlist/add |
Add stock to watchlist |
| DELETE | /api/watchlist/remove/{ticker} |
Remove stock |
| DELETE | /api/watchlist/delete/{id} |
Delete watchlist |
- Go to Firebase Console
- Create a new project or select existing
- Enable Authentication β Sign-in method β Email/Password
- Go to Project Settings β General β Your apps β Web app
- Copy the config to
frontend/src/firebase.ts
Terminal 1 - Backend:
cd backend
source .venv/bin/activate
python manage.py runserverTerminal 2 - Frontend:
cd frontend
npm run devcd frontend
npm run buildThe build output will be in frontend/dist/.
Ensure django-cors-headers is configured in backend/backend/settings.py:
CORS_ALLOWED_ORIGINS = [
"http://localhost:5173",
"http://127.0.0.1:5173",
]- Verify Firebase config in
firebase.ts - Check API key restrictions in Google Cloud Console
- Add allowed referrers:
http://localhost:5173/*
- Free tier: 5 API calls/minute
- The app caches stock data for 1 hour to reduce API calls
- AI Market News uses Gemini instead of Polygon to save API calls
# Frontend
cd frontend
rm -rf node_modules
npm install
# Backend
cd backend
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt# Create feature branch
git checkout -b feat/your-feature
# Make changes and commit
git add .
git commit -m "feat: description of changes"
# Push and create PR
git push -u origin feat/your-featureSoftware Engineering Fall 2025
This project is for educational purposes.