This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
During university computer programming labs, instructors often demonstrate syntax implementations (like Python file handling or pointers in C) and quickly move ahead. My friend and lab partner struggled to grasp the internal mechanics of the context manager (with open(...) as file:) and list comprehensions during a recent class.
He wanted to ask an AI tutor for an immediate line-by-line explanation, but doing so on shared university terminals required signing into personal Google or OpenAI accounts. Logging into personal accounts on public lab workstations presents serious privacy risks, including cached credentials, open sessions, and browser data leakage.
To solve this, I built LabExplain: a zero-login, peer code tutor designed specifically for shared lab environments. Students do not need individual accounts, OAuth logins, or credentials. Instead, any student at a shared machine types a 6-digit session PIN (123456), pastes their lab snippet, and receives an instant, line-by-line pedagogical breakdown.
Demo
- Live Deployed App: https://labexplain-ai.onrender.com
-
Session PIN for Testing:
123456
Code
The complete source code is public and open-source:
Pratyush-Panda-2006
/
LabExplain-AI
A privacy-first code explainer built with FastAPI and Google Gemma 2 open weights. Allows students on shared lab computers to get instant line-by-line breakdowns for Python, C++, and Java using a simple 6-digit session PIN.
β‘ LabExplain
Zero-login, peer-accessible university code tutor powered by Google Gemma 2 (
gemma2-9b-it) via Groq Cloud.
Built for the DEV Hacktoberfest Weekend Challenge.
π― Problem Statement
In university coding labs, undergraduate students often encounter unfamiliar syntax and cryptic runtime errors (e.g., Python context managers, recursion base cases, pointer dereferencing in C/C++). However, students cannot safely use commercial AI tools on public lab machines because doing so requires logging into personal accounts, creating serious credential exposure and session leakage risks on untrusted workstations.
π‘ The Solution
LabExplain is a zero-login, peer-accessible code tutor:
- Students sit down at any university lab computer.
- Enter the active 6-digit lab session PIN (
482910or set by the instructor/TA). - Paste their confusing code snippet.
- Receive an encouraging, line-by-line pedagogical breakdown powered by Google's open-weight Gemma 2 (
gemma2-9b-it) running at ultra-low latency on Groq Cloud.
ποΈ Architecture & Project Layout
labexplain-ai/
ββββ¦How I Built It
- Open-Source AI Inference: Powered by open weights served via Groq's low-latency inference engine for near-instant responses during lab classes.
- Backend Architecture: Built with FastAPI and Pydantic, featuring session PIN verification, language routing (Python, C, C++, Java, JavaScript, SQL), and structured pedagogical prompt engineering.
- Frontend Design: A single-page dawn-lake glassmorphism UI featuring responsive CSS tokens, custom dark-glass dropdown components, and an expandable line-by-line modal.
- Cloud Hosting: Deployed as a web service on Render.
Why Does Open Innovation Matter?
Open-weight models and open innovation are essential for this architecture:
- Privacy on Shared Hardware: Proprietary closed-source platforms mandate individual user profiles and track activity. Open-weight models decouple intelligence from personal accounts, allowing lightweight, PIN-brokered sessions on public lab computers.
- Campus LAN & Air-Gapped Readiness: Because the underlying weights are open, educational institutions can host the model directly on local campus servers or offline intranets where student machines lack external internet access.
- Accessibility: It ensures all students get high-quality learning assistance without paywalls or individual subscriptions.
Prize Categories
- Best Use of Gemma
- Best Use of Render

Top comments (0)