Inspiration

As students preparing for coding interviews and software development careers, we realized that understanding unfamiliar code is often more difficult than writing it. Existing AI tools primarily generate text explanations, but they rarely help users visualize the program's logic, identify hidden edge cases, or prepare for technical interviews.

We wanted to build an application that transforms code into an interactive learning experience rather than just another chatbot. This vision led to the creation of LogicLens AI.


What it does

LogicLens AI is an AI-powered visual code understanding platform that analyzes source code and generates a complete learning package within seconds.

Given any code snippet, LogicLens AI provides:

  • Step-by-step explanation of the code
  • Interactive Mermaid flowchart
  • Time and space complexity analysis
  • Variable-level dry run
  • Bug detection with severity and fixes
  • Edge-case test generation
  • Optimization suggestions
  • AI-generated interview questions
  • Interactive quiz
  • Downloadable PDF report
  • Analysis history

The goal is to help students, developers, and interview candidates understand code faster, debug more effectively, and strengthen problem-solving skills.


How we built it

Frontend

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS
  • Framer Motion
  • Monaco Editor
  • Mermaid.js
  • Axios

Backend

  • FastAPI
  • Google Gemini API
  • SQLAlchemy
  • SQLite
  • Pydantic
  • ReportLab

The core intelligence of LogicLens AI comes from the Google Gemini API.

Instead of making multiple API requests, we designed a structured prompt that enables Gemini to perform multiple reasoning tasks in a single request. Gemini simultaneously generates explanations, flowcharts, complexity analysis, bug detection, optimization suggestions, interview questions, quizzes, and edge cases, returning everything as structured JSON for the frontend to render.

The backend is deployed on Google Cloud Run, providing scalable and reliable API hosting with minimal infrastructure management.


Challenges we ran into

One of the biggest challenges was designing prompts that consistently returned structured JSON suitable for rendering different UI components.

Another challenge was handling temporary Gemini API service interruptions caused by high demand. We implemented graceful error handling and fallback mechanisms to ensure the application remains responsive even when the API is temporarily unavailable.

Rendering AI-generated Mermaid diagrams reliably while maintaining responsiveness across devices also required careful validation and UI optimization.


Accomplishments that we're proud of

  • Successfully built a complete AI-powered full-stack application.
  • Integrated Google Gemini to perform multiple reasoning tasks in a single API request.
  • Automatically generated interactive flowcharts from source code.
  • Combined explanation, visualization, bug detection, optimization, and interview preparation into one seamless workflow.
  • Designed a clean and professional user experience suitable for students and developers.
  • Successfully deployed the backend using Google Cloud.

What we learned

During this project we gained valuable experience in:

  • Prompt engineering for structured AI outputs
  • Integrating the Google Gemini API into production applications
  • Building scalable REST APIs with FastAPI
  • Deploying applications on Google Cloud Run
  • Designing modern frontend interfaces with React and Tailwind CSS
  • Rendering AI-generated visualizations using Mermaid.js

Most importantly, we learned how large language models can be used for much more than conversation—they can become intelligent educational assistants that improve understanding through visualization and structured reasoning.


What's next for LogicLens AI

Our future roadmap includes:

  • Multi-file project analysis
  • GitHub repository analysis
  • UML and architecture diagram generation
  • AI-powered debugging assistant
  • Personalized learning recommendations
  • Code quality scoring
  • VS Code extension
  • Real-time collaboration
  • Support for additional programming languages

Our long-term vision is to make LogicLens AI a comprehensive AI-powered code comprehension platform for students, educators, and software developers worldwide.

Built With

Share this project:

Updates

Submission history