Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rubber Duck β€” The Senior Dev That Roasts Your Code

πŸ¦† Rubber Duck

The Senior Dev That Roasts Your Code

Rubber duck debugging was never meant to be this personal.

Live Demo Built for ElevenHacks Cloudflare Workers ElevenLabs


🎬 Demo

πŸŽ₯ [Demo video coming soon β€” drop your MP4 link here]

https://github.com/user-attachments/assets/REPLACE_WITH_YOUR_VIDEO_ID


πŸ’‘ What Is This?

Rubber Duck takes "rubber duck debugging" to the extreme. Paste any GitHub repo URL, and a brutally honest AI Senior Developer will:

  1. Scan your codebase β€” fetches files via the GitHub API and picks the most roast-worthy ones
  2. Read your actual code β€” analyzes imports, logic, error handling, naming, performance, and security
  3. Roast you with surgical precision β€” generates savage but technically accurate code reviews powered by Cloudflare Workers AI
  4. Say it out loud β€” ElevenLabs text-to-speech narrates every devastating critique with a condescending voice, synced word-by-word with a typewriter reveal

The more you submit, the meaner it gets. A shame escalation system tracks your humiliation across the session β€” from Novice Shame all the way to Architect-Level Shame.


✨ Features

Feature Description
πŸ” Deep Code Analysis AI reads actual code β€” quotes function names, spots bugs, calls out anti-patterns
πŸ—£οΈ Voice Roasting ElevenLabs TTS with word-level timestamps for real-time text-voice sync
πŸ“ˆ Shame Escalation Progressive insult levels β€” roasts get meaner with every file reviewed
πŸ”₯ Full Repo Verdict One-click whole-repository roast with cross-file analysis
πŸ’Ύ Roast Caching Previously roasted files are cached β€” switch between them instantly
πŸ”’ Private Repos Supports GitHub Personal Access Tokens for private repository access
βš™οΈ Configurable AI Choose from 8+ Workers AI models (Qwen 2.5 Coder, Llama 4, DeepSeek, etc.)
🎀 Voice Selection Pick your roaster's voice from the ElevenLabs voice library
🎨 Neobrutalist UI Bold design with shake, glitch, emoji reactions, and particle effects

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Browser (React 19)      β”‚
β”‚                                 β”‚
β”‚  useAgent() ←── WebSocket ──→  Durable Object: RoastAgent
β”‚                                 β”‚        β”‚
β”‚  ElevenLabs TTS ← browser-side β”‚        β”œβ”€β”€ GitHub REST API
β”‚  Audio + word-level sync        β”‚        β”œβ”€β”€ Cloudflare Workers AI
β”‚                                 β”‚        └── Session state (shame, cache, history)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works

  1. User pastes a GitHub URL β†’ RoastAgent fetches the repo tree via GitHub API
  2. File picker scores files by size, name patterns, and depth β†’ selects the most roast-worthy
  3. Code pre-loading fetches actual file contents and stores them in the Durable Object
  4. AI generates roasts using Cloudflare Workers AI with deeply engineered prompts that include real code context, cross-file analysis, and language-adaptive hints
  5. TTS playback calls ElevenLabs /with-timestamps API directly from the browser for word-synced typewriter reveal
  6. Shame escalates with every roast β€” the AI's tone gets progressively more unhinged

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 19, Vite, Tailwind CSS v4
Backend Cloudflare Workers, Durable Objects, Agents SDK
AI Inference Cloudflare Workers AI (default: Qwen 2.5 Coder 32B)
Voice Synthesis ElevenLabs Streaming TTS (eleven_flash_v2_5)
Repo Access GitHub REST API (public + private with PAT)
Real-time Comms WebSocket via useAgent hook
Deployment Cloudflare Workers (wrangler deploy)

πŸš€ Quick Start

Prerequisites

1. Clone & Install

git clone https://github.com/katipally/rubber-duck.git
cd rubber-duck
npm install

2. Configure Secrets

Create .dev.vars for local development:

ELEVENLABS_API_KEY=your_elevenlabs_api_key
GITHUB_TOKEN=your_github_personal_access_token

Create .env for frontend:

VITE_ELEVENLABS_API_KEY=your_elevenlabs_api_key

⚠️ Never commit secrets. Both files are in .gitignore.

3. Run Locally

npm start

Opens on http://localhost:8787. The Vite dev server runs with Cloudflare Workers local runtime.

4. Deploy to Production

# Set production secrets
npx wrangler secret put ELEVENLABS_API_KEY
npx wrangler secret put GITHUB_TOKEN

# Build and deploy
npm run deploy

πŸ“ Project Structure

