AI Code Analyzer
Overview
The AI Code Analyzer is a sophisticated tool designed to assist developers in analyzing code for performance efficiency and security vulnerabilities. By leveraging advanced AI models, the tool provides insights on time and space complexity, as well as identifying potential security risks in the provided code.
Features
- AI-Powered Code Explanation: AI simplifies complex code into easy terms.
- Unit Test Suggestions: Automatically generate comprehensive unit tests to validate your code.
- Complexity Analysis: Analyze the time and space complexity of your code to identify areas for optimization.
- Performance Optimization: Identify and fix performance bottlenecks.
- Code Documentation Generation: Auto-generate comments and documentation.
- Security Vulnerability Detection: Detect potential security risks.
- Syntax Checking and Error Detection: Spot and fix syntax errors.
- Code Quality and Best Practices: Improve code quality with best practices.
- Markdown Support: Output formatted responses using Markdown for improved readability.
- File Upload: Support for uploading code files for analysis.
- Responsive Design: A modern and responsive layout ensuring usability across various devices.
Technologies Used
- Frontend: React, Vite, Shadcn, Tailwind CSS
- AI Integration: Gemini API from Google Generative AI
- State Management: React Hooks
Installation
To run the project locally, follow these steps:
Clone the repository:
git clone https://github.com/altamsh04/ai-code-analyzer.git
cd ai-code-analyzer
Create .env in project folder and add your google gemini api key:
VITE_GOOGLE_API_KEY = ADD_YOUR_API_KEY_HERE
Install dependencies:
npm install
Start the development server:
npm run dev
Open your browser and navigate to http://localhost:5173
or running port.
Usage
- Input your code into the provided textarea.
- Select the feature you wish to analyze eg. (Complexity Analysis or Security Vulnerability Detection).
- Click the "Send Code" button to receive results.
- Review the output for insights and recommendations.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements