GEMMALENS
About the project
Inspiration
Frontend developers and QA teams waste countless hours deciphering vague visual bug reports like “the layout looks broken on mobile.” Because layout defects rarely throw JavaScript console errors, diagnosing CSS flexbox collapses, broken z-index stacking contexts, and mobile viewport clipping usually involves tedious manual trial-and-error. GemmaLens solves this by giving developers an automated multimodal QA engineer that transforms visual screenshots into structured root-cause reports and code patches.
What it does
GemmaLens directly addresses the Track 1 challenge: “The Bug That Only Exists on Screen.” A developer simply uploads a screenshot of a broken UI and adds a brief description. Powered by Google’s open-weight Gemma 4 (gemma-4-31b-it), GemmaLens performs spatial DOM geometry analysis and produces:
- Executive Bug Summary: Identifies viewport context and assigns an accurate severity rating.
- Visual Geometry Analysis: Identifies overlapping boundaries, lateral distortions, and clipping.
-
Probable Root Causes: Diagnoses the underlying CSS failure (e.g., default flexbox shrinkage, missing
min-width: 0, stacking context traps). -
Recommended Code Patch: Generates copy-pasteable CSS/HTML snippets to fix the defect.
It also includes an integrated “Judge Test Suite” with instant test cases (Flex Overlap, Modal Z-Clip, Mobile 100vw Overflow) for deterministic verification.
How we built it
-
AI Engine: Google GenAI SDK running
gemma-4-31b-itwith an engineered system prompt specialized for frontend DOM layout analysis. - Backend: FastAPI and Python handling multipart image ingestion and API communication.
- Frontend: Responsive dashboard styled in Hacktoberfest’s signature aesthetic using Tailwind CSS, vanilla JavaScript, and Marked.js.
Challenges we ran into
Ensuring the multimodal model stopped providing generic visual summaries and focused strictly on DOM geometry and actionable code. Tuning the temperature (0.2) and crafting a rigorous system prompt enforced clean, structured Markdown reports and accurate CSS patches.
Accomplishments that we’re proud of
Shipping a complete, functioning end-to-end multimodal developer tool from scratch during the hackathon sprint with a built-in evaluation test harness for judges.
What we learned
Lightweight, open-weight models like Gemma 4 excel at spatial reasoning and visual debugging when framed with strict domain-specific constraints.
What’s next for GemmaLens
Packaging GemmaLens as a GitHub Action and IDE extension that automatically ingests failed end-to-end Playwright screenshot artifacts and posts CSS patch suggestions directly into pull request reviews.
Built with
Prize Categories Entered
- Submitted
Best Use of Gemma 4