A full-stack web application that predicts LeetCode contest rating changes and compares them with actual contest results after the contest ends.
Built using FastAPI for the backend and React + Vite for the frontend, with Firebase integration for user grouping.
-
Fetches the predictions of rating changes for LeetCode Weekly & Biweekly contests from lccn.lbao.site
-
Fetches actual contest performance using LeetCode GraphQL
-
Supports multiple users via:
- Channel ID (Firebase)
- Manual username input
-
Displays results in a retro terminal-style UI
-
Uses LRU caching for fast repeated queries
-
Supports fallback backend URLs for reliability
Frontend (React + Vite)
|
| REST API
↓
Backend (FastAPI)
|
├── LeetCode GraphQL
├── Firebase (channels → users)
└── LRU Cache
.
├── fast-api-backend/ # FastAPI backend
│ ├── main.py
│ ├── routers/
│ ├── helpers/
│ ├── middleware/
│ ├── models/
│ └── README.md # Backend documentation (detailed)
│
└── frontend-vite/ # React + Vite frontend
├── src/
├── index.html
├── vite.config.js
└── README.md
cd fast-api-backend
uv sync
python start.pyBackend runs at:
http://localhost:7667
Docs:
- Swagger → http://localhost:7667/docs
- ReDoc → http://localhost:7667/redoc
📘 Detailed backend setup:
➡️ fast-api-backend/README.md
cd frontend-vite
npm install
npm run devFrontend runs at:
http://localhost:5173
PORT=7667
FIREBASE_CREDENTIALS_PATH=db_config/your-firebase.json
ALLOWED_ORIGINS=http://localhost:5173VITE_API_BASE_URL=http://localhost:7667
VITE_API_BASE_URL_1=https://localhost:7768| Endpoint | Method | Purpose |
|---|---|---|
/health |
GET | Health check |
/lc |
GET | Rating predictions from lccn.lbao.site |
/obtained |
GET | Actual contest results from LeetCode GraphQL |
/cache/clear |
POST | Clear backend cache |
(See backend README for full request/response formats)
-
Retro CRT terminal UI
-
Light / Dark theme toggle
-
Parallel fetching of:
- Predictions
- Actual ratings
-
Graceful fallback to secondary backend
-
Responsive layout (mobile friendly)
- Redis instead of in-memory cache
- Discord bot integration
- Admin dashboard
Sai Deekshith Konda and Yashwanth Reddy LeetCode • Backend • Full-Stack Development