Skip to content

Mohammed-Asfar/roastmycode-web

Repository files navigation

RoastMyCode 🔥

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.

📸 Screenshots

Home Page Code Editor
Home Page Code Editor
Roast Result
Roast Result

✨ Features

  • 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.

🛠️ Tech Stack

  • Framework: Next.js (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • AI Model: Google Gemini via @langchain/google-genai
  • Components: lucide-react for icons, @monaco-editor/react for the editor.

🚀 Getting Started

Prerequisites

  • Node.js 18+ installed.
  • A Google AI Studio API Key. Get one here.

Installation

  1. Clone the repository:

    git clone https://github.com/Mohammed-Asfar/roastmycode-web.git
    cd roastmycode-web
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env.local file in the root directory and add your Google API Key:

    GOOGLE_API_KEY=your_api_key_here
  4. Run the development server:

    npm run dev
  5. Open your browser:

    Navigate to http://localhost:3000 to start roasting!

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

📄 License

This project is licensed under the MIT License.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors