Skip to content

๐Ÿค– AI-powered code review platform that automates quality checks, generates intelligent feedback, and integrates seamlessly with Git workflows and IDEs

License

Notifications You must be signed in to change notification settings

wosledon/AIReview

Repository files navigation

AIReview โ€” AI-Powered Code Review Platform

This project is fully generated by Copilot; 0 human, 100% AI.

English | ็ฎ€ไฝ“ไธญๆ–‡

๐ŸŽฏ Overview

AIReview is an enterprise-grade AI-powered code review platform that transforms the code review process through intelligent automation. Built with a modern microservices-inspired architecture, it combines multi-LLM support, real-time collaboration, and sophisticated analysis capabilities to deliver actionable insights and significantly improve code quality.

Vision: Empower development teams to deliver high-quality code faster by augmenting human review with AI-driven intelligence.

๐Ÿ—๏ธ Architecture Design

System Architecture

AIReview follows a layered clean architecture with clear separation of concerns:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Frontend Layer (React)                    โ”‚
โ”‚  โ€ข React 19 + TypeScript + Vite                             โ”‚
โ”‚  โ€ข Real-time updates via SignalR                            โ”‚
โ”‚  โ€ข State management with React Query                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚ REST API / SignalR
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              API Layer (ASP.NET Core Web API)               โ”‚
โ”‚  โ€ข Controllers (Authentication, Projects, Reviews)          โ”‚
โ”‚  โ€ข SignalR Hubs (Real-time notifications)                  โ”‚
โ”‚  โ€ข Middleware (Auth, Error handling, Logging)              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 Core Business Logic Layer                    โ”‚
โ”‚  โ€ข Domain Entities (Project, Review, User, Prompt, etc.)   โ”‚
โ”‚  โ€ข Service Interfaces (AI, Git, Project, Analysis)         โ”‚
โ”‚  โ€ข Business Services (Orchestration & Domain logic)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Infrastructure Layer                            โ”‚
โ”‚  โ€ข Data Access (EF Core + Repository Pattern)               โ”‚
โ”‚  โ€ข External Services (Multi-LLM providers, Git)             โ”‚
โ”‚  โ€ข Background Jobs (Async analysis via Hangfire)            โ”‚
โ”‚  โ€ข Caching & Session Management (Redis)                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚   Database   โ”‚
                  โ”‚  (SQLite/PG) โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Architecture Principles

  1. Separation of Concerns: Each layer has distinct responsibilities

    • API layer handles HTTP/SignalR communication
    • Core layer contains pure business logic
    • Infrastructure layer manages external dependencies
  2. Dependency Inversion: Core logic depends on abstractions (interfaces), not implementations

  3. Repository & Unit of Work Pattern: Consistent data access with transaction support

  4. Async Processing: Background jobs handle long-running AI analysis tasks

  5. Real-time Communication: SignalR enables push notifications for review updates

Module Responsibilities

Module Responsibility Key Components
AIReview.API Entry point, request handling, real-time hubs Controllers, SignalR Hubs, Middleware
AIReview.Core Business rules, domain models, service contracts Entities, Interfaces, Domain Services
AIReview.Infrastructure Data persistence, external integrations, background jobs Repositories, EF Core, Hangfire, LLM clients
AIReview.Shared Cross-cutting concerns, DTOs Data Transfer Objects, Enums
AIReview.Tests Quality assurance Unit tests, Integration tests
aireviewer-frontend User interface, client-side logic React components, API clients

For detailed architecture documentation, see:

๐Ÿš€ Core Features

1. Intelligent AI Code Review

  • Multi-dimensional Analysis: Quality, security, performance, maintainability assessments
  • Risk Scoring System: Automated risk evaluation across multiple dimensions
    • Complexity analysis (cyclomatic complexity, nesting depth)
    • Security vulnerability detection
    • Performance bottleneck identification
    • Maintainability metrics
  • Contextual Suggestions: AI generates targeted improvement recommendations
  • Multi-LLM Support: Configurable providers (OpenAI, Azure OpenAI, custom models)
  • Async Processing: Background jobs ensure responsive UX for large codebases

2. Customizable Prompt Management โญ NEW

  • 3-Tier Template System: Built-in โ†’ User-level โ†’ Project-level overrides
  • Template Types:
    • Code Review templates
    • Risk Analysis templates
    • Pull Request Summary templates
    • Improvement Suggestion templates
  • Flexible Placeholders: {{CONTEXT}}, {{DIFF}}, {{FILE_NAME}}, etc.
  • UI Management: Intuitive web interface for template CRUD operations

