Skip to content
BeatCode

BeatCode

Beat Your Own Code: Learn. Improve Optimise.

Created on 3rd May 2025

•

BeatCode

BeatCode

Beat Your Own Code: Learn. Improve Optimise.

The problem BeatCode solves

LeetCode warriors, beatCode lets users input their solutions, receive intelligent hints, visualize optimizations, and ultimately improve their code step-by-step.

Challenges we ran into

One major hurdle was handling multi-language code input and execution. Users can submit solutions in Python, C++, or Java, and we needed a consistent way to process, validate, and optimize that code regardless of the language.

Problem:
Initially, using just the Gemini API caused issues because its responses varied by language — sometimes returning code that didn’t compile or didn’t align with the user’s original logic. Also, compiling code server-side securely was a concern.

Deployement was a big hurdle which we are still tackling.

Solution:
We integrated Judge0 API as a fallback to handle actual code compilation and output verification across languages. We also created dynamic prompt templates for Gemini that adapt based on the selected language and structure of the user’s code. This increased the reliability of optimizations.

This modular approach now lets us easily scale or swap APIs if needed.

Tracks Applied (2)

AI / ML

beatCode fits into the AI/ML track by using AI to enhance the learning process for data structures and algorithms (DSA)....Read More

Web / App Development

beatCode fits into the Web/App Development track as it is a fully functional web-based platform built with modern web te...Read More

Discussion

Builders also viewed

See more projects on Devfolio