CodeRover is a modern web application that provides AI-powered code review capabilities for GitHub repositories. Built with React and TypeScript, it offers an intuitive interface for developers to analyze their code for defects, performance issues, and security vulnerabilities using advanced AI models.
- GitHub OAuth Integration: Seamless authentication with GitHub accounts
- Repository Management: Browse and select from your public and private GitHub repositories
- AI-Powered Code Analysis: Advanced code review using multiple AI models including CodeT5
- File System Navigation: Interactive repository tree view with branch selection
- Syntax-Highlighted Code Viewer: View files with proper syntax highlighting
- Categorized Analysis Results: Review findings organized into Defects, Performance, and Vulnerabilities
- PDF Report Generation: Export detailed code review reports as PDF documents
- Email Integration: Send code review reports directly via email
- User Dashboard: Display GitHub profile information and repository statistics
- Defects: Code bugs, logical errors, and potential issues
- Performance: Optimization opportunities and performance bottlenecks
- Vulnerabilities: Security issues and potential attack vectors
- React: 19.1.0 - Modern UI library
- TypeScript: ~5.8.3 - Type-safe JavaScript
- Vite: 6.3.5 - Fast build tool and development server
- TailwindCSS: 4.1.8 - Utility-first CSS framework
- React Router DOM: 7.6.2 - Client-side routing
- Lucide React: 0.513.0 - Modern icon library
- AOS: 3.0.0-beta.6 - Animate On Scroll library
- React Hot Toast: 2.5.2 - Toast notifications
- Downshift: 9.0.9 - Accessible autocomplete/dropdown components
- React Syntax Highlighter: 15.6.1 - Code syntax highlighting
- jsPDF: 3.0.2 - PDF generation
- jsPDF AutoTable: 5.0.2 - Table generation for PDFs
- Axios: 1.9.0 - HTTP client for API requests
Before running CodeRover, ensure you have the following installed:
- Node.js: Version 18.0 or higher
- npm: Version 8.0 or higher (comes with Node.js)
- Modern Web Browser: Chrome, Firefox, Safari, or Edge (latest versions)
-
Clone the repository
git clone https://github.com/DamianRavinduPeiris/coderover-web.git cd coderover-web -
Install dependencies
npm install
-
Configure environment variables Create a
.envfile in the root directory:# Backend API Base URL VITE_BASE_URL=http://localhost:8080 -
Start the development server
npm run dev
-
Build for production
npm run build
CodeRover uses the following environment variables:
| Variable | Description | Default Value | Example |
|---|---|---|---|
VITE_BASE_URL |
Backend API base URL | http://localhost:8080 |
https://api.coderover.com |
The VITE_BASE_URL variable is used throughout the application for:
- GitHub OAuth authentication (
/oauth2/authorization/github) - User profile retrieval (
/api/v1/github/user) - Repository listing (
/api/v1/github/user/repos) - Repository branch fetching (
/api/v1/github/repos/{owner}/{repo}) - Code analysis requests (
/api/v1/review,/api/v1/review/codeT5/v1) - Email report sending (
/email/send-report)
-
Authentication
- Visit the landing page
- Click the GitHub login button
- Authorize CodeRover to access your GitHub account
-
Repository Selection
- Navigate to your dashboard after authentication
- Browse your repositories or use the search functionality
- Click on a repository to explore its contents
-
Code Analysis
- Navigate through the repository file tree
- Select a file to view its contents
- Choose an AI model for analysis
- Click "Analyze Code" to start the review process
-
Review Results
- View categorized results in the review modal
- Navigate between Defects, Performance, and Vulnerabilities tabs
- Export results as PDF or send via email
CodeRover integrates with a backend API that provides:
GET /oauth2/authorization/github- GitHub OAuth initializationGET /api/v1/github/user- User profile information
GET /api/v1/github/user/repos- User repositories with paginationGET /api/v1/github/repos/{owner}/{repo}- Repository branch information
POST /api/v1/review- General code analysisPOST /api/v1/review/codeT5/v1- CodeT5 model analysis
POST /email/send-report- Send analysis reports via email
npm run dev- Start development server with hot reloadnpm run build- Build application for productionnpm run lint- Run ESLint for code quality checksnpm run preview- Preview production build locally
coderover-web/
├── public/ # Static assets
│ ├── coderover.svg # Application logo
│ └── vite.svg # Vite logo
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── AnalyzeButton.tsx
│ │ ├── BranchDropdown.tsx
│ │ ├── CodeBlock.tsx
│ │ ├── FileViewer.tsx
│ │ ├── ReviewModal.tsx
│ │ └── ...
│ ├── config/ # Application configuration
│ │ └── RouteConfiguration.tsx
│ ├── dashboard/ # Dashboard-related components
│ │ ├── DashBoard.tsx
│ │ ├── RepoCard.tsx
│ │ └── UserInfo.tsx
│ ├── main/ # Main application pages
│ │ └── LandingPage.tsx
│ ├── types/ # TypeScript type definitions
│ │ ├── RepoType.ts
│ │ ├── UserDTO.ts
│ │ └── ...
│ ├── util/ # Utility functions
│ │ ├── Analyzer.ts # Code analysis functions
│ │ ├── ExportPDF.ts # PDF generation
│ │ ├── mailer.ts # Email functionality
│ │ └── ...
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
└── tailwind.config.js # TailwindCSS configuration
The project uses:
- ESLint: Code linting with TypeScript support
- TypeScript: Static type checking
- React Hooks Rules: Enforced through ESLint plugins
- Vite: Fast development and build processes
- TailwindCSS: Utility-first CSS framework
- Custom CSS: Located in
src/index.css - Google Fonts: Outfit font family
- AOS Animations: Scroll-based animations
All API requests include:
withCredentials: true- For session managementContent-Type: application/json- For JSON payloads- Proper error handling with user notifications
Key TypeScript interfaces:
UserDTO: GitHub user profile informationRepoType: Repository metadataReviewMessage: Code analysis resultsReviewResponse: API response structure
CodeRover supports modern browsers with ES6+ features:
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Run tests and linting
npm run lint npm run build
- Commit your changes
git commit -m "Add your feature description" - Push to your fork
git push origin feature/your-feature-name
- Create a Pull Request
- Follow TypeScript best practices
- Use existing UI patterns and components
- Maintain responsive design principles
- Add proper error handling
- Update documentation for new features
- Follow the existing code style and formatting
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, issues, or feature requests, please:
- Check existing issues on GitHub
- Create a new issue with detailed description
- Include steps to reproduce for bugs
- Provide environment details when relevant
- Built with React and TypeScript
- Styled with TailwindCSS
- Icons provided by Lucide React
- PDF generation powered by jsPDF
- Code analysis enhanced with AI models