3. Advanced Pull Request Analysis

  • Intelligent Change Summaries: AI-generated PR descriptions with impact analysis
  • Change Type Classification: Feature, Bug Fix, Refactoring, Documentation, etc.
  • Impact Assessment:
    • Business impact evaluation
    • Technical debt analysis
    • Breaking change detection
  • Test Recommendations: Auto-generated testing focus areas
  • Deployment Notes: Risk assessments and rollback considerations

4. Improvement Suggestion Engine

  • Categorized Suggestions: Code quality, performance, security, architecture, etc.
  • Priority Scoring: Automated prioritization based on impact and effort
  • User Feedback Loop: Accept/Ignore tracking for continuous improvement
  • Historical Tracking: Monitor suggestion acceptance rates over time

5. Git Integration

  • Repository Import: Clone and analyze existing Git repositories
  • Diff Analysis: Intelligent parsing of code changes
  • Commit History: Track review history alongside Git commits
  • Branch Support: Work with multiple branches seamlessly

6. Project & Team Management

  • Project Organization: Create and manage multiple review projects
  • Role-Based Access Control: Owner, Reviewer, Developer roles
  • Member Management: Invite team members with granular permissions
  • Project Settings: Per-project configurations and preferences

7. Real-time Collaboration

  • Live Notifications: SignalR-powered instant updates
  • Review Comments: Threaded discussions on code changes
  • Status Tracking: Real-time review workflow status updates
  • Activity Feed: Team activity visibility

8. Review Workflow

  • Review Request Management: Create, assign, and track reviews
  • Approval Process: Approve, reject, or request changes
  • Status Lifecycle: Pending โ†’ In Review โ†’ Approved/Rejected
  • Comment System: Line-by-line and general feedback

๐Ÿ“Š Screenshots

home

review

Repository Structure

  • AIReview.API: ASP.NET Core Web API backend with controllers, hubs, and service configuration
  • AIReview.Core: Core business logic with entity models, service interfaces, and business services
  • AIReview.Infrastructure: Infrastructure layer with EF Core data access, repository pattern, and background jobs
  • AIReview.Shared: Shared Data Transfer Objects (DTOs) and enums
  • AIReview.Tests: Unit tests and integration tests
  • aireviewer-frontend: React + TypeScript frontend application built with Vite
  • docs: Project documentation and design specifications

๐Ÿ› ๏ธ Tech Stack

Backend Architecture

  • .NET 8.0: Latest cross-platform framework with performance improvements
  • ASP.NET Core Web API: RESTful API with OpenAPI/Swagger documentation
  • Entity Framework Core: Code-first ORM with migration support
  • ASP.NET Core Identity: JWT-based authentication and authorization
  • SignalR: WebSocket-based real-time bidirectional communication
  • Hangfire: Background job processing for async AI analysis
  • SQLite/PostgreSQL: Flexible database options (dev/production)
  • Redis: Distributed caching and session management (optional)

Frontend Architecture

  • React 19: Latest React with concurrent features
  • TypeScript: Type-safe development with full IntelliSense
  • Vite: Lightning-fast HMR and optimized production builds
  • TailwindCSS: Utility-first CSS with custom design system
  • React Query (@tanstack/react-query): Powerful server state management
  • React Router v6: Declarative client-side routing
  • Axios: Promise-based HTTP client with interceptors
  • Heroicons: Beautiful hand-crafted SVG icons

Infrastructure & DevOps

  • Docker: Containerization for consistent environments
  • Docker Compose: Multi-container orchestration for local dev
  • GitHub Actions: CI/CD pipelines (planned)
  • Kubernetes: Production orchestration (planned)

๐Ÿ“ Repository Structure

