Inspiration
When practicing LeetCode questions, we realized existing hints often don't help when you're stuck without understanding the underlying approach. We wanted a smarter, more personalized way to teach problem-solving techniques - not just hand over answers.
We built LeetBro to act as your Brogrammer, giving hints/teaching algorithms when needed, as well as guiding you without solving the problem for you.
What it does
LeetBro is a Google Chrome extension that acts as a voice-activated pair programmer for LeetCode-styled problems.
- Say "Hey Bro" to wake it up.
- Ask any question about how to approach a coding problem.
- LeetBro reads your code and the problem description.
- It guides you with hints, techniques, and advice; never spoils the solution.
- It uses speech-to-text and text-to-speech to create a full conversational loop, utilizing Google's Gemini AI 2.5.
- You can also minimize the UI when needed.
How we built it
- Manifest v3 Chrome extension with:
- Background.js for handling API calls to Gemini 2.5
- contentScript.js for injecting a floating overlay UI onto LeetCode pages
- overlay.css for the styling
- Google Gemini 2.5 API for generating hints based on your code and the problem.
- Web Speech API
- SpeechRecognition to listen to "Hey Bro" and questions
- SpeechSynthesis to talk back with helpful guidance
Challenges we ran into
- Gemini sometimes returned answers that were way too close to full solutions, so we had to carefully prompt engineer our Gemini so that it would only hint without solving it.
- We also had an issue where we would talk even without saying our "Hey Bro", and it would still keep our audio and use that for our question.
Accomplishments that we're proud of
- We created a real-time interactive programmer inside LeetCode without really changing the site's design.
- It feels natural, responsive, and professional. Personally, I would use this daily to help me solve my leetcode problems.
What we learned
Prompt engineering with LLMs like Gemini is pretty crucial, you have to be very selecting in what you are prompting the AI and teaching it or else you get completely offput results. We also learned how to create chrome extensions and grab text from the site using an inject script.
What's next for LeetBro
I want to push this globally, but that's after we make a bunch of tweaks and design changes.
Log in or sign up for Devpost to join the conversation.