DEV Community

Yash oberio
Yash oberio

Posted on Edited on

🦥 I Built "Bed-Rot Coder" to Write Code Without Leaving My Bed (Hacktoberfest)

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

I built the Bed-Rot Coder—a voice-first, local AI coding agent designed for the ultimate lazy weekend. Why sit at a desk when you can code from your bed?

Bed-Rot Coder allows developers to embrace "bed-rotting" without sacrificing their side-hustles. You simply press a button on your phone or laptop, speak your logic (e.g., "Create a Python script to check if a number is even or odd"), and the AI transcribes your voice, processes the prompt, and streams the generated code directly to a sleek, dark-mode web console. No typing, no IDE setup, just pure, lazy productivity.

Demo

Code

Markdown

🦥 Bed-Rot Coder

Speak your code. Stay in bed.
A Next.js full-stack voice-to-code AI agent for Hacktoberfest.

Next.js Tailwind CSS Mastra Gemini

🛌 The Concept: "Slow and Steady" Theme

Why should you even work on a desk? Bed-Rot Coder was developed for developers that want to enjoy "bed-rotting" while still maintaining productivity. All you have to do is to hit record, speak out your logic (for example, "Write a python script that calculates Fibonacci sequence"), and an AI will transcribe your voice, process your logic and produce your code within a sleek dark-mode console webpage.

✨ Features

  • 🎤 Voice-First User Interface: No typing needed. Click, speak, and stop.
  • ⚡ Webpage-First Approach: No need to store anything locally. Code is displayed right away on the UI.
  • 🧠 Agentic AI Logic Processing: The Mastra Agent framework with Google Gemini (Flash) AI.
  • 🗣️ Accurate STT Integration: Integrates with ElevenLabs scribe_v1 for perfect transcription of speech.
  • …

How I Built It

I built this project using a modern, fast tech stack centered around open-source AI frameworks:

  • Agent Framework: Mastra (@mastra/core) orchestrated the entire AI logic.
  • LLM Engine: Google Gemini (gemini-1.5-flash) via the Vercel AI SDK.
  • Transcription: ElevenLabs JS SDK (scribe_v1) for flawless Speech-to-Text.
  • Frontend/Backend: Next.js 16.4.3 (Turbopack), TypeScript, and Tailwind CSS.

The Architectural Pivot:
Initially, I forced the Mastra agent to use a write_file_tool to save the generated code locally. However, this caused massive latency (sometimes hanging for 10+ minutes) and unnecessary agent looping. I performed a surgical "Webpage-First" pivot: I removed the disk-writing dependency, set the Mastra agent to maxSteps: 1 to prevent loops, and streamed the output directly to the UI. I also downgraded from gemini-3.8-flash to gemini-1.5-flash to gracefully handle Free Tier rate limits (429 errors).

Why Does Open Innovation Matter?

Open innovation was the only reason I could fix my latency issues. Because Mastra is an open-source framework, I wasn't locked into a black-box workflow. When I realized the disk-writing tool was slowing down my agent, I was able to inspect the agent's harness, completely rip out the tool, and re-wire the core loop to a single-step inference (maxSteps: 1).

An open-based approach allowed me to swap models instantly when I hit quota limits and completely customize how my agent behaves locally, keeping the processing fast and free.

The Lazy Payoff

This project took my coding friction from 100% down to 10%. By squashing the initial 15-minute wait-time bug down to a 2-second generation time, I no longer have to get out of bed to test a quick logic idea. I actually used it this week to generate basic Next.js API boilerplates while literally laying down. Just click, speak, copy, and sleep!

Prize Categories

I am submitting this project for the following partner categories:

  • Best Use of Mastra (Used @mastra/core to orchestrate the AI agent logic and prompt execution)
  • Best Use of ElevenLabs (Used the JS SDK and scribe_v1 to give the agent flawless voice-transcription capabilities)****

Top comments (0)