AIReview/
โ”œโ”€โ”€ AIReview.API/              # Web API entry point
โ”‚   โ”œโ”€โ”€ Controllers/           # REST API endpoints
โ”‚   โ”œโ”€โ”€ Hubs/                  # SignalR real-time hubs
โ”‚   โ”œโ”€โ”€ Services/              # API-layer services
โ”‚   โ””โ”€โ”€ Program.cs             # App configuration & DI
โ”‚
โ”œโ”€โ”€ AIReview.Core/             # Domain & business logic
โ”‚   โ”œโ”€โ”€ Entities/              # Domain models (EF Core entities)
โ”‚   โ”œโ”€โ”€ Interfaces/            # Service contracts & abstractions
โ”‚   โ””โ”€โ”€ Services/              # Business logic implementations
โ”‚
โ”œโ”€โ”€ AIReview.Infrastructure/   # External dependencies
โ”‚   โ”œโ”€โ”€ Data/                  # EF Core DbContext & configurations
โ”‚   โ”œโ”€โ”€ Repositories/          # Data access implementations
โ”‚   โ”œโ”€โ”€ Services/              # External service integrations
โ”‚   โ”œโ”€โ”€ BackgroundJobs/        # Hangfire job definitions
โ”‚   โ””โ”€โ”€ Migrations/            # EF Core database migrations
โ”‚
โ”œโ”€โ”€ AIReview.Shared/           # Cross-cutting concerns
โ”‚   โ”œโ”€โ”€ DTOs/                  # Data transfer objects
โ”‚   โ””โ”€โ”€ Enums/                 # Shared enumerations
โ”‚
โ”œโ”€โ”€ AIReview.Tests/            # Test suite
โ”‚   โ””โ”€โ”€ Services/              # Unit & integration tests
โ”‚
โ”œโ”€โ”€ aireviewer-frontend/       # React frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/        # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/             # Route-level page components
โ”‚   โ”‚   โ”œโ”€โ”€ services/          # API client services
โ”‚   โ”‚   โ”œโ”€โ”€ types/             # TypeScript type definitions
โ”‚   โ”‚   โ””โ”€โ”€ App.tsx            # Root component & routing
โ”‚   โ””โ”€โ”€ vite.config.ts         # Vite build configuration
โ”‚
โ””โ”€โ”€ docs/                      # Documentation
    โ”œโ”€โ”€ design.md              # Architecture design (ไธญๆ–‡)
    โ”œโ”€โ”€ design.en-us.md        # Architecture design (English)
    โ””โ”€โ”€ features/              # Feature-specific docs

โš™๏ธ Prerequisites

  • .NET SDK 8.0+: Download
  • Node.js 18+ and npm/pnpm: Download
  • SQLite (default) or PostgreSQL 14+ (optional for production)
  • Redis (optional, for distributed caching): Download
  • Docker Desktop (optional, for containerized development): Download

๏ฟฝ Quick Start

Backend Setup

  1. Clone the Repository:

    git clone https://github.com/wosledon/AIReview.git
    cd AIReview
  2. Configure Application Settings: Edit AIReview.API/appsettings.Development.json:

    {
      "ConnectionStrings": {
        "DefaultConnection": "Data Source=aireviewer.db",  // SQLite
        "Redis": "localhost:6379"
      },
      "Jwt": {
        "Secret": "YourJWTSecretKey(AtLeast32Characters)",
        "Issuer": "AIReview", 
        "Audience": "AIReview"
      }
    }
  3. Apply Database Migrations:

    cd AIReview.API
    dotnet ef database update
  4. Start API Service:

    dotnet run
    # API will be available at http://localhost:5000
    # Swagger UI: http://localhost:5000/swagger

Frontend Setup

  1. Install Dependencies:

    cd aireviewer-frontend
    npm install
  2. Configure Environment Variables: Create .env file:

    VITE_API_BASE_URL=http://localhost:5000/api/v1
  3. Start Development Server:

    npm run dev
    # Frontend will be available at http://localhost:5173

๐Ÿงช Testing

Backend Tests

cd AIReview.Tests
dotnet test --verbosity normal

Frontend Tests

cd aireviewer-frontend
npm run test  # Configure Vitest/Jest as needed

๐Ÿ“ฆ Deployment

Docker Deployment

  1. Build Docker Images:

    # Backend
    docker build -t aireviewer-api -f AIReview.API/Dockerfile .
    
    # Frontend
    docker build -t aireviewer-frontend -f aireviewer-frontend/Dockerfile .
  2. Run with Docker Compose:

    docker-compose up -d

Production Considerations

  • Use PostgreSQL instead of SQLite for production
  • Configure Redis for distributed caching and session management
  • Set up HTTPS with reverse proxy (Nginx/Traefik)
  • Enable CORS only for trusted origins
  • Use environment variables for secrets (never commit credentials)
  • Configure logging and monitoring (Application Insights, Serilog, etc.)
  • Set up backup strategies for database

๐Ÿ”’ Security

  • Authentication: JWT-based with refresh token support
  • Authorization: Role-based access control (RBAC)
  • Data Protection: ASP.NET Core Data Protection for sensitive data
  • Input Validation: Model validation and sanitization
  • Rate Limiting: API throttling to prevent abuse
  • HTTPS: Enforce TLS 1.2+ in production
  • CORS: Restricted to allowed origins
  • SQL Injection: Parameterized queries via EF Core

๐Ÿ—บ๏ธ Roadmap & Future Enhancements

๐Ÿ”ฅ Near-term (Next 3-6 months)

Enhanced AI Capabilities

  • Advanced Code Fix Suggestions: AI-generated code patches with diff preview
  • Multi-Model Ensemble: Combine multiple LLM responses for higher accuracy
  • Context-Aware Analysis: Learning from historical reviews to improve suggestions
  • Custom AI Model Fine-tuning: Support for organization-specific model training

Integration Ecosystem

  • GitHub/GitLab Webhooks: Automatic review triggers on PR creation
  • VS Code Extension: Inline code review and suggestions in IDE
  • Slack/Teams Notifications: Integration with team communication tools
  • CI/CD Pipeline Integration: Quality gates based on AI review scores

Analytics & Reporting

  • Review Analytics Dashboard: Team productivity and code quality metrics
  • Trend Analysis: Track quality improvements over time
  • Custom Reports: Exportable reports for management
  • Developer Performance Insights: Individual contribution quality metrics

๐ŸŽฏ Mid-term (6-12 months)

Team Learning & Adaptation

  • Team Coding Standards Learning: AI learns from accepted/rejected suggestions
  • Custom Rule Engine: Define organization-specific coding standards
  • Review Template Library: Shared templates across teams
  • Automated Style Guide Enforcement: Enforce team conventions automatically

Performance & Scalability

  • Incremental Analysis: Only analyze changed portions of large files
  • Batch Review Processing: Efficient handling of multiple PRs
  • Distributed Processing: Horizontal scaling for analysis workloads
  • Caching Optimization: Reduce redundant AI calls

Advanced Features

  • Code Security Scanning: Deep security vulnerability analysis
  • License Compliance Checker: Detect licensing issues in dependencies
  • Architecture Violation Detection: Enforce architectural patterns
  • Technical Debt Tracker: Quantify and prioritize technical debt

๐Ÿš€ Long-term (12+ months)

Enterprise Capabilities

  • Multi-tenant Architecture: Full SaaS support with data isolation
  • Enterprise SSO: SAML, OAuth, LDAP integration
  • Audit Logging: Comprehensive compliance and audit trails
  • Advanced Access Control: Fine-grained permissions and policies
  • On-premise Deployment: Air-gapped enterprise deployment options

AI Evolution

  • Automated Code Refactoring: AI suggests and applies refactorings
  • Predictive Bug Detection: ML models predict bug-prone code
  • Test Generation: Auto-generate unit tests for reviewed code
  • Documentation Generation: AI-written inline documentation

Platform Expansion

  • Mobile Applications: iOS and Android apps for on-the-go reviews
  • API Marketplace: Third-party integrations and extensions
  • Community Plugin System: Open ecosystem for custom analyzers
  • Multi-language Support: Localization for global teams

Machine Learning Optimization

  • Continuous Model Improvement: Learn from user feedback at scale
  • Custom Model Marketplace: Share and download specialized models
  • Transfer Learning: Adapt pre-trained models to specific domains
  • Explainable AI: Transparency in AI decision-making

๐Ÿ’ก Why AIReview?

  • ๐ŸŽฏ Accuracy: Multi-LLM support and customizable prompts ensure relevant suggestions
  • โšก Speed: Async processing and caching make reviews fast
  • ๐Ÿ”ง Flexibility: Extensive customization at user and project levels
  • ๐Ÿ‘ฅ Collaboration: Real-time updates keep teams in sync
  • ๐Ÿ“ˆ Scalability: Built on proven enterprise technologies (.NET, React)
  • ๐Ÿ”’ Security: Role-based access control and secure authentication
  • ๐ŸŒ Open Source: MIT license encourages community contributions

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines (coming soon) for details on:

  • Code of Conduct
  • Development workflow
  • Pull request process
  • Coding standards

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“š Documentation

๐Ÿ“ง Contact & Support

๐Ÿ™ Acknowledgments

Built with โค๏ธ using modern open-source technologies. Special thanks to the .NET, React, and AI communities.


Star โญ this repository if you find it useful!

About

๐Ÿค– AI-powered code review platform that automates quality checks, generates intelligent feedback, and integrates seamlessly with Git workflows and IDEs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages