π₯ [Demo video coming soon β drop your MP4 link here]
https://github.com/user-attachments/assets/REPLACE_WITH_YOUR_VIDEO_ID
Rubber Duck takes "rubber duck debugging" to the extreme. Paste any GitHub repo URL, and a brutally honest AI Senior Developer will:
- Scan your codebase β fetches files via the GitHub API and picks the most roast-worthy ones
- Read your actual code β analyzes imports, logic, error handling, naming, performance, and security
- Roast you with surgical precision β generates savage but technically accurate code reviews powered by Cloudflare Workers AI
- 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.
| 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 |
βββββββββββββββββββββββββββββββββββ
β 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)
βββββββββββββββββββββββββββββββββββ
- User pastes a GitHub URL β RoastAgent fetches the repo tree via GitHub API
- File picker scores files by size, name patterns, and depth β selects the most roast-worthy
- Code pre-loading fetches actual file contents and stores them in the Durable Object
- AI generates roasts using Cloudflare Workers AI with deeply engineered prompts that include real code context, cross-file analysis, and language-adaptive hints
- TTS playback calls ElevenLabs
/with-timestampsAPI directly from the browser for word-synced typewriter reveal - Shame escalates with every roast β the AI's tone gets progressively more unhinged
| 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) |
- Node.js 18+
- Cloudflare account with Workers AI enabled
- ElevenLabs API key (free tier works)
- Wrangler CLI (installed as a dev dependency)
git clone https://github.com/katipally/rubber-duck.git
cd rubber-duck
npm installCreate .dev.vars for local development:
ELEVENLABS_API_KEY=your_elevenlabs_api_key
GITHUB_TOKEN=your_github_personal_access_tokenCreate .env for frontend:
VITE_ELEVENLABS_API_KEY=your_elevenlabs_api_key
β οΈ Never commit secrets. Both files are in.gitignore.
npm startOpens on http://localhost:8787. The Vite dev server runs with Cloudflare Workers local runtime.
# Set production secrets
npx wrangler secret put ELEVENLABS_API_KEY
npx wrangler secret put GITHUB_TOKEN
# Build and deploy
npm run deployrubber-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 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
anyabuse, Python bareexcept:, Go ignored errors)
Example roast output:
"Let's start with
useAgent<any, RoastAgentState>β usinganyhere is like leaving a gaping hole in your type safety. Then we seehandleRoastFilewith.catch(() => {})β silently swallowing errors like they're just suggestions. And theDUCK_EMOJISarray... 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?"
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 |
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.
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
AIChatAgentwith@callable()RPC
- 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
MIT
Built with π¦ and mass amounts of mass amounts of coffee β
