Skip to content

🧩 SolveSync is a Chrome extension that automates uploading your accepted LeetCode solutions to a GitHub repository using secure OAuth authentication.

License

Notifications You must be signed in to change notification settings

art2url/solve-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

91 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SolveSync Chrome Extension

SolveSync is a Chrome extension that automates uploading your accepted LeetCode solutions directly to your GitHub repository. It uses secure OAuth authorization to handle your credentials and commits your solutions in a structured format.

Features

  • Automatic Uploads: Seamlessly upload accepted LeetCode solutions to your GitHub.
  • Organized Repository: Solutions are categorized by difficulty (Easy, Medium, Hard) and stored in folders named after the problem title.
  • Secure Authorization: OAuth 2.0 ensures your GitHub credentials are handled securely.

Technologies Used

  • Frontend: JavaScript, Chrome Extensions API
  • Backend: Node.js, Express, Axios, CORS
  • Authentication: GitHub OAuth 2.0

Installation

  1. Clone the Repository:

    git clone https://github.com/art2url/solve-sync.git
  2. Load Extension in Chrome:

    • Go to chrome://extensions/.
    • Enable Developer Mode (top right corner).
    • Click Load unpacked and select the cloned solve-sync directory.
  3. Set Up GitHub OAuth App:

    • Go to GitHub Developer Settings.
    • Click on New OAuth App.
    • Application Name: SolveSync
    • Homepage URL: https://github.com/your-username
    • Authorization Callback URL: https://<your-extension-id>.chromiumapp.org
    • After creation, copy the Client ID and Client Secret.
  4. Configure the Backend Server:

    • Clone the backend repository:
      git clone https://github.com/art2url/solve-sync-oauth-server.git
      cd solve-sync-oauth-server
    • Create a .env file in the root directory with the following content:
      GITHUB_CLIENT_ID=your-client-id
      GITHUB_CLIENT_SECRET=your-client-secret
    • Deploy the backend to a free server like Render:
      • Create a new Web Service on Render.
      • Connect your GitHub repository and deploy.
      • Ensure the backend URL is updated in the extension's manifest.json under host_permissions.
  5. Configure Extension Settings:

    • Open the SolveSync extension popup.
    • Login with GitHub using the OAuth flow.
    • Enter your Repository and Branch where solutions will be uploaded.

Usage

  1. Go to any LeetCode problem.
  2. Solve and submit the problem.
  3. Once your solution is Accepted, it will be automatically uploaded to your GitHub repository in the specified structure.

Repository Structure

β”œβ”€β”€ easy
β”‚   └── 2703-return-length-of-arguments-passed
β”‚       β”œβ”€β”€ 2703-return-length-of-arguments-passed.js
β”‚       └── readme.md
β”œβ”€β”€ medium
β”‚   └── example-medium-problem
β”‚       β”œβ”€β”€ example-medium-problem.py
β”‚       └── readme.md
└── hard
    └── example-hard-problem
        β”œβ”€β”€ example-hard-problem.java
        └── readme.md

License

This project is licensed under the MIT License.


Enjoy solving problems and keeping your GitHub repository updated effortlessly! πŸš€