AI & Full-Stack Developer
Adaptive code understanding platform that dynamically switches between four scale-tailored explanation UIs, featuring Monaco-integrated annotations, overlay comments, and interactive diagrams.
Code Explainer is an adaptive code understanding platform designed to optimize developer comprehension of files at any scale. Recognizing that a one-size-fits-all AI prompt fails to serve both a 10-line helper function and a 2,000-line module, I decided the interaction model itself needed to change with scale, not just the AI's verbosity. Rather than delivering a generic wall of text for every snippet, the system dynamically switches between four scale-tailored explanation UIs: step-by-step execution timeline cards for small snippets, complexity badges for mid-sized functions, structural flow maps for module-sized files, and entry-point explorers for codebase scale.
Standard AI code explanation tools rely on fixed templates that deliver the same format of output regardless of code length, leading to information overload on larger modules or shallow summaries for small functions. Developers need a system where the interaction model itself scales with the code complexity, rather than just changing the length of text responses.
Built purely on the frontend with React 19, Vite, and Zustand for lightweight state management, styled with modular Vanilla CSS variables for precise UI customization. Code analytics, complexity parsing, and Mermaid diagrams are computed entirely in the client browser, reducing server dependencies. Inline annotations and ghost comments are injected directly into the workspace using custom Monaco Editor gutter and line decoration layers.
Built a client-side adaptive explanation engine that scales UI layouts (from step-by-step state tracking cards to multi-file codebase explorers) based on code line counts, with Monaco gutter overlays and multi-format exports.
Synchronizing Gutter Annotations — Ensuring that line-specific comments, editor overlays, and gutter flags remain properly positioned and aligned when developers fold, expand, or edit lines of code inside the Monaco frame.
Generating Syntactically Valid Diagrams — Ensuring that dynamically structured code can be reliably parsed and represented in Mermaid.js flowcharts without encountering syntax/renderer crashes on edge-case syntax patterns.
Client-Side Multi-Format Exporting — Maintaining consistent layout rendering, font sizing, and visual quality when generating PDFs via html2canvas and jsPDF directly in the browser across different device screens.