rubber-duck/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   └── roast-agent.ts       # Durable Object β€” core AI logic, RPC methods, state
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ FileList.tsx          # Sidebar file list with roast/re-roast/clear buttons
β”‚   β”‚   β”œβ”€β”€ GitHubInput.tsx       # Repo URL input + PAT support
β”‚   β”‚   β”œβ”€β”€ RoastDisplay.tsx      # Roast text with typewriter + TTS-synced reveal
β”‚   β”‚   β”œβ”€β”€ ShameDashboard.tsx    # Shame level, progress bar, roast history
β”‚   β”‚   β”œβ”€β”€ SettingsPanel.tsx     # Model + voice selection
β”‚   β”‚   └── ParticleBackground.tsx  # Ambient particle visualization
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   └── useStreamingTTS.ts    # ElevenLabs /with-timestamps browser-side TTS
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ constants.ts          # All config β€” models, limits, defaults
β”‚   β”‚   β”œβ”€β”€ github.ts             # GitHub API β€” tree fetch, file content, file picker
β”‚   β”‚   └── prompts.ts            # AI prompt engineering β€” savage, overview, full repo
β”‚   β”œβ”€β”€ app.tsx                   # Main React app β€” orchestrates everything
β”‚   β”œβ”€β”€ server.ts                 # Worker entry point β€” routes agent requests
β”‚   └── styles.css                # Neobrutalist theme + animations
β”œβ”€β”€ assets/
β”‚   └── cover.png                 # Project cover image
β”œβ”€β”€ wrangler.jsonc                # Cloudflare Workers config
β”œβ”€β”€ vite.config.ts                # Vite build config (worker + client)
└── package.json

🎭 The Roast Engine

The magic is in the prompts. Rubber Duck doesn't just comment on file names β€” it reads your actual code and delivers technically accurate devastation:

What it analyzes:

  • Real bugs, logic errors, and missing edge cases
  • Performance issues (with Big-O complexity callouts)
  • Security vulnerabilities (hardcoded secrets, missing validation, XSS vectors)
  • Missing error handling and silent failure patterns
  • Cross-file issues (unused imports, duplicated logic, broken contracts)
  • Language-specific anti-patterns (TypeScript any abuse, Python bare except:, Go ignored errors)

Example roast output:

"Let's start with useAgent<any, RoastAgentState> β€” using any here is like leaving a gaping hole in your type safety. Then we see handleRoastFile with .catch(() => {}) β€” silently swallowing errors like they're just suggestions. And the DUCK_EMOJIS array... is this a code review tool or a kindergarten sticker book? Have you considered that your error handling strategy of 'pretend nothing happened' might not scale past your localhost?"


βš™οΈ Configuration

AI Models

Switch models in the Settings panel. Available options:

Model Specialty
Qwen 2.5 Coder 32B (default) Code-specialized, best for reviews
Llama 4 Scout 17B Fast, good general reasoning
Llama 3.3 70B High quality, slower
Llama 3.1 8B Lightweight, fast
DeepSeek R1 Distill Deep reasoning
Gemma 3 12B Balanced speed/quality
Mistral Small 24B Efficient, multilingual
Kimi K2.5 Strong coding ability

Voice Selection

Pick a voice from ElevenLabs in the Settings panel. The app curates a list of voices suited for condescending code reviews β€” from a posh British butler to an exasperated Silicon Valley tech bro.


πŸ† Built for ElevenHacks

This project was built for ElevenHacks Week 1 β€” the Cloudflare partner track.

Required integrations:

  • βœ… ElevenLabs β€” Streaming text-to-speech with word-level timestamps for real-time voice sync
  • βœ… Cloudflare Workers β€” Serverless compute, request routing, and static asset serving
  • βœ… Cloudflare Workers AI β€” LLM inference for AI-powered code review and roast generation
  • βœ… Cloudflare Durable Objects β€” Persistent session state (shame level, roast cache, history)
  • βœ… Cloudflare Agents SDK β€” WebSocket real-time communication via AIChatAgent with @callable() RPC

πŸ”’ Security & Data Handling

  • Personal Access Tokens are used only for GitHub API calls and are never stored permanently
  • All API keys are managed via Wrangler secrets (production) and .dev.vars (local) β€” never in source control
  • ElevenLabs TTS calls are made directly from the browser to avoid proxy IP blocking on the free tier

πŸ“ License

MIT


Built with πŸ¦† and mass amounts of mass amounts of coffee β˜•

@CloudflareDev Β· @elevenlabsio Β· #ElevenHacks

About

πŸ¦† The Senior Dev That Roasts Your Code β€” AI-powered code review that reads your actual code and delivers savage, technically accurate roasts with ElevenLabs voice. Built for ElevenHacks.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages