The Domain contains the core learning model. It defines how sessions sequence exercises, how answers change progression, and which state is independent of the UI and database representation.
Details are distributed between Sessions, Exercises, and SRS.
flowchart TD
SESSION["Session"] --> SCHEDULER["SessionScheduler"]
SCHEDULER --> EXERCISE["Exercise"]
EXERCISE --> SRS["SRSState"]
EXERCISE --> WORD["WordExercise"]
EXERCISE --> SENTENCE["SentenceExercise"]
SENTENCE --> GROUP["SentenceGroup and SentenceState"]
Session owns one SessionScheduler, a shared SRSConfig, and the aggregate
SessionResult. It delegates answer processing to the current exercise and
does not load or persist data itself.
Exercise is the common runtime abstraction for WordExercise and
SentenceExercise. It combines an intra-session status with the persistent SRS
state of one learning task.
Each submitted answer also produces an ExerciseHistoryEntry. New entries are
buffered until Persistence stores them with the updated progression.
SRSState manages the interval and memory-model parameters associated with an
exercise. SentenceState is separate: it tracks the exposure and performance
of one sentence inside a sentence group.
The Domain does not know whether content contains text, HTML, images, audio, or
video. Exercises expose an integer contentId, which the Application layer
resolves into renderable content.
For a sentence exercise, the content identifier belongs to the sentence instance currently selected from the group.
Domain objects are not database models, but part of their state must survive between sessions:
ExerciseResume for each exercise;Session and SessionScheduler instances are reconstructed in memory.All conversions belong to Persistence. Domain code never imports DAOs, SQL, or persistence models.
The Domain intentionally ignores: