Skip to content

A Node/React + FastAPI + Ollama application that delivers industry-standard code review and analysis, offering AI-powered code suggestions and fixes. (This is the work in Progress))

Notifications You must be signed in to change notification settings

aadhakal/code-review-ai

Repository files navigation

CodeReviewAI

A Node/React + FastAPI + Ollama app that provides AI-powered code review suggestions.

Version Last Commit License

Tech Stack

Python FastAPI React Node.js Ollama

Features

  • Local AI processing with Ollama (llama2:7b model)

  • Real-time code analysis

  • Secure, offline operation

  • Industry-standard code analysis with quality gates

  • AI-powered code improvement suggestions

  • Code quality metrics visualization

  • Auto-fix capabilities for common issues

  • Security vulnerability detection

  • Technical debt analysis

  • Real-time code quality scoring

Screenshots

Code Upload

Upload Code Screenshot -

Analysis Dashboard

Dashboard Screenshot

AI Suggestion

AI_Suggestion Screenshot

Project Structure

├── code-review-dashboard/    # React frontend
└── src/                     # Python backend
    ├── analyzers/          # Code analysis engines
    ├── api/               # FastAPI endpoints
    └── tests/            # Test suites

Installation

  1. Backend Setup
# Install Python dependencies
pip install -r requirements.txt

# Start the FastAPI server
uvicorn src.api.main:app --host 0.0.0.0 --port 8000
  1. Frontend Setup
# Navigate to dashboard directory
cd code-review-dashboard

# Install dependencies
npm install

# Start the development server
npm start

Usage

  1. Access the dashboard at http://localhost:3000
  2. Upload your code file for analysis
  3. View the comprehensive analysis including:
    • Code quality metrics
    • AI-powered suggestions
    • Security vulnerabilities
    • Auto-fix options

API Endpoints

  • POST /analyze/file - Industry-standard code analysis
  • POST /analyze/ai - Enhanced AI-powered analysis
  • POST /apply-fix/{fix_id} - Apply auto-fix suggestions
  • GET /metrics/industry-standards - Get analysis standards info

AI Configuration

The application uses Ollama with the Llama2 7B model for local AI processing:

# Install Ollama
curl https://ollama.ai/install.sh | sh

# Pull Llama2 model
ollama pull llama2:7b

License

License

About

A Node/React + FastAPI + Ollama application that delivers industry-standard code review and analysis, offering AI-powered code suggestions and fixes. (This is the work in Progress))

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published