CraftQL
A bite-sized AI learning platform — "Duolingo for Generative AI"

Want to see the architecture?
Read the technical deep dive into navigating edge constraints, optimistic concurrency, and AI cost control.
Overview
CraftQL is an interactive, mobile-first learning platform built to teach Generative AI techniques in a bite-sized format. Inspired by the pacing and interactivity of Duolingo, it transforms passive reading into active problem-solving through embedded quizzes, prompt-engineering challenges, and real-time AI feedback.
The Challenge
The primary goal was to create a highly responsive, low-latency educational experience that could leverage Large Language Models (LLMs) for dynamic feedback without incurring uncontrollable API costs. It required merging a robust Learning Management System (LMS) with cost-controlled AI inference at the edge, while maintaining a smooth, app-like feel on the web.
Key Features
- ★Interactive lessons & prompt quizzes
- ★Real-time AI evaluation using Gemini 2.5 Flash Lite
- ★Gamified progression with streaks and virtual currency
- ★Edge-rendered content delivery for sub-second load times
- ★Custom virtual wallet system for cost management
The Solution & Workflow
1. Content Architecture
Built a hierarchical LMS structure (Courses → Modules → Lessons → Steps) managed in a globally distributed Cloudflare D1 database via Prisma.
2. Interactive Learning
Integrated MDX to seamlessly embed interactive React components—like `BlankFillingQuiz` and `PromptQuiz`—directly into the lesson content, enforcing active recall.
3. AI-Powered Feedback
Wired up Google's Gemini API within Next.js Route Handlers to act as a real-time evaluator for user prompts, leveraging a custom virtual wallet to manage compute limits.
Gallery




Outcomes
CraftQL validates the concept that learning prompt engineering and generative AI concepts can be both engaging and cost-effective. By moving compute to the edge and introducing a virtual coin system, the platform effectively mitigates API abuse while delivering a rich, gamified learning experience to users globally.