RoastMyCode is a fun, AI-powered web application that reviews your code with a touch of humor. Paste your code snippet, choose your preferred roast level (from gentle to savage), and get instant feedback that combines a genuine compliment, a witty roast, and an actionable improvement tip.
Powered by Google Gemini AI and LangChain, this project demonstrates how to build interactive AI applications with Next.js.
| Home Page | Code Editor |
|---|---|
![]() |
![]() |
| Roast Result |
|---|
![]() |
- Code Editor: Syntax highlighting for multiple languages via Monaco Editor.
- AI Roasts: Uses Google's Gemini models to analyze code.
- Roast Levels:
- Gentle: Supportive and friendly.
- Medium: Sarcastic but respectful.
- Savage: Sharp wit and brutal honesty (non-toxic).
- Structured Feedback: Every response includes a compliment, a roast, and an improvement tip.
- Modern UI: Built with Tailwind CSS, featuring dark mode aesthetics and smooth gradients.
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- AI Model: Google Gemini via
@langchain/google-genai - Components:
lucide-reactfor icons,@monaco-editor/reactfor the editor.
- Node.js 18+ installed.
- A Google AI Studio API Key. Get one here.
-
Clone the repository:
git clone https://github.com/Mohammed-Asfar/roastmycode-web.git cd roastmycode-web -
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env.localfile in the root directory and add your Google API Key:GOOGLE_API_KEY=your_api_key_here
-
Run the development server:
npm run dev
-
Open your browser:
Navigate to
http://localhost:3000to start roasting!
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.


