CodeRoast is a "Grumpy Senior Developer" simulator that doesn't just review your code—it hurts your feelings. powered by Google Gemini AI, it analyzes code snippets and delivers harsh truths with varying levels of "spiciness" while also providing legitimate fixes.
(Note: Add a screenshot here later if you want!)
- Standard Code Editor: Clean, dark-mode interface for pasting your questionable code.
- Spiciness Toggle: Choose your reviewer's personality:
- Junior Dev (Gentle): Kind, supportive, and helpful. Uses small words. (~Pain Score: 1/10)
- Senior Dev (Strict): Professional, annoyed, and intolerant of incompetence. (~Pain Score: 5/10)
- Linus Torvalds (Savage): Ruthless, sarcastic, and verbally abusive. (~Pain Score: 10/10)
- AI-Powered Analysis: Uses
gemini-flash-latestfor fast, intelligent code critique. - Markdown Fixes: Returns corrected code with proper syntax highlighting.
- Pain Score: A quantifiable metric of how bad your code actually is.
- Cyberpunk Aesthetic: Sleek dark UI with zinc/orange themes and subtle grid backgrounds.
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui (Button, Card, Select, Textarea)
- AI Engine: Google Gemini API (
gemini-flash-latest) - Markdown:
react-markdown+@tailwindcss/typography - Icons:
lucide-react - Notifications:
sonner
- Node.js 18+ installed
- A Google Gemini API Key
-
Clone the repository (or download source):
git clone https://github.com/yourusername/coderoast.git cd coderoast -
Install dependencies:
npm install
-
Set up Environment Variables: Create a
.env.localfile in the root directory:GEMINI_API_KEY=your_actual_api_key_here
-
Run the development server:
npm run dev
-
Open the app: Visit http://localhost:3000 in your browser.
- Paste Code: Copy any snippet (e.g., JavaScript, Python, C++) into the editor.
Tip: Try pasting broken code like
if (true == true) return true; - Select Spiciness:
- Select "Savage" if you want to cry.
- Select "Senior" if you want to learn.
- Click "Roast Me": Wait for the AI to judge you.
- Read the Verdict: Check the insult, the Pain Score, and the fixed code below.
We have a built-in test script to verify the API responses and spiciness levels:
node test-spiciness.mjsPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.