How kathir-23/sql-tutorial works
SQL Mastery is a browser-based SQL learning platform. Learners follow a curriculum of lessons, write and run queries against seeded SQLite practice databases, and receive immediate results; optional branches add AI tutoring, guided projects, mixed review, and progress tracking. The graph reflects the documented capabilities and the sampled call sites. Lesson rendering, project-step execution, and several supporting routes are represented at their enclosing paths because their source was not sampled.
Main entry points: ChallengeBlock.tsx SQL challenge · playground/page.tsx Playground · review/page.tsx Mixed review · route.ts Tutor API
Components 25
Lessons and practice
- Home terminal
app/page.tsx - Curriculum
app/learn/page.tsx - Lesson
app/learn/[moduleSlug]/[lessonSlug]/page.tsx - Lesson content
lib/lessons.ts
SQL runtime
- SQL challenge
components/ChallengeBlock.tsx - Playground
app/playground/page.tsx - SQLite engine
lib/db.ts - Practice databases
lib/databases.ts - Query results
components/ResultsTable.tsx - SQL editor
components/SQLEditor.tsx - Schema viewer
components/SchemaViewer.tsx
Learning support
- Glossary
app/glossary/page.tsx
Progress and projects
- Guided projects
app/projects/[slug]/page.tsx - Project definitions
lib/projects.ts - Project progress
lib/project-progress.ts - Mixed review
app/review/page.tsx - Review set builder
lib/review.ts - Lesson progress
lib/progress.ts - Progress stats
app/stats/page.tsx
AI tutoring
- AI tutor
components/AITutor.tsx - Tutor API
app/api/ai/route.ts - Rate limiter
lib/rate-limit.ts - Schema descriptions
lib/databases.ts
Other components
- Learner
- Google Gemini
Connections 37
- Learner → Home terminal: opens
- Home terminal → Curriculum: navigates
- Curriculum → Lesson: opens lesson
- Lesson → Lesson content: reads content
- Lesson → SQL challenge: renders practice
- SQL challenge → SQL editor: accepts query
- SQL challenge → SQLite engine: runs query
- SQLite engine → Practice databases: loads seed SQL
- SQL challenge → Query results: shows output
- SQL challenge → Lesson progress: records completion
- Learner → Playground: opens
- Playground → SQLite engine: runs query
- Playground → Practice databases: selects database
- Playground → SQL editor: accepts query
- Playground → Schema viewer: shows schema
- Playground → Query results: shows output
- Learner → Glossary: looks up terms
- Learner → Guided projects: opens
- Guided projects → Project definitions: reads projects
- Guided projects → Project progress: reads progress
- Learner → Mixed review: starts review
- Mixed review → Lesson progress: reads completed lessons
- Mixed review → Review set builder: builds review set
- Review set builder → Lesson content: selects challenges
- Mixed review → SQLite engine: runs practice
- Mixed review → Practice databases: loads practice data
- Mixed review → Lesson progress: marks reviewed
- Learner → Progress stats: checks progress
- Progress stats → Lesson progress: reads metrics
- Progress stats → Project progress: reads project metrics
- SQL challenge → AI tutor: requests help
- AI tutor → Tutor API: sends context
- Tutor API → Rate limiter: checks limit
- Tutor API → Schema descriptions: reads schema
- Tutor API → Google Gemini: requests response
- Google Gemini → Tutor API: streams answer
- Tutor API → AI tutor: returns answer