Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 PR Roaster

AI-Powered Code Review Roasting - Get your pull requests brutally reviewed with sarcasm, specific feedback, and actionable improvements.

PR Roaster Next.js Express Gemini AI

🎯 What is PR Roaster?

PR Roaster is a cyberpunk-themed web application that analyzes GitHub Pull Requests and delivers brutally honest (but constructive!) code reviews powered by Google Gemini AI.

Features

  • 🔗 GitHub PR Analysis - Paste any public PR URL and we fetch all code changes
  • 🤖 AI-Powered Roasting - Gemini AI trained to spot code smells and anti-patterns
  • 🎯 Specific Feedback - Get line references, code quotes, and actionable fixes
  • Instant Results - Get your roast within seconds
  • 🖥️ Cyberpunk UI - Terminal-style interface with neon aesthetics

📁 Project Structure

pr-roaster/
├── frontend/          # Next.js 14 frontend application
│   ├── src/
│   │   ├── app/       # Next.js app router pages
│   │   ├── components/# React components
│   │   └── lib/       # Utilities and API client
│   └── package.json
│
├── backend/           # Express.js API server
│   ├── src/
│   │   ├── routes/    # API routes
│   │   └── services/  # GitHub & Gemini integrations
│   └── package.json
│
└── README.md

🚀 Getting Started

Prerequisites

  • Node.js 18+ installed
  • Google Gemini API key (Get one here)
  • GitHub Personal Access Token (optional, for higher rate limits)

1. Clone the Repository

git clone https://github.com/yourusername/pr-roaster.git
cd pr-roaster

2. Setup Backend

cd backend

# Install dependencies
npm install

# Create environment file
cp .env.example .env

# Edit .env and add your API keys:
# GEMINI_API_KEY=your_gemini_api_key
# GITHUB_TOKEN=your_github_token (optional)

# Start the server
npm run dev

The backend will run on http://localhost:3001

3. Setup Frontend

cd frontend

# Install dependencies
npm install

# Start the development server
npm run dev

The frontend will run on http://localhost:3000

4. Open in Browser

Visit http://localhost:3000 to use PR Roaster!

🔧 Environment Variables

Backend (.env)

Variable Required Description
GEMINI_API_KEY ✅ Yes Google Gemini API key
GITHUB_TOKEN ⚠️ Recommended GitHub PAT for higher rate limits
PORT No Server port (default: 3001)
CORS_ORIGIN No Comma-separated frontend origins (exact or wildcard like https://*.vercel.app)

Frontend (.env.local)

Variable Required Description
NEXT_PUBLIC_API_URL ✅ Yes Backend API URL (default: http://localhost:3001)

📚 API Reference

POST /api/roast

Analyze and roast code or a PR.

Request Body:

{
  "input": "https://github.com/owner/repo/pull/123"
}

Response:

{
  "success": true,
  "roast": "[THE VERDICT]...[THE GRILLING]...[THE PENANCE]...",
  "metadata": {
    "title": "PR Title",
    "author": "username",
    "additions": 100,
    "deletions": 50,
    "changedFiles": 5
  }
}

🎨 Tech Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • Icons: Lucide React
  • Font: JetBrains Mono

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • GitHub API: Octokit
  • AI: Google Generative AI (Gemini 1.5 Flash)

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

MIT License - feel free to use this project for anything!

⚠️ Disclaimer

PR Roaster is meant for entertainment and learning purposes. The roasts are generated by AI and should be taken with humor. Always write good code! 🔥

About

a vibe coded project for fun

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages