A tool that scans your GitHub repository for best practices, performance enhancements, and security optimizations. By leveraging OpenAI's capabilities, it provides detailed suggestions and insights to improve your codebase.
The AI Code Review Bot consists of a frontend and backend that work together to analyze GitHub repositories. Here's an overview of the architecture and technologies used in the project:
-
Frontend:
- ReactJS: For building a responsive user interface.
- Vite: For fast and efficient frontend build tooling.
- shadcn-ui: Component library integrated with Tailwind CSS for styling.
- React Router: For client-side routing.
- Axios: For making HTTP requests to the backend.
- State Management: Context API and custom hooks.
-
Backend:
- Express: To implement REST API endpoints.
- Mongoose: ODM for MongoDB.
- OAuth2: For secure API credential handling.
- NodeJS: Backend code execution environment.
- OpenAI: For analyzing code and generating improvement suggestions.
- GitHub API: Access repositories and get metadata.
|-- client/
| |-- src/
| | |-- api/
| | |-- components/
| | |-- contexts/
| | |-- hooks/
| | |-- pages/
| |
| |-- package.json
| |-- vite.config.ts
|
|-- server/
| |-- config/
| |-- models/
| |-- routes/
| |-- services/
| |-- utils/
| |
| |-- package.json
| |-- server.js
|
|-- package.json
- User Authentication: Allows users to securely register and log in using email and password.
- Repository Analysis:
- Best Practices Analysis: Get recommendations for code organization and maintainability.
- Performance Insights: Identify bottlenecks and optimization opportunities.
- Security Scanning: Detect potential vulnerabilities and security issues.
- Settings: Users can save and retrieve their GitHub and OpenAI API keys securely.
- Progress Tracking: Progress bar for the ongoing analysis and status updates.
- Results Display: Final analysis results are shown in a detailed and structured format.
To run this project, you will need:
- Node.js: Version 12 or higher
- npm: Version 6 or higher
- MongoDB: A running MongoDB server
- Git: For repository cloning
-
Clone the repository:
git clone https://github.com/yourusername/ai-code-review-bot.git cd ai-code-review-bot
-
Setup the Backend:
- Navigate to the
server
directory and create an.env
file with the following content:DATABASE_URL=mongodb://localhost:27017/aicodebot OPENAI_API_KEY=your_openai_api_key SESSION_SECRET=your_session_secret
- Install dependencies and start the server:
cd server npm install npm start
- Navigate to the
-
Setup the Frontend:
- Navigate to the
client
directory and install dependencies:cd ../client npm install npm start
- The frontend will be running at
http://localhost:5173
- Navigate to the
-
Access the Application:
- Open your browser and navigate to
http://localhost:5173
- Register and log in to start analyzing GitHub repositories
- Open your browser and navigate to
The project is open source, licensed under the MIT License. See the LICENSE.
Copyright © 2025 Pythagora-io.