Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A playful AI-powered web app that roasts your bios, tweets, or any text with style and humor.

Notifications You must be signed in to change notification settings

subhajitroycode/roastbot

Repository files navigation

πŸ”₯ RoastBot

A playful AI-powered web app that roasts your bios, tweets, or any text with style and humor. Built with Next.js, Firebase AI Logic SDK, and Google's Gemini 2.5 Flash model.

✨ Features

  • AI-Powered Roasts: Get creative, witty roasts generated by Google's Gemini 2.5 Flash model
  • Adjustable Intensity: Choose from soft, medium, or hard roast levels
  • Animated Response: Watch your roast appear with a smooth typewriter effect
  • Shareable Cards: Download beautiful roast cards as images to share on social media
  • Copy to Clipboard: Easily share roasts with a single click
  • Responsive Design: Optimized for both desktop and mobile devices
  • Edge Runtime: Fast OG image generation using Next.js Edge Runtime

πŸ€– The "Chaos Gremlin" Persona

RoastBot isn't just a generic AI; it's prompted to act as a "chaos gremlin with a PhD in stylish burns." It is designed to be:

  • Sharp and dramatic.
  • Unreasonably confident.
  • Stupidly funny.
  • Safety First: It refuses to generate hate speech, slurs, or threats, deflecting unsafe requests with playful refusals.

🌐 Deployment

Deployed on Vercel for optimal performance and scalability. Check out the live app here.

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd roastbot
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with your Firebase credentials:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

πŸ—οΈ Project Structure

roastbot/
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ api/
β”‚ β”‚ └── og/
β”‚ β”‚ └── route.tsx # OG image generation endpoint
β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ Header.tsx # App header with logo
β”‚ β”‚ β”œβ”€β”€ InputForm.tsx # Text input and difficulty selector
β”‚ β”‚ β”œβ”€β”€ ResponseBox.tsx # Roast display with animations
β”‚ β”‚ β”œβ”€β”€ RoastMachine.tsx # Main component orchestrating the app
β”‚ β”‚ └── ui/ # Reusable UI components
β”‚ β”œβ”€β”€ utils/
β”‚ β”‚ β”œβ”€β”€ downloadRoast.ts # Download functionality
β”‚ β”‚ β”œβ”€β”€ firebaseConfig.ts # Firebase initialization
β”‚ β”‚ └── roastGenerator.ts # AI roast generation logic
β”‚ β”œβ”€β”€ globals.css # Global styles
β”‚ β”œβ”€β”€ layout.tsx # Root layout
β”‚ └── page.tsx # Home page
β”œβ”€β”€ public/ # Static assets
└── package.json

🎨 Tech Stack

  • Framework: Next.js 16+
  • Styling: Tailwind CSS
  • AI/ML: Firebase AI Logic SDK with Google Gemini 2.5 Flash
  • Icons: React Icons (Feather Icons)
  • Font: Montserrat (Google Fonts)
  • Image Generation: Next.js OG Image Generation
  • Runtime: Edge Runtime for OG images

πŸ”§ Key Components

RoastGenerator

Uses gemini to generate roasts with customizable intensity levels:

  • Soft: Gentle, playful roasts
  • Medium: Moderate burn level
  • Hard: Maximum roast intensity

OG Image Generation

Dynamically creates shareable roast cards with:

  • Dark neutral background for Developer Aesthetics
  • Logo integration
  • Text wrapping for readability
  • Professional typography with Montserrat font

Responsive Design

  • Mobile-first approach
  • Adaptive backgrounds for different screen sizes
  • Touch-friendly interface elements

πŸ“ Environment Variables

Variable Description
NEXT_PUBLIC_FIREBASE_API_KEY Firebase API key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN Firebase auth domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID Firebase project ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET Firebase storage bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID Firebase messaging sender ID
NEXT_PUBLIC_FIREBASE_APP_ID Firebase app ID

πŸ› οΈ Development

Build for Production

npm run build

Start Production Server

npm start

Linting

npm run lint

🀝 Contributing

Contributions are welcome! Feel free to submit a Pull Request.

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

πŸ‘¨β€πŸ’» Author

Built with πŸ”₯ by Subhajit Roy

πŸ™ Acknowledgments

  • Google Gemini AI for powering the roasts
  • Firebase for AI backend infrastructure
  • Next.js for the amazing framework
  • Vercel for OG image generation capabilities and hosting

Disclaimer: RoastBot is meant for entertainment purposes only. All roasts are AI-generated and should be taken in good humor. The app is designed to avoid hate speech, slurs, and sensitive content.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /