Dev Overview

10 pages · 11 API routes · 7 features (1 stub) · 21 components

Pages

NameDescriptionStatus
/Landing — redirects to /onboarding if no profilelive
/onboardingAgent-driven interactive assessment flow (multi-turn Claude conversation)live
/profileProfile display + preferences formlive
/storiesStory list, filtering/sorting, generation formlive
/stories/[id]Story reader with furigana, word popups, mark-as-readlive
/stories/[id]/practiceExercise session for a storylive
/creditsAttribution (JMdict, Kanjium, JLPT lists, Claude)live
/dev/onboardingReview onboarding chat transcript, assessment results, LLM call statslive
/dev/srsSRS dashboard — card state, scheduling simulator, seed test cards, review loglive
/reviewsReview session UI — FSRS-scheduled flashcard reviewlive

API Routes

NameDescriptionStatus
POST /api/onboardingMulti-turn assessment — start + respond actionslive
GET/POST /api/profileProfile CRUD + PUT for preferenceslive
GET/POST /api/storiesList stories + generate new via pipelinelive
GET/PATCH /api/stories/[id]Fetch story + update read statuslive
GET/POST /api/stories/[id]/exercisesFetch/generate exercises for storylive
POST /api/exercises/[id]/submitScore non-translation exercises + vocab transitions + FSRS stabilitylive
POST /api/exercises/[id]/evaluateClaude-powered translation evaluation + grammar obslive
GET /api/reviews/dueDue card count + backlog statuslive
POST /api/reviews/sessionStart review session — returns due cards with component datalive
POST /api/reviews/[cardId]/rateRate a review card — FSRS scheduling + vocab transitionslive
GET /api/reviews/statsReview statistics for dashboardlive

Features

features/profilelive

Learner profile, onboarding assessment, preferences

getProfilecreateProfileupdatePreferencesbuildOnboardingSystemPromptcreateConversationgetConversationdeleteConversationAssessmentDisplayPreferencesForm
features/storieslive

Story pipeline: prepare > generate (Claude) > process (tokenize/annotate) > save

runStoryPipelinegetStoryByIdlistStoriessaveStoryupdateReadStatusprepareStoryGenerationgenerateStoryprocessStoryStoryReader
features/exerciseslive

Exercise generation, submission, translation evaluation

buildExerciseGenerationPromptgenerateExercisesForStorysaveExercisesgetExercisesForStorygetExerciseByIdsaveExerciseResponsegetStoryExerciseResultsbuildTranslationEvaluationPromptevaluateTranslationExerciseSessionSessionSummary
features/vocablive

3-tier state model (inferred/learning/confirmed), JLPT word selection, encounter tracking

setInferredVocabularygetKnownVocabgetGapWordsgetAdvancedKnownWordsselectTargetWordslookupVocabByFormsmarkWordsAsLearningincrementEncounterCountgetVocabStatsBasicVocabStateEngineapplyVocabTransition
features/grammarlive

Emergent grammar tracking via vector DB observations

saveGrammarObservations
features/reviewslive

FSRS-5 spaced repetition — card generation, scheduling, review sessions, backlog management

generateReviewCardssaveGeneratedReviewCardsgetDueReviewCardsgetReviewStatsstartReviewSessionprocessRatinggetBacklogStatusgetRecommendedNewWordCountReviewSessionReviewSummary
features/progressstub

Daily activity and streak tracking

Component Registry

LLM outputs { component, props } invocations; ComponentRenderer validates against Zod schemas and renders from registry.

NameDescriptionStatus
comprehension_mcMultiple-choice comprehension question with explanationlive
clozeFill-in-the-blank — option buttons or free-text, with hint togglelive
translationSentence translation with Claude-powered scoring and grammar feedbacklive
tap_to_pairTwo-column matching game with attempt trackinglive
self_assessmentRadio-style self-assessment with labeled optionslive
text_inputFree-text input (single/multiline) with submit handlinglive
srs_meaning_recallSRS meaning recall — reveal Japanese word from English meaninglive
srs_reading_recallSRS reading recall — reveal reading from kanjilive

Story Components

NameDescriptionStatus
StoryReaderFull story renderer with furigana toggle, sentence list, word popupslive
SentenceDisplaySingle sentence with furigana + translation togglelive
FuriganaTextRuby text rendering — smart/all/none modeslive
WordPopupWord detail modal — reading, meaning, POS, pitch accent, statuslive

UI Primitives

NameDescriptionStatus
ButtonCVA button — variants: default, outline, secondary, ghost, destructive, linklive
CardCard + CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooterlive
InputText input primitive with focus/disabled/invalid stateslive
LabelForm label (Radix UI)live
BadgeCVA badge — variants: default, secondary, destructive, outline, ghostlive
ProgressProgress barlive
SkeletonLoading skeleton placeholderlive
SonnerToast notificationslive
SpeakerButtonJapanese TTS button — browser speechSynthesislive

Strategy Interfaces

NameDescriptionStatus
VocabStateEngineInterface + BasicVocabStateEngine for vocab state transitions (FSRS-aware)live
SrsSchedulerFSRS-5 scheduling — createNewCard, scheduleReview, isStablelive
AudioProviderBrowser speechSynthesis for Japanese TTSlive
Exercise generationStrategy interface for exercise generation (Claude-based)live
TokenizerMeCab abstraction for morphological analysislive