https://github.com/rafiqdevhub/code_review_app
AI Code Review agent.
https://github.com/rafiqdevhub/code_review_app
react tailwindcss typescript
Last synced: 12 months ago
JSON representation
AI Code Review agent.
- Host: GitHub
- URL: https://github.com/rafiqdevhub/code_review_app
- Owner: Rafiqdevhub
- Created: 2025-06-28T09:56:55.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-01T16:10:16.000Z (12 months ago)
- Last Synced: 2025-07-01T17:23:15.082Z (12 months ago)
- Topics: react, tailwindcss, typescript
- Language: TypeScript
- Homepage: https://codify-omega.vercel.app
- Size: 213 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Code Review Agent ๐ค
An intelligent code analysis platform powered by AI that helps developers write better, safer, and more maintainable code through instant reviews, security analysis, and intelligent suggestions.
   
## โจ Features
### ๐ **Smart Code Analysis**
- **Multi-language support**: JavaScript, TypeScript, Python, Java, C#, C++, Go, Rust, PHP, Ruby
- **Static code analysis** with complexity metrics and performance insights
- **Real-time feedback** with quality scores and maintainability ratings
- **Code statistics** including lines, functions, classes, and dependencies
### ๐ก๏ธ **Security Scanning**
- **Vulnerability detection** with OWASP compliance checks
- **Dependency scanning** for known security issues
- **Security scoring** with detailed remediation suggestions
- **Risk assessment** with priority-based issue classification
### ๐ง **AI Chat Assistant**
- **Interactive conversations** about code quality and best practices
- **Contextual explanations** for detected issues and suggestions
- **Multi-threaded discussions** with conversation history
- **Instant help** for programming questions and code improvements
### ๐ **Comprehensive Reports**
- **Quality metrics** including readability, maintainability, and complexity
- **Issue categorization** by severity (Critical, High, Medium, Low)
- **Performance insights** with optimization recommendations
- **Visual dashboards** with progress tracking and trend analysis
### ๐ **Modern User Experience**
- **Drag & drop file upload** with support for multiple files
- **Code editor** with syntax highlighting and line numbers
- **Responsive design** optimized for desktop and mobile
- **Real-time status indicators** and loading states
## ๐ ๏ธ Tech Stack
- **Frontend**: React 18, TypeScript, Vite
- **UI Components**: Radix UI, Tailwind CSS, Lucide Icons
- **State Management**: React Query (TanStack Query)
- **Routing**: React Router DOM
- **Build Tool**: Vite with hot module replacement
- **Code Quality**: ESLint, Prettier
- **Backend Integration**: RESTful API with Node.js/LangChain
## ๐ Usage Guide
### 1. **Code Review Analysis**
**Upload Files**:
- Navigate to the Code Review page
- Drag and drop your code files or click to browse
- Supported formats: `.js`, `.ts`, `.py`, `.java`, `.cs`, `.cpp`, `.go`, `.rs`, `.php`, `.rb`
**Manual Code Entry**:
- Switch to the Code Editor tab
- Select your programming language
- Paste or type your code directly
- Set a filename for better analysis context
**Run Analysis**:
- Click "Run Analysis" to start the AI review process
- View results in categorized tabs: Issues, Metrics, Security
- Get detailed explanations and improvement suggestions
### 2. **AI Chat Assistant**
**Start a Conversation**:
- Go to the AI Chat page
- Click "New Conversation" to create a thread
- Ask questions about code quality, security, or best practices
**Interactive Features**:
- **Multi-turn conversations** with context retention
- **Code-specific questions** with syntax highlighting
- **Copy responses** for documentation
- **Thread management** with conversation history
### 3. **Understanding Reports**
**Quality Metrics**:
- **Readability**: Code clarity and naming conventions
- **Maintainability**: Ease of modification and extension
- **Complexity**: Cyclomatic complexity and nesting levels
- **Performance**: Optimization opportunities and bottlenecks
**Security Analysis**:
- **Vulnerability Score**: Overall security rating (0-100)
- **Risk Categories**: Authentication, injection, XSS, etc.
- **Priority Levels**: Critical issues requiring immediate attention
- **Remediation Steps**: Actionable fix suggestions
## ๐๏ธ Architecture
### Frontend Structure
```
src/
โโโ components/ # Reusable UI components
โ โโโ ui/ # Shadcn/ui components
โ โโโ CodeEditor.tsx # Code input and display
โ โโโ FileUpload.tsx # File handling component
โ โโโ ResultsDisplay.tsx # Analysis results
โโโ pages/ # Main application pages
โ โโโ Home.tsx # Landing page with features
โ โโโ CodeReview.tsx # Code analysis interface
โ โโโ AiChat.tsx # Chat assistant interface
โโโ services/ # API integration layer
โ โโโ api.ts # Backend communication
โโโ hooks/ # Custom React hooks
โโโ lib/ # Utility functions
โโโ App.tsx # Main application component
```
### API Integration
The frontend communicates with a Node.js/LangChain backend through RESTful endpoints:
- **`POST /api/analyze`** - Submit code for analysis
- **`POST /api/chat`** - Send messages to AI assistant
- **`GET /api/health`** - Check backend status
- **`POST /api/upload`** - Upload files for analysis
## ๐งช Development
### Available Scripts
```bash
# Development server with hot reload
npm run dev
# Production build
npm run build
# Development build (with source maps)
npm run build:dev
# Lint code
npm run lint
# Preview production build
npm run preview
```
### Code Quality
The project includes comprehensive linting and formatting:
- **ESLint**: Code quality and consistency
- **TypeScript**: Type safety and better developer experience
- **Prettier**: Automated code formatting
- **Husky**: Pre-commit hooks (if configured)
### Environment Variables
```env
# Backend API URL
VITE_API_URL=http://localhost:5000
# Enable debug logging
VITE_API_DEBUG=true
# API request timeout (ms)
VITE_API_TIMEOUT=30000
```
## ๐ง Configuration
### Tailwind CSS
Custom theme configuration in `tailwind.config.ts` with:
- Custom color palette
- Extended component variants
- Responsive breakpoints
- Animation utilities
### Vite Configuration
Optimized build settings in `vite.config.ts`:
- Path aliases (`@/` for `src/`)
- Development server proxy
- Build optimizations
- Environment variable handling
## ๐ค Contributing
1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
3. **Commit changes**: `git commit -m 'Add amazing feature'`
4. **Push to branch**: `git push origin feature/amazing-feature`
5. **Open a Pull Request**
### Development Standards
- Follow TypeScript best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure responsive design compatibility
## ๐ Acknowledgments
- **Radix UI** for accessible component primitives
- **Tailwind CSS** for utility-first styling
- **Lucide React** for beautiful icons
- **Vite** for fast development experience
- **React Query** for efficient data fetching
## ๐ Support
For questions, issues, or contributions:
- **GitHub Issues**: Report bugs and request features
- **Documentation**: Check the integration guide in `README_API_INTEGRATION.md`
- **Community**: Join discussions in the project repository
---
**Transform your code with AI intelligence. Write better, safer, and more maintainable code today!** ๐