This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
My friend Karthik is obsessed with LeetCode.
He solves problems almost every day, gets excited when he figures out a clever approach, and then moves on to the next problem. The problem? A few weeks later, he’ll come across a similar problem and go:
“Wait… I know I’ve solved something like this before. What was my approach again?”
And then comes the painful part — digging through old solutions, trying to remember the thought process, or worse, maintaining a giant collection of notes for every single problem.
Writing notes for hundreds of LeetCode problems isn’t exactly fun either.
So I built LeetBuddy — an AI-powered companion that helps him turn his LeetCode history into something he can actually learn from.
LeetBuddy can retrieve his recent LeetCode submissions and use AI to help him understand, revisit, and reason about his solutions, instead of forcing him to manually document every problem he solves.
The idea is simple:
Solve the problem once. Let LeetBuddy help you remember how you solved it.
It supports both local AI through Ollama and a cloud AI mode, so users can choose between running models locally or using a cloud-based model.
And the best part? LeetBuddy generates the explanations and notes in Markdown, so they can be directly dropped into tools like Obsidian. This makes it easy to build a structured knowledge base for almost every problem solved, without spending time manually writing and formatting notes every day.
I built LeetBuddy specifically around this small but very real problem my friend kept running into — forgetting the approach to problems he’d already solved. And honestly, if you’re grinding LeetCode, you probably know that feeling too.
Demo
Try LeetBuddy line
link - https://leetbuddy-e09w.onrender.com
The deployed version supports the cloud AI mode, so you can try LeetBuddy directly from the browser without installing anything.
Note about Local AI: The Ollama-powered mode is designed to run locally. Since Ollama needs to run on the user's own machine, it isn't available on the Render deployment. To use Local AI, you'll need to have Ollama installed and running on your machine.
Here are a few screenshots of LeetBuddy in action:
Code
🧠 LeetBuddy
Automated algorithmic note-taking. LeetBuddy extracts your accepted LeetCode submissions and feeds the syntax tokens into local or cloud inference engines to generate rigorous Big-O complexity analyses, recurrence relations, and methodology breakdowns.
Built for Hacktoberfest 2026.
🚀 Core Architecture
LeetBuddy operates on a dynamic machine learning pipeline, abstracting model execution based on your hardware constraints:
-
Edge Compute (Ollama): Run zero-latency, private inference locally using lightweight models like
gemma2:2borphi3. Optimized specifically to prevent Out-Of-Memory (OOM) kernel panics on 8GB Unified Memory machines. - Cloud Compute (Gemini): Route context tokens over the network to Google's tensor processing clusters via the Gemini API when running on resource-constrained devices or remote cloud deployments.
-
Stateless Extraction Proxy: Securely queries LeetCode's undocumented GraphQL endpoint using your
LEETCODE_SESSIONcookie. The backend acts as a strict pass-through proxy, guaranteeing cryptographic tokens are kept exclusively in ephemeral memory and never written to disk.
🛠 Tech Stack
…How I Built It
LeetBuddy is built as a React + Vite frontend with a Node.js + Express backend.
For the frontend, I used Codex as an agent to help build a large part of the UI, while I designed and implemented the backend, API flow, LeetCode integration, AI integration, and deployment. I wanted to use AI as a development collaborator rather than simply asking it to generate a finished application.
The backend handles the communication between the frontend, LeetCode, and the AI models.
🤖 Two AI Modes
I wanted LeetBuddy to support both cloud AI and local AI, so users aren't locked into a single way of using it.
Cloud Mode uses Gemini 3.5 Flash, providing the AI capabilities without requiring anything to be installed locally.
Local Mode uses Ollama with Gemma 2 2B. I specifically chose a smaller model so that the local version can be practical even on machines with limited hardware — including devices with around 8 GB of RAM.
This also gives users the option to run the AI locally instead of sending their prompts and code to a cloud provider.
🛠️ Tech Stack
- Frontend: React + Vite
- Backend: Node.js + Express
- AI: Gemini 3.5 Flash + Ollama/Gemma 2 2B
- LeetCode: LeetCode GraphQL API
- Deployment: Render
- Local AI: Ollama
The interesting part for me wasn't just connecting an LLM to a web app. It was figuring out how to make the AI fit naturally into an existing workflow:
Solve → Understand → Generate Notes → Save to Obsidian → Revisit Later
That workflow is what ultimately shaped LeetBuddy.
Why Does Open Innovation Matter?
For me, open innovation is about making AI more accessible and giving developers more control over how they use it.
A closed API can make it incredibly easy to add AI to an application, but it also means depending entirely on a remote service. With LeetBuddy, I wanted to explore the other side of that.
Using Ollama + Gemma 2 2B, LeetBuddy can run an AI model locally on the user's own machine. I deliberately chose a small model so that local AI is practical even on devices with around 8 GB of RAM.
This makes the AI experience more flexible: you can use the cloud-powered version when you want convenience, or run the AI locally when you want more control over your data and environment.
Open models also make experimentation possible. I could take an idea that started as a simple problem my friend had with LeetCode and build an application around a model that can actually run on my own hardware.
That's what I find exciting about open innovation — AI doesn't have to live behind a single API. It can be something developers can experiment with, adapt, and build on.
Prize Categories
Best Use of Render — LeetBuddy is deployed as a production web application on Render, with the Express backend serving the React frontend and handling the AI/API requests.
Best Use of Gemma — LeetBuddy uses Gemma 2 2B through Ollama as its local AI option, allowing users to run the AI on their own machines without relying entirely on a cloud API.




Top comments (0)