Build an AI-Powered Code Reviewer using the MERN Stack! π
This project leverages artificial intelligence to analyze, review, and suggest improvements for source code, thereby enhancing development efficiency and reducing manual review overhead.
-
π AI-Driven Code Analysis
Uses AI models to detect code issues and provide intelligent suggestions. -
π Multi-language Support
Review capabilities for multiple programming languages (planned/extendable). -
π‘ Real-Time Suggestions
Instant feedback during code input or upload. -
π Clean Frontend UI
Built with React and TailwindCSS for a modern user experience. -
π Modular Backend
RESTful API powered by Express and a scalable architecture (MVC pattern). -
π Pluggable AI Services
Easily integrate external LLM APIs like OpenAI, Gemini, or custom models.
AI_Powered_CodeReviewer/
βββ BackEnd/
β βββ src/
β β βββ controllers/
β β β βββ ai.controller.js # Handles incoming requests and responses
β β βββ routes/
β β β βββ ai.routes.js # Defines endpoints for code analysis
β β βββ services/
β β βββ ai.service.js # Core logic to process code with AI
β βββ app.js # Express app configuration
β βββ server.js # Entry point to start the server
β βββ package.json
β βββ package-lock.json
β
βββ FrontEnd/
β βββ public/ # Static assets
β βββ src/
β β βββ assets/ # Images, icons, and reusable styles
β β βββ App.jsx # Main React component
β β βββ main.jsx # ReactDOM render
β β βββ App.css # App-wide styles
β β βββ index.css # Global CSS
β βββ index.html
β βββ vite.config.js
β βββ eslint.config.js
β βββ package.json
β βββ package-lock.json
β βββ README.md
β
βββ README.md
Frontend
- React (Vite)
- TailwindCSS
- ESLint
Backend
- Node.js + Express
- Modular MVC pattern (controller, service, routes)
- OpenAI/Gemini API integration (planned/customizable)
cd BackEnd
npm install
node server.jscd FrontEnd
npm install
npm run devEnsure the backend is running at a specific base URL (http://localhost:5000 by default) which is consumed by the frontend React app.
- User pastes or uploads code in the UI.
- The frontend sends the code to the backend via POST /api/review.
- The backend controller invokes the AI service logic to analyze the code.
- Suggestions and feedback are returned and displayed in the UI.
| Endpoint | Method | Description |
|---|---|---|
/api/review |
POST | Analyze submitted code and return suggestions |
/api/health |
GET | Check if the backend server is running |
If you want to contribute to this project, please follow these steps:
Forkthe repository.- Create a new branch
(git checkout -b feature/your-feature-name). - Make your changes and commit them
(git commit -m 'Add some feature'). - Push to the branch
(git push origin feature/your-feature-name). - Open a pull request.
Github: Swedeshna Mishra