Skip to content

rakeshkumar1019/prview.ai

Repository files navigation

GlobalLogic PR Review Agent

A professional web application for reviewing GitHub pull requests using AI-powered insights. This application allows users to connect their GitHub account, view their repositories, and configure different LLM providers for PR analysis.

AI Review Setup

The application supports multiple AI providers for code review generation:

Ollama (Local AI)

  1. Install Ollama from https://ollama.ai
  2. Pull the codellama model:
    ollama pull codellama
  3. Start Ollama service:
    ollama serve
  4. The service will run on http://localhost:11434

Google Gemini

  1. Get API key from Google AI Studio
  2. Set the API key in your environment or use it directly in the app

OpenAI

  1. Get API key from OpenAI Platform
  2. Set the API key in your environment or use it directly in the app

Demo Mode

If no AI service is available, the application will automatically use demo review comments for demonstration purposes.

Features

  • 🎨 Modern UI/UX with gradient backgrounds and glass morphism effects
  • ⚡ Performance optimized with Next.js caching (5-minute TTL for most data)
  • 🤖 Multiple AI providers (Ollama, Gemini, OpenAI) with automatic fallbacks
  • 📱 Responsive design that works on all screen sizes
  • 🔍 Advanced PR filtering and search capabilities
  • 💬 AI-powered code review with approval/rejection workflow
  • 📊 Real-time GitHub integration with repository and organization support
  • 🎯 Detailed PR view with syntax-highlighted diffs

Getting Started

Prerequisites

  • Node.js 18.x or higher
  • A GitHub account
  • GitHub OAuth App credentials (Client ID and Secret)

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/globallogic-pr-bot.git
cd globallogic-pr-bot
  1. Install dependencies:
npm install
  1. Create a .env.local file based on the example:
cp .env.local.example .env.local
  1. Update the .env.local file with your GitHub OAuth credentials and NextAuth secret:
GITHUB_ID=your_github_client_id
GITHUB_SECRET=your_github_client_secret
NEXTAUTH_SECRET=your_random_secret_key
NEXTAUTH_URL=http://localhost:3000
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Creating GitHub OAuth App

  1. Go to GitHub Settings > Developer Settings > OAuth Apps > New OAuth App
  2. Fill in the application details:
  3. Register the application and copy the Client ID and Client Secret to your .env.local file

LLM Provider Configuration

The application supports three LLM providers:

OpenAI

  • Requires an API key from OpenAI Platform
  • Supports various models including GPT-4

Google Gemini

Ollama

  • Self-hosted option for running models locally
  • Configure the base URL (default: http://localhost:11434)
  • Choose from available models in your Ollama instance

License

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

Globallogic-PR-Bot

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages