AI-Powered GitHub Repository Bug Scanner & Fixer
Secure your code in seconds with Gemini 3.
CodeGuard AI is a next-generation static analysis tool that bridges the gap between traditional linters and human code review. By leveraging Google's Gemini 3 Flash for high-speed processing and Gemini 3 Pro for deep reasoning, CodeGuard scans live public GitHub repositories to identify security vulnerabilities, logic bugs, and code smells in real-time.
Unlike standard tools that simply flag errors based on rigid rules, CodeGuard AI explains the root cause, suggests context-aware fixes, and can even automatically draft professional Pull Request descriptions.
This project uses a cutting-edge stack designed for performance, modularity, and AI integration.
| Category | Technology | Reasoning |
|---|---|---|
| Frontend | React 19 + TypeScript | Utilizes the latest React features for a responsive, type-safe UI. |
| AI Engine | Google GenAI SDK | Direct integration with Gemini 3 Flash (Code Analysis) and Gemini 3 Pro (Chat/PR Generation). |
| Data Source | GitHub Public API | Fetches real-time file content from public repositories for analysis. |
| Styling | Tailwind CSS | Utility-first CSS for rapid UI development and a modern, dark-mode aesthetic. |
| Icons | Lucide React | Clean, lightweight, and consistent iconography. |
| Markdown | React Markdown | Renders rich text descriptions and code blocks from AI responses. |
To make the application work on Netlify, you must configure the API Key in the environment variables using the VITE_ prefix.
- Variable Name:
VITE_API_KEY - Value: Your Google GenAI API Key.
Steps:
- Go to Site settings > Build & deploy > Environment.
- Click Add variable.
- Key:
VITE_API_KEY - Value:
AIzaSy...(your actual key). - Re-deploy your site.
Security Note: Since this is a client-side application, the API key will be embedded in the browser build. For production environments handling sensitive data, it is recommended to proxy these requests through a backend server.
-
Clone the repository
git clone https://github.com/dinitheth/CodeGuard-AI
-
Install dependencies
npm install
-
Configure API Key Create a
.envfile and add your Google Gemini API key:VITE_API_KEY=your_google_genai_api_key
(Note: The app requires a valid API key to perform scans.)
-
Run the application
npm run dev
Built with love using Google Gemini 3 API.