Skip to content

Latest commit

ย 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RoastGPT ๐Ÿ”ฅ

A full-stack application that humorously analyzes and "roasts" GitHub repositories using AI. Submit a GitHub repo URL and get a witty, roast-style code review powered by Google's Gemini AI.

Features โœจ

  • AI-Powered Roasting: Uses Google Gemini AI to generate funny, insightful code roasts
  • GitHub Integration: Fetches repository data from GitHub API
  • Beautiful UI: Modern React frontend with Tailwind CSS styling
  • Responsive Design: Works seamlessly on desktop and mobile
  • Multiple Roast Modes: Different styles of roasts (savage, gentle, constructive, etc.)
  • Real-time Processing: Instant analysis of GitHub repositories

Tech Stack ๐Ÿ› ๏ธ

Frontend

  • React 19 - UI library
  • Vite - Fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework
  • Axios - HTTP client
  • Lucide React - Icon library

Backend

  • Express.js - Web server framework
  • Node.js - JavaScript runtime
  • Google Gemini API - AI for roasting
  • GitHub API - Repository data fetching
  • CORS - Cross-origin resource sharing
  • dotenv - Environment variable management

Project Structure ๐Ÿ“

RoastGPT/
โ”œโ”€โ”€ client/                 # React frontend (Vite)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/    # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/         # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ services/      # API service layer
โ”‚   โ”‚   โ”œโ”€โ”€ data/          # Constants and data
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx        # Main app component
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx       # Entry point
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ””โ”€โ”€ index.html
โ”‚
โ””โ”€โ”€ server/                 # Express backend
    โ”œโ”€โ”€ controllers/       # Request handlers
    โ”œโ”€โ”€ routes/           # API routes
    โ”œโ”€โ”€ services/         # Business logic (GitHub, Gemini)
    โ”œโ”€โ”€ server.js         # App entry point
    โ”œโ”€โ”€ package.json
    โ””โ”€โ”€ .env              # Environment variables

Installation ๐Ÿ“ฆ

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • GitHub Personal Access Token
  • Google Gemini API Key

Setup

  1. Clone the repository

    git clone https://github.com/Houria-hs/RoastGPT.git
    cd RoastGPT
  2. Frontend Setup

    cd client
    npm install
  3. Backend Setup

    cd ../server
    npm install

Configuration โš™๏ธ

Backend Environment Variables

Create a .env file in the server/ directory:

PORT=5000
GITHUB_TOKEN=your_github_token_here
GEMINI_API_KEY=your_gemini_api_key_here
FRONTEND_URL=http://localhost:5173

Frontend Environment Variables

Create a .env file in the client/ directory:

VITE_API_URL=http://localhost:5000/api

Running Locally ๐Ÿš€

Start Backend

cd server
npm start
# Server runs on http://localhost:5000

Start Frontend (in another terminal)

cd client
npm run dev
# Frontend runs on http://localhost:5173

Usage ๐ŸŽฎ

  1. Open the application in your browser
  2. Enter a GitHub repository URL (e.g., https://github.com/username/repo)
  3. Select a roast mode (optional)
  4. Click "Roast This Repo"
  5. Watch as Gemini AI generates a hilarious roast! ๐Ÿ˜‚

Building for Production ๐Ÿ—๏ธ

Frontend Build

cd client
npm run build
# Output: dist/

Backend Build

cd server
npm run build

Deployment ๐ŸŒ

Frontend - Vercel

  1. Push to GitHub
  2. Connect repository to Vercel
  3. Set root directory to client
  4. Configure VITE_API_URL environment variable
  5. Deploy

Backend - Render

  1. Push to GitHub
  2. Connect repository to Render
  3. Create Web Service with root directory server
  4. Set Start Command: npm start
  5. Configure environment variables (GITHUB_TOKEN, GEMINI_API_KEY)
  6. Deploy

API Endpoints ๐Ÿ“ก

POST /api/roast

Generates a roast for a GitHub repository

Request Body:

{
  "repoUrl": "https://github.com/username/repo",
  "mode": "savage" // optional
}

Response:

{
  "roast": "Your roast text here...",
  "repoName": "repo-name",
  "author": "username"
}

Getting API Keys ๐Ÿ”‘

GitHub Personal Access Token

  1. Go to GitHub Settings โ†’ Developer settings โ†’ Personal access tokens
  2. Create a new token with repo and user scopes
  3. Copy and save in .env

Google Gemini API Key

  1. Go to Google AI Studio
  2. Create a new API key
  3. Copy and save in .env

Contributing ๐Ÿค

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

License ๐Ÿ“„

This project is open source and available under the MIT License.

Author ๐Ÿ‘จโ€๐Ÿ’ป

Created by Houria-hs


Disclaimer: All roasts are generated for entertainment purposes. No repositories were harmed in the making of this application. ๐Ÿ˜„

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages