What this domain owns
Assessment rules and exam-flow state. It is separate from ordinary lesson progress.
Feature flow diagram
Diagnostic or mock exam screen
│
v
Question / answer state
│
v
Assessment scoring ──> diagnostic result / mock score
│
v
Readiness and feedback ──> learner progress snapshotThis diagram shows the normal direction of control and data. Follow it before changing a boundary or adding a dependency.
Class and relationship diagram
┌────────────────┐ answers ┌─────────────────────┐ result ┌──────────────┐
│ Diagnostic/Exam │───────▶│ Assessment use cases│──────▶│ Readiness │
└────────────────┘ ├─────────────────────┤ └──────────────┘
│ + checkAnswer() │
│ + scoreDiagnostic() │
│ + scoreMockExam() │
└──────────┬──────────┘
▼
┌──────────────┐
│ Answer rules │
└──────────────┘Boxes show the important data types or services. Their fields and main methods are listed inside; arrows show the primary dependency or data relationship.
Sequence diagram
Read this from top to bottom: each arrow is the next interaction in the normal successful path.
Start here in the code
Choose any filename to open it directly in VS Code.
How it works
- Learner starts a diagnostic or paper.
- Assessment records answers.
- Domain scoring calculates result/readiness.
- Exam flow controls sections and final feedback.
Read this code
src/contexts/assessment/public.tsOpen in VS Code — Expose assessment use cases, not scoring internals
export const assessment = {
checkAnswer: new CheckAnswer(),
estimateReadiness: new EstimateReadiness(),
scoreDiagnostic: new ScoreDiagnostic(),
scoreMockExam: new ScoreMockExam(),
};What each part is doing
- The public module is the allowed entry point for assessment screens.
- Each named use case represents one operation with a clear responsibility.
- Question UI should call a use case instead of implementing scoring conditions inline.
This is a deliberately short excerpt of the real pattern, with unrelated details omitted. Read the named file for the complete implementation.
Related API and server boundaries
- No dedicated core API route: exam data is catalogue/domain driven and learner state is saved through progress sync.
Tests to read and run
Implementation notes
This is the home for detailed explanations, decision records, request examples, and diagrams for this feature. Add new feature-specific documentation here instead of expanding the platform overview.