LeetCode Assistant is a Chrome extension that enhances coding practice by providing personalized problem suggestions and solutions using FastAPI and Gemini AI. It supports Python, C++, and Java, integrating LeetCode problem scraping for a tailored learning experience.
- Personalized coding problem recommendations.
- Solution suggestions powered by Gemini AI.
- Supports Python, C++, Java.
- API endpoints:
/assist
,/log_progress
. - LeetCode problem scraping for enriched content.
- Python 3.8+
- Google Gemini API key
- Node.js and npm
- Google Chrome browser
- Clone the repository:
git clone https://github.com/somanath167/Leetcode_Assistant.git cd Leetcode_Assistant
- Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\activate # Windows source venv/bin/activate # macOS/Linux
- Install dependencies:
Ensure
pip install -r backend/requirements.txt
backend/requirements.txt
includes:fastapi uvicorn requests beautifulsoup4 google-generativeai
- Set your Gemini API key in
backend/main.py
:GOOGLE_API_KEY = "your-api-key-here"
- Run the backend server:
cd backend uvicorn main:app --reload
- Navigate to the frontend directory:
cd frontend/codesmart-extension
- Install dependencies:
npm install
- Build the extension:
npm run build
- Load the extension in Chrome:
- Open
chrome://extensions/
. - Enable "Developer mode" (top-right toggle).
- Click "Load unpacked" and select the
frontend/codesmart-extension/build
folder.
- Open
- Open the LeetCode Assistant extension popup in Chrome.
- Select a coding problem and preferred language (Python, C++, or Java).
- Click "Get Suggestion" for personalized advice.
- Use API endpoints (
/assist
,/log_progress
) for programmatic access.
GET /assist
: Retrieve personalized problem suggestions and solutions.POST /log_progress
: Log user progress for tailored recommendations.
Contributions are welcome! To contribute:
- Fork the repository:
https://github.com/somanath167/Leetcode_Assistant
. - Create a new 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
). - Submit a pull request.
- Ensure your Gemini API key is securely stored and not committed to version control.
- For issues or feature requests, open a GitHub issue at
https://github.com/somanath167/Leetcode_Assistant
. - No releases or packages are currently published.
This project is licensed under the MIT License. See the LICENSE file for details.
© 2025 GitHub, Inc.