AI-powered code analysis tool built for the IBM Bob Hackathon 2026 on lablab.ai
Paste any code and get instant AI-powered analysis:
- 📖 Explanation — plain English description of what the code does
⚠️ Issues Found — bugs, security risks, and bad practices detected- ✅ Suggested Fix — improved version of your code
- Open the app
- Paste your code or click a sample button (Python / SQL / JS)
- Click Analyze Code
- See explanation, issues, and fix in under 3 seconds
| Layer | Tool |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | FastAPI (Python) |
| AI Model | LLaMA 3.3 70B via Groq API |
| Dev Tool | IBM Bob IDE |
IBM Bob was our primary development partner throughout the entire project:
- Reviewed all code files for bugs and security issues
- Identified 7 critical vulnerabilities in early api.js
- Suggested retry logic, timeout protection, and error handling
- Improved our prompt engineering for better AI responses
- Full Bob report available in
BOB_LOG.mdandBOB_REPORT.pdf
git clone https://github.com/maunta91/Code--explainer-ai.git
cd Code--explainer-aicp .env.example .envOpen .env and add your Groq API key:
GROQ_API_KEY=your_groq_key_here
Get a free key at console.groq.com
pip install -r requirements.txtuvicorn server:app --reloadServer runs at http://localhost:8000
Double click index.html or open it in your browser.
| Method | Endpoint | Description |
|---|---|---|
| POST | /analyze |
Analyze code — returns explanation, issues, suggestion |
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{"code": "def divide(a, b): return a / b"}'{
"explanation": "This function takes two numbers and divides them...",
"issues": [
"Division by zero is not handled",
"No input validation"
],
"suggestion": "def divide(a, b):\n if b == 0:\n raise ZeroDivisionError('Cannot divide by zero')\n return a / b"
}Built in 48 hours for the IBM Bob Hackathon 2026
| Role | Responsibility |
|---|---|
| Frontend | HTML, CSS, UI design |
| Backend | FastAPI server, Python |
| AI Integration | Groq API, prompt engineering, IBM Bob |
MIT License — free to use and modify.
Made with ❤️ and IBM Bob for IBM Bob Hackathon 2026 · lablab.ai