The AI-powered companion that decodes LeetCode complexity in real-time.
- One-Click Analysis: Click the ★ star button on any LeetCode problem page for an instant AI-powered breakdown
- Plain-English Summaries: Understand what the problem is actually asking without decoding the description
- Data Structure Recommendations: Get the best algorithm/DS to use with a clear reason why
- Practice First: Suggests an easier foundational problem to solve before tackling the current one
- Summary History: View your past 20 analyzed problems, stored in MongoDB and synced via unique browser ID
- Smart Caching: Client-side (7-day) and server-side caching to minimize API calls and speed up responses
- Dark/Light Mode: Toggle between themes to match your LeetCode setup
- Customizable View: Hide or show the Data Structure and Practice First sections
- Copy to Clipboard: One-click copy on any summary
- Download the extension from the Chrome Web Store (coming soon)
- Navigate to any
leetcode.com/problems/...page - Click the ★ star button in the top-right corner
- Get your summary instantly
git clone https://github.com/zarifislam10/leetcode-ai-summarizer.git
cd leetcode-ai-summarizercd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in backend/:
OPENAI_API_KEY=sk-your-key-here
MONGODB_URI=mongodb+srv://<USERNAME>:<PASSWORD>@cluster.mongodb.net/leetstar
Run the server:
python app.pyThe server runs on http://localhost:5000.
- Open Chrome and go to
chrome://extensions - Enable Developer Mode (top right toggle)
- Click Load unpacked and select the root project folder
- Navigate to any LeetCode problem page
- Click the ★ star button
Note: For local development, update
BACKEND_URLincontent.jstohttp://localhost:5000/summarize.
leetcode-ai-summarizer/
├── .github/
│ └── workflows/
│ └── main_leetstar.yml # CI/CD pipeline
├── backend/
│ ├── app.py # Flask API (summarize, history, health)
│ ├── requirements.txt # Python dependencies
│ └── startup.txt # Azure startup command
├── content.js # Chrome extension logic
├── styles.css # UI styles (dark/light mode)
├── manifest.json # Chrome extension manifest (MV3)
└── README.md
| Method | Route | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /summarize |
Analyze a LeetCode problem via GPT-4o-mini |
| GET | /history?uid= |
Get last 20 summaries for a user |
| DELETE | /history?uid= |
Delete all history for a user |
| DELETE | /history?uid=&slug= |
Delete a single history entry |
The backend is deployed on Azure App Service with CI/CD via GitHub Actions.
- Every push to
maintriggers an automatic build and deploy - Azure's Oryx build engine installs Python dependencies on deployment
- Environment variables (
OPENAI_API_KEY,MONGODB_URI) are set in Azure App Settings
- API keys live only in environment variables, never in client code
- OpenAI API key is server-side only; the extension never sees it
- Problem text is capped at 3,000 characters before sending to OpenAI
- Each browser install gets a unique anonymous ID (no personal data collected)
- GPT-powered problem analysis
- Azure deployment with CI/CD
- MongoDB history with cross-device support
- Client-side caching (7-day expiry)
- Server-side caching (shared across users)
- Dark/Light mode
- Collapsible sections (Data Structure, Practice First)
- Chrome Web Store publication
- Rate limiting with Flask-Limiter
- Redis caching layer
- Datadog monitoring
- Docker containerization
- System design diagram
Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m "add your feature") - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
- Built with OpenAI GPT-4o-mini for problem analysis
- LeetCode API for practice problem slug verification
- Deployed on Microsoft Azure with MongoDB Atlas
v1.0 (March 2025): Client-side proof-of-concept focused on real-time extraction.
v2.0 (Current): Re-architected with a Flask backend, MongoDB persistence, Azure CI/CD deployment, and a polished dark/light UI.
Made with ★ for LeetCoders everywhere

