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.
- 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
- React 19 - UI library
- Vite - Fast build tool and dev server
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client
- Lucide React - Icon library
- 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
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
- Node.js (v16 or higher)
- npm or yarn
- GitHub Personal Access Token
- Google Gemini API Key
-
Clone the repository
git clone https://github.com/Houria-hs/RoastGPT.git cd RoastGPT -
Frontend Setup
cd client npm install -
Backend Setup
cd ../server npm install
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:5173Create a .env file in the client/ directory:
VITE_API_URL=http://localhost:5000/apicd server
npm start
# Server runs on http://localhost:5000cd client
npm run dev
# Frontend runs on http://localhost:5173- Open the application in your browser
- Enter a GitHub repository URL (e.g.,
https://github.com/username/repo) - Select a roast mode (optional)
- Click "Roast This Repo"
- Watch as Gemini AI generates a hilarious roast! ๐
cd client
npm run build
# Output: dist/cd server
npm run build- Push to GitHub
- Connect repository to Vercel
- Set root directory to
client - Configure
VITE_API_URLenvironment variable - Deploy
- Push to GitHub
- Connect repository to Render
- Create Web Service with root directory
server - Set Start Command:
npm start - Configure environment variables (GITHUB_TOKEN, GEMINI_API_KEY)
- Deploy
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"
}- Go to GitHub Settings โ Developer settings โ Personal access tokens
- Create a new token with
repoanduserscopes - Copy and save in
.env
- Go to Google AI Studio
- Create a new API key
- Copy and save in
.env
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
This project is open source and available under the MIT License.
Created by Houria-hs
Disclaimer: All roasts are generated for entertainment purposes. No repositories were harmed in the making of this application. ๐