Inspiration

AI tools now let students ship whole projects in a weekend, but many of them cannot explain what they submitted. In a viva or an interview, the project they "built" turns into a black box. Teachers face the same problem from the other side: reviewing AI-assisted submissions takes time, and there is no quick way to see what a project really does.

Most "explain my code" tools send code to an LLM, which can miscount functions, invent line numbers and miss structure. We wanted a tool where every claim can be checked, so understanding rests on facts instead of a confident guess.

What it does

Vibe Decoded takes a project (a zip file or a public GitHub link) and turns it into a navigable, verified explanation of how it works.

  • Exact facts from static analysis: counts of files, functions and classes, parameters, complexity, call relationships and entry points.
  • Concept detection: data structures (dictionaries, stacks, queues, sets and more), OOP (inheritance, overriding, encapsulation, polymorphism, abstraction) and patterns such as recursion and memoization.
  • Line numbers everywhere: every finding is tied to a file and line range. Clicking a reference chip like library.py 42-87 opens the code with those lines highlighted.
  • What each file does: the role and purpose of every file, plus which files it depends on and which depend on it. [delete if not finished]
  • Map and diagrams: an interactive graph, class diagrams, function flowcharts, sequence diagrams and file dependency diagrams, generated from the code and clickable back to the source. [delete if not finished]
  • Security tab: a suite of named static security tests (hardcoded secrets, injection, unsafe deserialization, weak cryptography, insecure configuration and more), each finding with severity, confidence, CWE category, exact lines and a fix. [delete if not finished]
  • Code health and Flow: complexity, long functions, duplicated logic and unused code, plus a step-by-step call chain from any entry function.
  • Practice: questions generated from the user's own functions and graded against their code, so a student can find out what they do not yet understand. Practice is one feature, not the whole concept.
  • Export: documentation, an architecture summary and a cheat sheet with a line-reference appendix.

Supported languages: Python in full depth, plus [JavaScript/TypeScript, Java, C/C++: list only the ones that work].

How we built it

The core idea is facts from analysis, narrative from AI.

  1. Deterministic analysis layer. Python's ast module parses Python projects, and tree-sitter parses the other languages. Every count, structure, concept and line number comes from the syntax tree, never from a language model. Uploaded code is never run.
  2. Language adapters. Each language is a small adapter returning the same finding shape, so the interface does not change when a language is added.
  3. Grounded AI explanations. The model receives the analyzer's facts and the numbered source of one function or class at a time, and writes a plain-language explanation. A validator then checks every line number the model cites. Any citation outside the real line range is removed and never shown as a link.
  4. Provider adapter. All AI calls go through one llm_provider file. Amazon Bedrock is implemented through the Converse API, so a different model or AWS service can be swapped in by changing one file. [Adjust to what you actually used; see Challenges.]
  5. Frontend. React, Vite and TypeScript with a custom flat design system. CodeMirror 6 provides the code viewer with line highlighting, Cytoscape.js draws the map, and resizable panels let users adjust the layout.
  6. Backend. FastAPI with safe ingestion: zip-slip protection, size and file-count limits, and path-traversal checks.

Tech stack: Python, FastAPI, ast, tree-sitter, networkx, radon, React, Vite, TypeScript, CodeMirror 6, Cytoscape.js, Mermaid, react-resizable-panels, Amazon Bedrock (boto3), [Gemini API via google-genai, if used]. Every library is listed in the README.

Challenges we ran into

  • Keeping the AI honest. Models gave plausible but wrong line numbers. Feeding them analyzer facts and adding a citation validator fixed this.
  • Many languages, one interface. Tree-sitter uses 0-based rows and different node names per language, so we built a shared adapter format and per-language configuration to keep line numbers exact. Call graphs outside Python are matched by name, so the app labels them as approximate.
  • Noisy security findings. Static checks can produce false positives. We kept each test narrow, added safe test files to prove correct code is not flagged, and show a confidence level plus a plain note that static checks cannot find every issue. [delete if the Security tab is not finished]
  • AWS account access. Our new AWS account was blocked from invoking Bedrock models (an account-level "Operation not allowed" restriction), so we could not test Bedrock end to end. Because of the provider adapter, the demo runs on [Gemini / another provider], and switching to Bedrock is a configuration change. [Keep only if this matches what happened.]
  • A three-day build. Scope had to be cut hard. We prioritized exact analysis and clickable line references over breadth.

Accomplishments that we're proud of

  • Every count, concept and finding links to an exact file and line range, and the whole app is built around that one interaction.
  • An AI validator that rejects fabricated line numbers, so explanations are grounded in the real code.
  • One analysis pipeline that works across [number] languages through simple adapters.
  • A clear, flat interface with resizable panes, built for reading code.
  • [Security tests and diagrams working on the sample project, if true.]
  • A fully working end-to-end prototype built within the hackathon window.

What we learned

  • Verification beats generation: grounding an LLM in syntax-tree facts gave far more trustworthy output than prompting alone.
  • One clean interaction (click a claim, see the exact lines) makes a complex tool understandable in seconds.
  • Putting every cloud call behind an adapter kept the project working when one service was unavailable.
  • Tree-sitter makes multi-language analysis practical, as long as the output format stays the same across languages.

What's next for Vibe Decoded

  • Deeper analysis for more languages, including real type-resolved call graphs.
  • A teacher mode that compares submissions using normalized code fingerprints, as evidence for review and never as an accusation.
  • Voice explanations with Amazon Polly for accessibility.
  • Full Amazon Bedrock deployment once account access is available.
  • A GitHub integration that analyzes pull requests and flags new security issues automatically.

Built With

Share this project:

Updates

Submission history