Check out the live demo here
AI Code Converter is a MERN (MongoDB, Express.js, React.js, Node.js) stack web application that simplifies the translation of code snippets from one programming language to another. By integrating with the ChatGPT API, this tool provides developers with an effortless way to convert code snippets without manual intervention.
- Frontend**:** React.js
- Styling: Tailwindcss
- State Management**:** Zustand
- Backend**:** Node.js, Express.js
- Database**:** MongoDB
- API**:** ChatGPT API
- 💪🏻 A Solid & robust authentication system: Using the JWT Tokens.
- 🧑🏻💻 Language Agnostic: Supports translation between a wide range of programming languages..
- ✨ User-Friendly Interface: Intuitive web interface for easy code input and output.
- 🌓 Multi Theme: It provides Dark and Light theme.
- 🤖 ChatGPT Integration: Utilizes the ChatGPT API for accurate and context-aware code translations.
- 🤩 History Tracking: Keeps a record of past translations for reference.
Follow these steps to set up AI Code Converter on your local machine.
- Node.js and npm installed
-
Clone the repository:
git clone https://github.com/Louai-Zokerburg/AI-Code-Converter.git
-
Navigate to the project directory:
cd AI-Code-Converter
-
Install server dependencies:
npm install
-
Navigate to the client directory and install client dependencies:
cd client npm install
-
Create a
.env
file in the root directory and add the following:MONGO_URI= JWT_SECRET= JWT_LIFETIME= OPENAI_API_KE=
Replace
your_chatgpt_api_key
with your actual ChatGPT API key. -
Run the server:
npm start
-
Navigate the client and start the dev server
cd client npm run dev
-
Access the application in your browser at
http://localhost:5173
.
- Signup or login to the app
- Select the source programming language.
- Input your code snippet in the designated code editor
- Choose the target programming language.
- Click the "Convert" button to initiate the translation.
- View the translated code on the results page.
- Access your translation history on the sidebar, allowing you to revisit previous translations.