Rubber duck debugging is a beloved hacker tradition β just by explaining your code out loud, you often discover the solution. We asked ourselves: what if the duck could actually respond? With one of us passionate about hardware (Mechatronics Engineering) and the other passionate about AI/ML (Computer Science), we set out to bring a rubber duck to life.
DevDuck is a sentiment-aware chatbot paired with a physical duck:
-π£οΈ Hackers chat with DevDuck like they would with a debugging buddy.
-π€ DevDuck analyzes the tone and sentiment of the conversation.
-π¦ The physical duck reacts with movements that match the mood β encouragement if youβre frustrated, celebration if youβre excited, calm nods when things make sense.
-π¬ On top of that, DevDuck can support general coding-related discussions and is designed to expand into deeper debugging assistance.
- Voice Listening Toggle - Start/stop listening with a simple button
- Conversation History - Track all interactions in a dropdown
- Basic Sentiment Analysis - Understand developer mood from text
- Web API - RESTful endpoints for frontend communication
- Electron Frontend - Clean, minimal desktop interface
pip install -r requirements.txtpython scripts/start_api.pyThe API will be available at: http://localhost:8001
cd frontend
npm install
npm startngrok http 8001Don't forget to update VAPI variables in renderer.js!
GET /- Root; lists available endpointsPOST /listening/toggle- Toggle listening stateGET /history- Get conversation historyPOST /history/clear- Clear conversation historyGET /status- Get current system statusGET /health- Health checkPOST /webhook/vapi- VAPI webhook endpointPOST /duck/talk/start- Start duck talking animationPOST /duck/talk/stop- Stop duck talking animationPOST /duck/gesture/{name}- Trigger a gesture (nod,shake,left,right,greet,goodluck)POST /get_code_snippet- Read and return file contentsPOST /store_context- Store a snippet/context payloadPOST /retrieve_context- Retrieve a stored context by snippet id
DevDuck/
βββ arduino/ # Arduino servo controller
β βββ devduck_controller/
β βββ devduck_controller.ino
βββ devduck/ # Python backend
β βββ __init__.py
β βββ main.py
β βββ ai/
β β βββ __init__.py # VAPI integration hooks
β βββ analysis/
β β βββ __init__.py # Sentiment analysis
β βββ api/
β β βββ __init__.py
β β βββ assistant_config.py
β β βββ vapi_webhook.py # FastAPI app & endpoints
β βββ hardware/
β β βββ __init__.py
β β βββ usb_communication.py
β βββ utils/
β βββ __init__.py
β βββ security.py
βββ frontend/ # Electron desktop app
β βββ main.js # Electron main process
β βββ package.json # Frontend dependencies
β βββ package-lock.json
β βββ renderer/ # Frontend UI files
β βββ index.html
β βββ renderer.js
β βββ styles.css
βββ scripts/
β βββ start_api.py # Starts FastAPI on port 8001
The Arduino controller manages servo movements for the physical duck. See arduino/devduck_controller/ for the servo control code.
MIT License - see LICENSE for details.
- DJ Leamen
- Nahl Farhan