Skip to content

LeetCode Assistant Chrome extension uses FastAPI & Gemini AI for personalized coding problem suggestions in Python, C++, Java. Integrates LeetCode scraping, supports Python 3.8+. Install via repo clone, virtual env, Chrome Developer mode. APIs: /assist, /log_progress. Contributions welcome.

License

Notifications You must be signed in to change notification settings

somanath167/Leetcode_Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Assistant Chrome Extension

Overview

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.

Features

  • 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.

Prerequisites

  • Python 3.8+
  • Google Gemini API key
  • Node.js and npm
  • Google Chrome browser

Installation

Backend Setup

  1. Clone the repository:
    git clone https://github.com/somanath167/Leetcode_Assistant.git
    cd Leetcode_Assistant
  2. Create and activate a virtual environment:
    python -m venv venv
    .\venv\Scripts\activate  # Windows
    source venv/bin/activate  # macOS/Linux
  3. Install dependencies:
    pip install -r backend/requirements.txt
    Ensure backend/requirements.txt includes:
    fastapi
    uvicorn
    requests
    beautifulsoup4
    google-generativeai
    
  4. Set your Gemini API key in backend/main.py:
    GOOGLE_API_KEY = "your-api-key-here"
  5. Run the backend server:
    cd backend
    uvicorn main:app --reload

Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend/codesmart-extension
  2. Install dependencies:
    npm install
  3. Build the extension:
    npm run build
  4. 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.

Usage

  1. Open the LeetCode Assistant extension popup in Chrome.
  2. Select a coding problem and preferred language (Python, C++, or Java).
  3. Click "Get Suggestion" for personalized advice.
  4. Use API endpoints (/assist, /log_progress) for programmatic access.

API Endpoints

  • GET /assist: Retrieve personalized problem suggestions and solutions.
  • POST /log_progress: Log user progress for tailored recommendations.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository: https://github.com/somanath167/Leetcode_Assistant.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m "Add your feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Submit a pull request.

Notes

  • 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.

License

This project is licensed under the MIT License. See the LICENSE file for details.


© 2025 GitHub, Inc.

About

LeetCode Assistant Chrome extension uses FastAPI & Gemini AI for personalized coding problem suggestions in Python, C++, Java. Integrates LeetCode scraping, supports Python 3.8+. Install via repo clone, virtual env, Chrome Developer mode. APIs: /assist, /log_progress. Contributions welcome.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published