Skip to content

AI-Powered Python Tutoring Platform - Hackathon III: Reusable Intelligence and Cloud-Native Mastery

Notifications You must be signed in to change notification settings

DanielHashmi/EmberLearn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmberLearn - AI-Powered Python Tutoring Platform

Hackathon III: Reusable Intelligence and Cloud-Native Mastery

🏆 Skills are the Product - This project demonstrates Skills-Driven Development with MCP Code Execution pattern.

An intelligent tutoring system powered by OpenAI agents that provides personalized Python programming education through conversation. Built entirely using reusable AI Skills that work across Claude Code, Goose, and OpenAI Codex.

🎯 Project Overview

EmberLearn demonstrates the complete Hackathon III tech stack:

Layer Technology Status
Skills Library 7+ MCP Code Execution Skills ✅ Complete
Frontend Next.js 15 + Monaco Editor + Glass Morphism ✅ Complete
Backend FastAPI + OpenAI Agents SDK + Dapr ✅ Complete
Infrastructure Kubernetes + Kafka + Kong ✅ Configured
Documentation Docusaurus + AGENTS.md ✅ Complete

✨ Key Features

🛠️ Skills Library (Primary Deliverable)

7 reusable Skills with MCP Code Execution pattern:

Skill Purpose Token Efficiency
agents-md-gen Generate AGENTS.md files ~100 tokens
kafka-k8s-setup Deploy Kafka on Kubernetes ~100 tokens
postgres-k8s-setup Deploy PostgreSQL on Kubernetes ~100 tokens
fastapi-dapr-agent Create FastAPI + Dapr + OpenAI Agent services ~100 tokens
mcp-code-execution Implement MCP with code execution pattern ~100 tokens
nextjs-k8s-deploy Deploy Next.js apps to Kubernetes ~100 tokens
docusaurus-deploy Deploy documentation sites ~100 tokens

Token Efficiency: 80-98% reduction vs direct MCP integration

🤖 Six AI Tutoring Agents

  1. Triage Agent - Intelligently routes your questions to the best specialist
  2. Concepts Agent - Explains Python concepts with real-world analogies and code examples
  3. Code Review Agent - Analyzes code for correctness, PEP 8 compliance, and efficiency
  4. Debug Agent - Helps identify and fix errors with guided hints
  5. Exercise Agent - Generates coding challenges matched to your skill level
  6. Progress Agent - Tracks your mastery scores and learning streaks

💬 Interactive Chat Interface

  • Real-time conversation with AI agents
  • Quick action buttons for common queries
  • Message history with beautiful animations
  • Dark/light theme support (localStorage)
  • Fully responsive design

🔐 Authentication

  • JWT-based authentication with RS256 signing
  • Secure password hashing with bcrypt
  • User registration and login
  • Token refresh mechanism

📊 Learning Tracking

  • Mastery score calculation (exercise 40%, quizzes 30%, code quality 20%, consistency 10%)
  • Completed exercises tracking
  • Learning streaks
  • Struggle detection (5 trigger types)
  • Progress analytics

🔒 Code Sandbox

  • 5-second timeout enforcement
  • 50MB memory limit
  • Network access blocked
  • Filesystem access blocked
  • Python standard library only (MVP)

🚀 Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • npm or pnpm
  • (Optional) OpenAI API key
  • (For K8s deployment) Minikube, Helm, kubectl

1. Setup (One-time)

chmod +x setup.sh start.sh test-stack.sh
./setup.sh

2. Start the Application

./start.sh

3. Open in Browser

Navigate to http://localhost:3000 and start learning!

4. Test Everything

./test-stack.sh

🏗️ Architecture

Skills-Driven Development

┌─────────────────────────────────────────────────────────────┐
│                    SKILLS LIBRARY                           │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐         │
│  │ SKILL.md    │  │ scripts/    │  │ REFERENCE.md│         │
│  │ (~100 tok)  │→ │ (0 tokens)  │→ │ (on-demand) │         │
│  └─────────────┘  └─────────────┘  └─────────────┘         │
│                                                             │
│  Token Efficiency: 80-98% reduction vs direct MCP          │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                    EMBERLEARN APPLICATION                   │
│  ┌─────────────────┐    ┌─────────────────────────────────┐│
│  │   Frontend      │    │         Backend                 ││
│  │  (Next.js 15)   │    │  ┌─────────┐ ┌─────────┐       ││
│  │  + Monaco       │◄──►│  │ Triage  │ │Concepts │       ││
│  │  + Glass UI     │    │  │ Agent   │ │ Agent   │       ││
│  └─────────────────┘    │  └─────────┘ └─────────┘       ││
│                         │  ┌─────────┐ ┌─────────┐       ││
│                         │  │ Debug   │ │Exercise │       ││
│                         │  │ Agent   │ │ Agent   │       ││
│                         │  └─────────┘ └─────────┘       ││
│                         │  ┌─────────┐ ┌─────────┐       ││
│                         │  │Progress │ │ Code    │       ││
│                         │  │ Agent   │ │ Review  │       ││
│                         │  └─────────┘ └─────────┘       ││
│                         └─────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                    INFRASTRUCTURE (K8s)                     │
│  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐       │
│  │  Kafka  │  │PostgreSQL│  │  Dapr   │  │  Kong   │       │
│  │ (events)│  │  (data)  │  │ (mesh)  │  │ (gateway)│      │
│  └─────────┘  └─────────┘  └─────────┘  └─────────┘       │
└─────────────────────────────────────────────────────────────┘

📖 Documentation

Document Description
docs/docs/skills-guide.md Skills development guide
docs/docs/architecture.md System architecture
docs/docs/api-reference.md API documentation
docs/docs/evaluation.md Hackathon evaluation criteria
AGENTS.md Agent guidance for AI development
backend/README.md Backend API documentation

