Skip to content

Repository files navigation

Latvian Case Tutor

An intelligent tutoring web app for practicing a focused subset of Latvian grammar (noun case usage and inflection).

The app serves one question at a time on /, tracks mastery by question type, and unlocks harder question types as the learner improves.

Features

  • Intelligent tutoring flow with mastery-based progression
  • Session-backed mastery tracking (HTTP-only cookie)
  • Four interactive question types:
    • CaseIdentification (click the word with the target case)
    • FillInTheLetter (complete the noun ending)
    • FillInTheWord (type the full declined form)
    • DragAndDrop (build a Latvian sentence from word tiles)
  • Explicit grammatical feedback:
    • Target case is shown in relevant exercises
    • Incorrect answers can report which case was actually formed (when recognizable)
  • Built-in case chart reference on the main page (toggleable)

Mastery Progression

Mastery is tracked per question type and clamped to a threshold.

  • Correct answer: mastery for active type increases by 1
  • Incorrect answer: mastery for active type decreases by 1
  • Unlock condition: when a type reaches threshold, the next type unlocks
  • Persistence: stored in a session cookie via server endpoints

Current order is defined in src/lib/its.ts.

Tech Stack

Getting Started

Prerequisites

  • Node.js 18+ (recommended modern LTS)
  • npm

Install

npm install

Run in development

npm run dev

Open the local URL printed by Vite (usually http://localhost:5173).

Project Structure (key files)

  • src/routes/+page.svelte - main ITS learner page UI and client-side flow
  • src/routes/+page.server.ts - loads mastery from session cookie
  • src/routes/api/mastery/+server.ts - API for grade updates/reset and cookie writes
  • src/lib/its.ts - question type ordering, threshold, mastery helpers
  • src/lib/question-pools.ts - question pools for each type
  • src/lib/components/ - interactive question components
  • src/lib/assets/case_chart.png - reference chart shown on /

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages