Inspiration
Mastering music theory—especially syllabus-heavy standards like ABRSM—is often intimidating, expensive, and rigid. Students struggle with abstract concepts (intervals, transpositions, time signatures), while traditional workbooks offer zero real-time feedback or audio reinforcement. Private 1-on-1 tutoring is inaccessible to many, and static online quizzes fail to adapt when a student is stuck on a foundational prerequisite.
I built SparcLearn to bridge this gap: an intelligent, adaptive music theory platform that combines strict musicology rules, dynamic notation rendering, and AI tutoring to deliver a truly personalized learning path for every student.
What it does
SparcLearn provides comprehensive, structured learning across ABRSM Grades 1–5:
- Comprehensive Syllabi (Grades 1–4): Structured 16-week curricula with verified video lessons, interactive notation, and syllabus-scoped practice.
- Adaptive Grade 5 Engine: A 24-question diagnostic placement quiz maps the student's mastery across 35 learning objectives and builds a personalized 6-week study schedule.
- Computed Music Theory Engine & Unlimited Practice: 100% computed music theory (keys, intervals, chords, transposition) powering thousands of unique, dynamically generated exam-style questions with zero defects.
- Interactive Engraved Notation & Web Audio: Interactive sheet music rendered via VexFlow with synchronized browser-based audio playback.
- Grounded AI Tutor: A safe AI study companion that explains concepts in alternative ways, diagnoses why a student got an answer wrong, and answers deep-dive questions grounded in lesson context.
- Mastery Tracking & Spaced Repetition: Real-time exponential mastery scoring with forgetting-curve decay to resurface decayed concepts before exam day.
- Parent Dashboard & Pro Subscriptions: Full transparency for parents on student mastery and seamless Stripe checkout for Pro features.
How I built it
- Frontend: Vanilla JavaScript (ES6+), HTML5, and CSS3 without heavy framework overhead for lightning-fast sub-second loading; VexFlow for dynamic music engraving; Web Audio API for synthesized multi-voice playback.
- Backend & Persistence: Lightweight Python stdlib HTTP service (
server.py) backed by SQLite (WAL mode) with atomic JSON/state transactions and signed stateless sessions. - AI Architecture: Multi-tier AI integration powered by Google Gemini (Gemma / Gemini 3.5 Flash) with automatic fallback to local OpenAI-compatible models, strictly grounded against lesson material to prevent hallucination.
- Infrastructure & Integrations: Cloudflare Tunnels for zero-trust edge delivery, Cloudflare Email Workers for transactional auth emails, and Stripe for subscription management.
Challenges I ran into
- Zero-Defect Musical Generation: Music theory has strict mathematical and harmonic rules. Instead of hardcoding questions, we built a comprehensive music theory engine (
theory.js) from scratch to calculate intervals, scale degrees, and clef transpositions programmatically. - Pedagogical Adaptation: Crafting a prerequisite Directed Acyclic Graph (DAG) for learning objectives so the engine can gracefully backtrack and remediate root gaps when a student fails a mastery checkpoint.
- Safe, Grounded AI Tutoring for Learners: Preventing LLM hallucinations in educational contexts by strictly scoping prompts to syllabus objectives and approved lesson transcripts.
Accomplishments that I am proud of
- Validated Question Bank: Validated over 14,000 algorithmic question generations with 0 defects.
- Ultra-Fast Zero-Dependency Stack: Built a robust, full-featured web app, LMS, and AI proxy with zero bulky client-side frameworks or heavy npm bloat.
- Full Learning Loop: Successfully connecting diagnostic quizzes, prerequisite remediation, sheet music engraving, synthesized audio playback, and contextual AI chat into one cohesive daily study habit.
What I learned
- How cognitive models (like spaced repetition decay and mastery thresholds) can be directly translated into real-time adaptive code.
- How to orchestrate resilient LLM fallbacks and bound concurrency to keep inference reliable and affordable.
What's next for SparcLearn
- Expanding beyond music to all school curriculum
- Adding teacher/classroom dashboards for multi-student cohort assignments.
- Integrating Bayesian Knowledge Tracing (BKT) as more learning interaction data is collected.
Built With
- artificial-intelligence
- cloudflare
- css3
- edtech
- gemini-api
- gemma
- google-gemini
- html5
- javascript
- music-theory
- python
- sqlite
- stripe
- vexflow
- web-audio-api
Log in or sign up for Devpost to join the conversation.