Inspiration
Interview prep might be one of the most frustrating things about Computer Science. You write a solution that looks correct, it works on the examples you test, and when you step through it in your head or sketch it out on paper, everything seems to line up. Then you submit... and it fails a hidden test case. No clue why. We have all been there, staring at our code, rereading the same lines, convinced it should work. We built smart_ptr for those moments. The idea was simple: instead of guessing what went wrong, what if you could see what your code is doing and get a small, well-placed pointer in the right direction?
What it does
Users can solve coding problems directly in the browser and run their code against test cases. When a solution fails, smart_ptr visualizes the program's execution, showing how variables change, and how control flow moves and assumptions break. On top of this, smart_ptr provides AI-powered inline insights and hints. Instead of having to prompt a chatbot, or being given the exact answer, the system analyses compilation errors, failing test cases, and to offer guidance that nudges the user towards the answer. The platform reinforces core CS fundamentals through a gamified, dungeon-style challenge system. Players start with 10 lives and progress through conceptual encounters where their written responses are evaluated by the Gemini API against an ideal target answer. Each response is scored out of 10, with detailed feedback on how to improve. Any points missed deduct hearts, and once all lives are lost, the run ends. Higher-quality answers earn more points, pushing users to refine their understanding and compete for the highest possible score.
How we built it
The platform is built on Next.js, deployed via Vercel, with a performance-focused system that embeds the Monaco Editor for a production-grade coding experience. Code execution is handled entirely handled client-side using Pyodide, which compiles and runs Python inside the browser through a WebAssembly worker running on a thread. This allows us to safely sandbox the code execution with ultra-low latency. We instrument the execution pipeline to extract the runtime compilation messages and output intro structured representations that are then visualized and used to dynamically prompt our Gemini model. By grounding our prompts on a solid source of truth, rather than simply source code, the Gemini API produces context-aware hints. Our content comes from multiple sources: Kaggle datasets hosted on DigitalOcean provide a wide range of coding and CS conceptual questions; we web-scraped LeetCode using beautiful-soup to extract function headers, sample inputs, outputs, and constraints; and DBeaver was used for visualizing and managing the datasets efficiently.
Challenges we ran into
We faced challenges normalizing and ingesting the diverse coding-question dataset into a structured schema for our DigitalOcean database, as the source data varied widely in format. Additionally, supporting dynamic function signatures and variable types across problems required careful compiler and pipeline design to ensure the correct parsing and execution. Furthermore, for our visualization code, the rapid iteration of our project led to non-trivial merge conflicts which needed refactoring.
Accomplishments that we're proud of
We’re proud of how all the components came together into a cohesive system. We also built a clean, user-friendly app and learned to leverage WebAssembly to compile code to low-level assembly that runs directly in the browser, moving processing to the user’s machine. This approach ensures our platform runs extremely fast, and the results reflect that performance.
What we learned
We deepened our knowledge of client-side execution pipelines, WebAssembly, Pyodide, and prompt engineering for models. We also gained experience in designing systems that handle dynamic types and large ingestion for data.
What's next for smart_ptr
Next, we plan to expand support for additional programming languages and offer deeper execution tracking, including memory-level insights. We also aim to refine AI feedback and adaptive hinting based on the user’s common mistakes. This includes adding support for more compilers, enhancing visualizations across languages, and providing versatile class and data structure templates.
Built With
- beautiful-soup
- dbeaver
- digitalocean
- geminiapi
- github
- pyodide
- python
- typescript
- vercel
- webassembly
Log in or sign up for Devpost to join the conversation.