Skip to content

Commit 9cf839e

Browse files
authored
Merge pull request #66 from j-harishankar/main
added beginner django extension project for leetcode
2 parents c2e0842 + a8604bd commit 9cf839e

File tree

26 files changed

+934
-0
lines changed

26 files changed

+934
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyc
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# LeetCode Helper Chrome Extension
2+
3+
LeetCode Helper is a Chrome Extension designed to supercharge your LeetCode problem-solving experience with instant, AI-powered guidance. It seamlessly detects the current LeetCode problem, sends the details to a powerful backend, and returns step-by-step solutions—all without leaving your browser.
4+
5+
---
6+
7+
## 🧩 Features
8+
9+
- **Auto-Detects LeetCode Problems:** Instantly grabs the title and URL of the LeetCode problem you're viewing.
10+
- **AI-Powered Guidance:** Sends problem details to a deployed Django REST API, which uses an LLM (Gemini or OpenAI) to generate step-by-step solutions.
11+
- **Clean UI:** Displays AI responses in Markdown, rendered beautifully in the extension popup using [marked.min.js](https://marked.js.org/).
12+
- **No Local Setup Needed:** Backend is fully managed and deployed on [Render.com](https://render.com).
13+
14+
---
15+
16+
## 🚀 Project Overview
17+
18+
LeetCode Helper streamlines your LeetCode workflow. With a single click, you get expert-level guidance directly from a large language model, tailored to the problem you're working on. No more context switching or copy-pasting—just solutions when you need them.
19+
20+
---
21+
22+
## 🛠️ How to Load as an Unpacked Extension
23+
24+
1. Download or clone this repository.
25+
2. Open Google Chrome and go to `chrome://extensions/`.
26+
3. Enable **Developer mode** (top right).
27+
4. Click **Load unpacked** and select the `extension` folder inside the project.
28+
5. The LeetCode Helper icon should appear in your extensions bar.
29+
30+
---
31+
32+
## ⚡ How to Use the Extension
33+
34+
1. Navigate to any [LeetCode](https://leetcode.com/) problem page.
35+
2. Click the **LeetCode Helper** extension icon.
36+
3. The extension will auto-fill the problem title and URL.
37+
4. Click **Get Guidance**.
38+
5. See step-by-step AI-generated guidance appear instantly in the popup!
39+
40+
> **Note:** No need to run any local servers—everything works out of the box.
41+
42+
---
43+
44+
## 🏗️ Architecture Overview
45+
46+
```
47+
+---------------------+ +------------------------------+ +-----------------------------+
48+
| Chrome Extension | <------> | Django REST API (Render.com)| <-------> | Large Language Model (LLM) |
49+
| (popup.html/js) | | Endpoint: /api/solve/ | | (Gemini, OpenAI, etc.) |
50+
+---------------------+ +------------------------------+ +-----------------------------+
51+
| |
52+
|------------------- User initiates a request -------------------------------------|
53+
```
54+
55+
- **Frontend:** Presents popup UI, grabs problem info, and renders Markdown via marked.js.
56+
- **Backend:**
57+
The backend is built with Django and Django REST Framework, deployed on [Render.com](https://render.com) for seamless scalability and reliability. It exposes a single endpoint at `/api/solve/` and handles communication with the LLM.
58+
- **LLM:** Generates step-by-step guidance tailored to the problem context.
59+
60+
---
61+
62+
### Key Backend Features
63+
64+
- **Integration with LLMs:** Utilizes APIs from LLM providers (e.g., Gemini, OpenAI) to generate detailed solutions and explanations.
65+
- **Markdown Output:** Formats responses in Markdown for easy rendering on the frontend.
66+
- **Error Handling:** Returns user-friendly error messages and backend status codes if the AI cannot generate guidance.
67+
- **Scalability:** Hosted on Render.com for auto-scaling and high availability.
68+
- **Security:** Basic request validation and sanitization are performed to ensure safe API usage.
69+
- **Production Ready:** Includes Procfile and render.yaml for cloud deployment, and `.gitignore` for environment management.
70+
- **Extensible:** Modular structure for easy addition of endpoints or support for other coding platforms.
71+
72+
> The backend is fully managed—no user setup required. All requests are handled securely and efficiently in the cloud.
73+
74+
---
75+
## 📂 Folder Structure
76+
77+
```
78+
Leetcode-Helper/
79+
├── extension/ # Chrome Extension source code
80+
│ ├── icon.png
81+
│ ├── manifest.json
82+
│ ├── marked.min.js
83+
│ ├── popup.css
84+
│ ├── popup.html
85+
│ └── popup.js
86+
├── leetcode backend/
87+
│ ├── api/
88+
│ ├── backend/
89+
│ ├── .gitignore
90+
│ ├── Procfile
91+
│ ├── db.sqlite3
92+
│ ├── manage.py
93+
│ ├── render.yaml
94+
│ └── requirements.txt
95+
├── screenshots/
96+
```
97+
98+
---
99+
100+
## 🚧 Future Improvements & Contribution Guidelines
101+
102+
### Future Plans
103+
- Support for more coding platforms (HackerRank, Codeforces, etc.)
104+
- Chrome Web Store publication
105+
- Enhanced error handling and retry logic
106+
- User authentication and saved guidance history
107+
108+
### Contributing
109+
Contributions are welcome! Please open an issue or submit a pull request with a clear description of your changes.
110+
111+
---
112+
113+
## 👥 Contributors
114+
115+
- [jydv402 (Jayadev B S)](https://github.com/jydv402)
116+
- [SHIBINSHA02 (Shibinsha)](https://github.com/SHIBINSHA02)
117+
118+
---
3.21 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"manifest_version": 3,
3+
"name": "LeetCode Helper",
4+
"version": "1.0",
5+
"description": "Get AI-powered help while solving LeetCode problems",
6+
"permissions": ["activeTab", "scripting", "tabs"],
7+
"host_permissions": ["https://leetcode.com/*"],
8+
"action": {
9+
"default_popup": "popup.html",
10+
"default_icon": {
11+
"128": "icon.png"
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)