RefactorMate is a code refactoring tool that harnesses the capabilities of the GPT-3.5-turbo model from OpenAI to streamline and enhance your coding experience. Whether you're a seasoned developer looking to optimize your code or a beginner learning the ropes, RefactorMate is here to make your coding journey smoother and more efficient.
RefactorMate simplifies the code refactoring process. Just input your code, and let the GPT-3.5-turbo model analyze and suggest improvements. The intelligent suggestions provided by the model aim to enhance readability, improve performance, and adhere to best coding practices.
Our app seamlessly integrates with ChatGPT, providing an interactive and user-friendly interface. Communicate with ChatGPT to refine your refactoring preferences, ask questions about the suggested changes, or seek additional guidance on coding practices.
RefactorMate supports a wide range of programming languages. Whether you're coding in Python, JavaScript, Java, C++, or any other language, RefactorMate is designed to accommodate your needs.
RefactorMate is not just a tool; it's a learning companion. Gain insights into coding best practices, understand the rationale behind suggested changes, and enhance your coding skills with each refactoring session.
Before you begin, ensure you have the following software installed on your machine:
- Node.js - Make sure to install a version that is compatible with the project.
- Git - Version control system.
- pnpm - Fast, disk efficient Node.js package manager.
npm install -g pnpm
After installation, verify the pnpm
version to ensure it was installed correctly:
pnpm --version
- @types/node: ^20.14.2
- Description: TypeScript definitions for Node.js.
- cors: ^2.8.5
- Description: Middleware to enable CORS (Cross-Origin Resource Sharing) in your Express app.
- dotenv: ^16.4.5
- Description: Loads environment variables from a .env file into process.env.
- express: ^4.19.2
- Description: Fast, unopinionated, minimalist web framework for Node.js.
- openai: ^4.49.0
- Description: OpenAI API client for interacting with the GPT model.
- react: ^18.3.1
- Description: A JavaScript library for building user interfaces.
- react-dom: ^18.3.1
- Description: React package for working with the DOM.
- react-syntax-highlighter: ^15.5.0
- Description: Syntax highlighting component for React using
react-syntax-highlighter
.
- Description: Syntax highlighting component for React using
- ts-node: ^10.9.2
- Description: TypeScript execution environment and REPL for Node.js.
- @types/cors: ^2.8.17
- Description: TypeScript definitions for the
cors
package.
- Description: TypeScript definitions for the
- @types/express: ^4.17.21
- Description: TypeScript definitions for the
express
package.
- Description: TypeScript definitions for the
- @types/react: ^18.3.3
- Description: TypeScript definitions for React.
- @types/react-dom: ^18.3.0
- Description: TypeScript definitions for React DOM.
- @types/react-syntax-highlighter: ^15.5.13
- Description: TypeScript definitions for
react-syntax-highlighter
.
- Description: TypeScript definitions for
- @typescript-eslint/eslint-plugin: ^7.12.0
- Description: ESLint plugin for TypeScript.
- @typescript-eslint/parser: ^7.12.0
- Description: ESLint parser for TypeScript.
- @vitejs/plugin-react: ^4.3.0
- Description: Vite plugin for React.
- autoprefixer: ^10.4.19
- Description: PostCSS plugin to parse CSS and add vendor prefixes automatically.
- eslint: ^9.4.0
- Description: A pluggable and configurable linter tool for identifying and fixing problems in JavaScript code.
- eslint-plugin-react-hooks: ^4.6.2
- Description: ESLint plugin for React hooks.
- eslint-plugin-react-refresh: ^0.4.7
- Description: ESLint plugin for React Refresh.
- postcss: ^8.4.38
- Description: A tool for transforming styles with JavaScript plugins.
- tailwindcss: ^3.4.4
- Description: A utility-first CSS framework.
- typescript: ^5.4.5
- Description: A superset of JavaScript that compiles to clean JavaScript output.
- vite: ^5.2.13
- Description: A blazing-fast build tool that scales to large projects.
Follow these steps to get your project up and running locally:
Open your terminal and clone the project repository:
git clone https://github.com/harmeetsingh11/RefactorMate.git
Move to the Project directory:
cd .\RefactorMate\
Install the dependencies using pnpm
:
pnpm install
Get API Key here
Configure API key in .env
file
VITE_OPENAI_API_KEY = <YOUR_OPENAI_API_KEY>
Start the frontend application:
pnpm run frontend
The client will be accessible at http://localhost:5173 by default.
Start the backend:
pnpm run backend
The server will be running at PORT:8000
demo.mp4
⚠️ Before contributing to this project, be sure to read and adhere to the Contributing Guidelines.
Thank you for considering contributing to RefactorMate. We welcome and appreciate contributions from the community!
If you find a bug, have a feature request, or would like to contribute in any way, feel free to open an issue or submit a pull request. Whether you're fixing a typo or adding a new feature, your efforts are valued, and together we can make this project even better. Thank you for considering contributing to RefactorMate!