API Documentation

🛠️ Tech Stack

Layer Technology
Frontend Next.js 15+, Tailwind CSS, Shadcn/ui, Monaco Editor, Framer Motion
Backend FastAPI 0.110+, SQLAlchemy async, Structlog, OpenAI Agents SDK
Database PostgreSQL (prod) / SQLite (dev), Alembic migrations
Auth JWT with HS256, bcrypt password hashing
Infrastructure Kubernetes, Kafka, Dapr, Kong API Gateway

🛠️ Configuration

Backend Configuration

Create backend/.env:

DEBUG=True
DATABASE_URL=sqlite:///./app.db
JWT_SECRET_KEY=your-secret-key-here
OPENAI_API_KEY=sk-your-api-key
CORS_ORIGINS=http://localhost:3000,http://localhost:3001

Frontend Configuration

Create frontend/.env.local:

NEXT_PUBLIC_API_URL=http://localhost:8000

📝 Development

Backend Development

cd backend

# Format code
black app main.py

# Lint
ruff check .

# Type checking
mypy app main.py

# Tests (planned)
pytest

Frontend Development

cd frontend

# Format code
npm run format

# Lint
npm run lint

# Type check
npm run type-check

# Build
npm run build

🧪 Testing

Unit Tests (planned)

cd backend
pytest tests/

Integration Tests (planned)

cd backend
pytest tests/integration/

End-to-End Tests

./test-stack.sh

📊 API Endpoints

Category Endpoint Description
Auth POST /api/auth/register Register new user
POST /api/auth/login Login user
GET /api/auth/me Get current user
Agents POST /api/chat Chat (auto-routes via triage)
POST /api/triage Route query to agent
POST /api/concepts Concepts agent
POST /api/code_review Code review agent
POST /api/debug Debug agent
POST /api/exercise Exercise agent
POST /api/progress Progress agent
System GET /health Health check
GET /docs Swagger UI

🐛 Troubleshooting

Issue Solution
Backend won't start Check port 8000: lsof -i :8000, kill process if needed
Frontend won't start Clear node_modules: rm -rf frontend/node_modules && npm install
CORS errors Check backend/.env CORS_ORIGINS and frontend/.env.local API_URL
OpenAI errors Verify API key in backend/.env, agents work in demo mode without key

📋 Project Structure

EmberLearn/
├── .claude/skills/              # 🏆 PRIMARY DELIVERABLE - Reusable Skills
│   ├── agents-md-gen/           # Generate AGENTS.md files
│   ├── kafka-k8s-setup/         # Deploy Kafka on K8s
│   ├── postgres-k8s-setup/      # Deploy PostgreSQL on K8s
│   ├── fastapi-dapr-agent/      # Create FastAPI + Dapr agents
│   ├── mcp-code-execution/      # MCP Code Execution pattern
│   ├── nextjs-k8s-deploy/       # Deploy Next.js to K8s
│   ├── nextjs-production-gen/   # Generate Next.js apps
│   └── docusaurus-deploy/       # Deploy documentation
├── backend/                     # FastAPI backend
│   ├── app/                     # Core application
│   ├── triage_agent/            # Query routing agent
│   ├── concepts_agent/          # Python concepts agent
│   ├── code_review_agent/       # Code analysis agent
│   ├── debug_agent/             # Error debugging agent
│   ├── exercise_agent/          # Exercise generation agent
│   ├── progress_agent/          # Progress tracking agent
│   ├── sandbox/                 # Code execution sandbox
│   ├── shared/                  # Shared utilities
│   └── database/                # Database models & migrations
├── frontend/                    # Next.js 15 frontend
│   ├── app/                     # App Router pages
│   ├── components/              # UI components
│   └── lib/                     # Utilities & API client
├── k8s/                         # Kubernetes manifests
│   ├── agents/                  # Agent deployments
│   ├── dapr/                    # Dapr configurations
│   ├── kong/                    # API Gateway
│   └── frontend/                # Frontend deployment
├── docs/                        # Docusaurus documentation
│   └── docs/                    # Documentation content
├── history/prompts/             # Prompt History Records
├── specs/                       # Spec-Kit Plus artifacts
├── AGENTS.md                    # AI agent guidance
├── design-system.json           # Design tokens
├── setup.sh                     # Setup script
├── start.sh                     # Start script
└── test-stack.sh                # Test script

🏆 Hackathon III Submission

Repository 1: skills-library

Copy .claude/skills/ to a separate repository for submission:

  • 7+ reusable Skills with MCP Code Execution pattern
  • Each Skill tested with Claude Code AND Goose
  • Token efficiency: 80-98% reduction vs direct MCP

Repository 2: EmberLearn (this repo)

  • Contains both .claude/skills/ AND application code
  • AI-powered Python tutoring platform
  • 6 agents fully functional
  • Infrastructure configured for K8s deployment

Evaluation Criteria (100 points)

Criterion Weight Status
Skills Autonomy 15% ✅ Single prompt → deployment
Token Efficiency 10% ✅ 80-98% reduction
Cross-Agent Compatibility 5% ✅ Claude Code + Goose
Architecture 20% ✅ Event-driven, Dapr, K8s
MCP Integration 10% ✅ Code execution pattern
Documentation 10% ✅ Docusaurus + AGENTS.md
Spec-Kit Plus Usage 15% ✅ PHRs + specs
EmberLearn Completion 15% ✅ 6 agents + frontend

Submission Form

https://forms.gle/Mrhf9XZsuXN4rWJf7


Built with ❤️ using Skills-Driven Development for Hackathon III: Reusable Intelligence and Cloud-Native Mastery.

About

AI-Powered Python Tutoring Platform - Hackathon III: Reusable Intelligence and Cloud-Native Mastery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages