Code Commenter is a web application that helps developers add comments to their code using an LLM (Language Learning Model) API. It features a code editor powered by Monaco Editor and leverages a Google API to generate comments for the code.
- Monaco Editor Integration: Provides a rich code editing experience.
- Dynamic Code Commenting: Uses a LLM API to add comments to your code.
- Responsive Design: Works well on both desktop and mobile devices.
https://code-commenter.vercel.app/
-
Clone the repository:
git clone https://github.com/praveen-p09/code-commenter.git cd code-commenter
-
Install the dependencies:
npm install
-
Create a
.env.local
file in the root directory and add your Google API key:NEXT_PUBLIC_API_KEY=your_google_api_key_here
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
- Enter your code in the Monaco Editor.
- Click on the "Generate Comments" button.
- Wait for the API to process your code and add comments.
- View the commented code in the editor.
src/app
: Contains the main application components and pages.src/app/components
: Contains reusable React components like the Navbar.public
: Contains static files like images and logos.tailwind.config.js
: Tailwind CSS configuration file.next.config.js
: Next.js configuration file.
- Next.js: React framework for server-side rendering.
- React: JavaScript library for building user interfaces.
- Monaco Editor: Code editor component.
- Tailwind CSS: Utility-first CSS framework.
- Axios: Promise-based HTTP client for making API requests.
- dotenv: Module for loading environment variables.
- Google API for
gemini-1.5-flash-latest
LLM
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.