Inspiration

Every beginner's journey hits the same wall: tutorial videos make coding look easy, but the moment you close the tab and face a blank editor, nothing comes. Existing platforms either hand-hold too much ("copy this exact code") or drop you cold ("figure it out"). We wanted something in between — a mentor that guides you to the answer without giving it away, the way the best human tutors do. The Socratic method has worked for 2,500 years. We wanted to see if an LLM could pull it off.

What it does

Noob-PROject is a gamified Python learning platform with an AI Socratic mentor. Users work through six progressive coding missions — from Hello World to a word frequency counter — inside a Monaco code editor. Each submission runs in a sandboxed Python environment; failing tests trigger the AI mentor, which asks guiding questions rather than revealing the solution. The mentor adapts its approach based on a computed learner profile (quick solver / steady learner / needs support). Progress is tracked through XP, levels, skill unlocks, achievements, and a daily streak — enough game layer to make the next mission feel worth opening.

How we built it

  • Next.js 15 App Router + React 19 — three-panel layout (mission brief, editor, mentor chat), mobile-collapsed to a tab bar.
  • Monaco Editor — the same editor VS Code runs on, loaded client-side to avoid SSR headaches.
  • Judge0 CE — sandboxed Python 3 execution with a 10-second hard timeout; user code never runs on our server.
  • OpenRouter + Claude Haiku — AI mentor and post-submission analysis; system prompt keeps the mentor Socratic through hint levels 0–3, with the answer only allowed at level 4.
  • NextAuth v5 + Prisma + PostgreSQL — authentication and database schema.
  • localStorage — progress is stored locally for the MVP to avoid database round-trips on every keypress.
  • Tailwind CSS v4 — glassmorphism UI and custom animations.

Challenges we ran into

Keeping the AI Socratic

The natural tendency of a language model is to be helpful — which means giving answers. Getting Claude to ask one guiding question instead of writing the solution took significant prompt iteration: explicit rules per hint level, hard bans on showing exact function calls or strings before level 4, and structuring the response as JSON so we could validate the output shape.

Safe code injection for Hello World

The test harness wraps user code in a stdout capture using Python's exec(). Our first version escaped triple quotes and backslashes — but a crafted string could still break out of the template. We replaced the interpolation entirely with base64 encoding: the user's code is encoded in JS, decoded in Python with base64.b64decode(), then passed to exec(). Base64 output contains only safe characters, so there's nothing to escape.

Adaptive profiling without a history database

The adaptive engine computes a LearningProfile from localStorage data alone — no server round-trips. Performance score is: 100 - (attempts - 1) × 20 - hints × 15, floored at 5. Simple enough to run client-side on every load, but still gives the AI mentor something real to act on.

Accomplishments that we're proud of

The Socratic prompt actually works. Early testers reported feeling genuinely guided rather than either stuck or spoiled — which is the hardest balance to strike in educational AI. We're also proud of the security posture we shipped: DOMPurify on all AI HTML output, math guards on every API route, per-user rate limiting, CSP headers, and the base64 execution fix — all of it done before launch, not as a patch.

What we learned

"Be Socratic" is not a prompt — you need explicit rules, per-state constraints, output schemas, and fallbacks for every failure mode. We also learned that a tight response constraint — 2–3 sentences max from the AI, always ending in a question — does more for the learning experience than any amount of model sophistication. On the engineering side, Next.js App Router's server/client boundary is genuinely sharp. Mixing auth() calls, sandboxed execution, and client-only Monaco in the same feature surface required careful layering.

What's next for Noob-PROject

  • More languages — JavaScript and Data Science Python tracks are already stubbed in the onboarding flow; the execution layer just needs new harnesses.
  • Database-backed progress — the Prisma schema is fully defined. Migrating off localStorage unlocks leaderboards, cross-device sync, and real streak validation.
  • More missions — the current six cover variables through dictionaries; functions, classes, and APIs are the natural next arc.
  • Multiplayer sprints — timed co-op missions where two beginners tackle the same problem and can see each other's test results in real time.
  • Redis rate limiting — the current in-memory limiter works for a single instance; moving to Redis unlocks horizontal scaling.

Built With

Share this project:

Updates

Submission history