AI code review application
This is the backend service for the AI Code Review application. It provides an API to analyze and review code using Google's Generative AI.
Backend/ .env .gitignore package.json server.js temp.js temp.md src/ app.js controllers/ ai.controller.js routes/ ai.route.js services/ ai.service.js
-
Clone the repository:
git clone <repository-url> cd Backend
-
Install dependencies:
npm install
-
Create a
.envfile in theBackenddirectory and add your Google Gemini API key:GOOGLE_GEMINI_KEY=your_google_gemini_key
-
Start the server:
npm start
-
The server will start on port 3000. You can access it at
http://localhost:3000.
-
POST /ai/get-review: Analyze and review the provided code.Request Body:
{ "code": "your_code_here" }Response:
{ "review": "code_review_feedback" }
@google/generative-ai: ^0.24.0dotenv: ^16.4.7- express: ^4.21.2
This is the frontend service for the AI Code Review application. It provides a user interface to input code and view the review results.
Frontend/
.gitignore
eslint.config.js
index.html
package.json
README.md
vite.config.js
public/
vite.svg
src/
App.css
App.jsx
index.css
main.jsx
assets/
react.svg
-
Navigate to the Frontend directory:
cd Frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
The development server will start, and you can access the application at
http://localhost:5173.
- Code Editor: Allows users to input code for review.
- Code Review Results: Displays feedback and suggestions for the provided code.
- axios: ^1.8.4
prismjs: ^1.30.0- react: ^19.0.0
- react-dom: ^19.0.0
- react-markdown: ^10.1.0
- react-simple-code-editor: ^0.14.1