๐ก ๐ช๐ต๐ ๐ช๐ฒ ๐๐๐ถ๐น๐ ๐๐ โ Project Story: As developers, we spend a massive chunk of our time debugging syntax errors, deciphering cryptic edge cases, and waiting for peers to review our pull requests โ sometimes for days. Students face this even harder: no senior dev to ask, no reviewer on standby, just a blinking cursor and a confusing error message at 2 AM. We wanted to build a tool that acts as a ๐๐/๐ ๐๐ข๐ ๐ข๐ญ๐๐ฅ ๐ฉ๐๐๐ซ ๐ซ๐๐ฏ๐ข๐๐ฐ๐๐ซ โ something that instantly highlights logical flaws, scores code quality, suggests optimizations, and lets you chat directly with your code. No waitlists. No pull requests. Just paste and learn.
๐ ๏ธ ๐๐ผ๐ ๐ช๐ฒ ๐๐๐ถ๐น๐ ๐๐ ๐ฆ๐๐ฎ๐ฐ๐ธ: Python ยท Streamlit ยท CSS ยท Gemini 1.5 Flash ยท FPDF2 ยท python-dotenv The application uses a modular architecture that cleanly separates the static code analysis engine from the conversational chatbot interface. ๐ฅ๏ธ ๐๐ฟ๐ผ๐ป๐๐ฒ๐ป๐ฑ โ Streamlit , CSS A dual-panel UI โ a Review Panel where users paste code and trigger an instant structured audit, and a persistent Chatbot Panel that maintains conversation history for follow-up questions like "Can you rewrite that using a list comprehension?" ๐ง ๐๐ ๐๐ป๐ด๐ถ๐ป๐ฒ โ Gemini API Powered by google-generativeai with engineered system prompts that force the model to behave like a strict but constructive Senior Software Engineer. Native Gemini chat session objects handle context memory without manually parsing token histories. ๐ ๐ฃ๐๐ ๐ฅ๐ฒ๐ฝ๐ผ๐ฟ๐๐ โ FPDF2 Generates downloadable review reports complete with score tables, issue breakdowns, AI-improved code, and personalized learning tips.
๐ง ๐๐ต๐ฎ๐น๐น๐ฒ๐ป๐ด๐ฒ๐ ๐ฆ๐๐ฟ๐๐ฐ๐๐๐ฟ๐ฒ๐ฑ ๐๐ฒ๐บ๐ถ๐ป๐ถ ๐ข๐๐๐ฝ๐๐ โ Getting Gemini to return clean, parseable JSON consistently โ instead of a wall of markdown prose โ required careful prompt engineering and robust fallback parsing logic. ๐ฆ๐๐ฟ๐ฒ๐ฎ๐บ๐น๐ถ๐ ๐ฆ๐๐ฎ๐๐ฒ ๐ ๐ฎ๐ป๐ฎ๐ด๐ฒ๐บ๐ฒ๐ป๐ โ Streamlit reruns the entire script on every user interaction. Mastering st.session_state was critical to ensure chat memory, scores, and code context persisted without wiping on every click. ๐๐ฒ๐ด๐ถ๐ป๐ป๐ฒ๐ฟ-๐๐ฟ๐ถ๐ฒ๐ป๐ฑ๐น๐ ๐ง๐ผ๐ป๐ฒ โ Tuning the system prompt to explain issues in simple language โ without being condescending or losing technical accuracy โ required multiple iterations and real student test cases.
๐ก ๐ช๐ต๐ฎ๐ ๐ช๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ฒ๐ฑ โ ๐ฃ๐ฟ๐ผ๐บ๐ฝ๐ ๐๐ป๐ด๐ถ๐ป๐ฒ๐ฒ๐ฟ๐ถ๐ป๐ด ๐ณ๐ผ๐ฟ ๐ฆ๐๐ฟ๐๐ฐ๐๐๐ฟ๐ฒ๐ฑ ๐ข๐๐๐ฝ๐๐๐ Constraining LLM responses using explicit JSON schemas transforms chaotic AI output into clean, renderable UI data. The format of your prompt is just as important as the content. โก ๐ฆ๐๐ฎ๐๐ฒ ๐ ๐ฎ๐ป๐ฎ๐ด๐ฒ๐บ๐ฒ๐ป๐ ๐ถ๐ป ๐ฆ๐๐ฟ๐ฒ๐ฎ๐บ๐น๐ถ๐ Properly scoping st.session_state keys is essential for any stateful app โ chatbot memory, scores, and user code must all be explicitly preserved between reruns. โข ๐๐ฒ๐๐ถ๐ด๐ป๐ถ๐ป๐ด ๐ณ๐ผ๐ฟ ๐๐ฒ๐ด๐ถ๐ป๐ป๐ฒ๐ฟ๐, ๐ก๐ผ๐ ๐๐ฒ๐๐ฒ๐น๐ผ๐ฝ๐ฒ๐ฟ๐ Most dev tools assume prior knowledge. Building for learners forced us to rethink every label, error message, and feedback card โ clarity always beats precision when your user is still learning. โฃ ๐ ๐ผ๐ฑ๐๐น๐ฎ๐ฟ ๐๐ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ ๐ฃ๐ฎ๐๐ ๐ข๐ณ๐ณ Separating Gemini logic into gemini_helper.py made it trivial to swap models, adjust prompts, and debug AI responses without ever touching the UI layer.
๐ญ ๐ช๐ต๐ฎ๐'๐ ๐ก๐ฒ๐ ๐ Monaco-based in-browser code editor ยท Teacher dashboard for batch student reviews ยท Gamified XP and badge system to encourage daily practice ยท GitHub integration for commit-level automated feedback
Built With
- python
- streamlit
Log in or sign up for Devpost to join the conversation.