Inspiration

Learning to code often involves making mistakes, but many coding tools focus on immediately providing the correct solution. This can solve the problem without helping the learner understand it. We wanted to build something different: a coding tutor that turns mistakes into learning opportunities. This inspired CodeLens — a tool designed to help students understand why their code is wrong and guide them toward the solution instead of simply giving them the answer.

What it does

CodeLens is an AI-powered coding tutor focused on learning through practice. Students receive Python programming problems, write their own solutions, and submit their attempts for analysis.

CodeLens identifies potential mistakes or misunderstandings, provides progressive hints, explains the underlying concept, and encourages students to try again. It also tracks learning progress and uses performance to recommend appropriate practice.

How we built it

We built CodeLens as a web application using Next.js, React, TypeScript, and Tailwind CSS, with a Vercel-compatible architecture.

The application separates the coding workspace, learning components, problem dataset, progress tracking, validation, and AI analysis into independent modules.

The AI analysis runs through a server-side API route so that sensitive configuration remains protected. Student submissions are analyzed to identify potential error types and concepts, after which CodeLens returns structured educational feedback such as a diagnosis, hint, explanation, and recommended next step.

Challenges we ran into

One of the biggest challenges was designing the AI interaction so that it actually teaches instead of simply solving the student's problem. Giving the complete answer immediately would make the tool less useful as an educational platform.

We therefore designed a progressive feedback approach where CodeLens first provides a hint, encourages another attempt, and then provides a deeper explanation when needed.

Another challenge was keeping the application simple enough to deploy reliably while maintaining a clean architecture and secure server-side AI integration.

Accomplishments that we're proud of

We are proud of creating a coding tutor that focuses on the learning process rather than just the final answer.

CodeLens can turn a student's mistake into a learning opportunity by identifying the likely concept behind the mistake, providing targeted guidance, and encouraging the student to solve the problem independently.

We are also proud of building the project with a production-oriented architecture that is responsive, modular, and suitable for deployment on Vercel.

What we learned

We learned that using AI in education is not just about generating answers. The way feedback is delivered can have a major impact on learning.

While building CodeLens, we learned how to structure AI responses for predictable application behavior, design progressive hints, separate AI services from the user interface, validate API input and output, and build a secure server-side AI integration.

Most importantly, we learned that a good educational AI system should help learners develop their own problem-solving ability rather than replace it.

What's next for CodeLens

We want to expand CodeLens into a more personalized coding-learning platform.

Future improvements could include secure sandboxed code execution, support for additional programming languages, richer learning analytics, more advanced misconception detection, personalized learning paths, and a larger problem library.

Our long-term goal is for CodeLens to become a tutor that understands how a student is learning, not just whether their code is correct.

Built With

  • nextjs
  • vscode
Share this project:

Updates

Submission history