Skip to main content

AssessmentReport

Assessment report β€” payload validation + aggregated_scores extraction + brief/full serialization (Layer 3 Domain).

Status​

KeyValue
Layerdomain
TierL1
Statusdeprecated
Version0.9.0
PriceFree (free)
CategoryLearning

Overview​

Overview​

AssessmentReport is a Layer 3 Domain Plugin of multi-saas-kit. It provides standard validation / extraction / serialization for persisting session assessment results from apis.how's pronunciation-service.

Eloquent dependencies removed; pure validator + extractor + serializer reusable across writing/listening/reading evaluation domains.

Core Components (3 Pure Services)​

AggregatedScoreExtractor​

Extracted from apis.how's AssessmentReportController::store. Extracts 4 standard column values from aggregated_scores:

  • Missing / non-numeric β†’ null
  • Numeric strings auto-cast
  • Score β†’ float, duration β†’ int

AssessmentPayloadValidator​

Extracted from AssessmentReportController::store. Returns AssessmentReport fillable-compatible array:

ValidationDescription
session_idrequired + pattern + max 191
rubric default'session_general'
utterance_count etc.non-negative int
aggregated_scoresdelegated to AggregatedScoreExtractor
array fieldsonly array passes, else null
store_rawfalse β†’ raw_utterances null (privacy)

ReportSerializer​

Extracted from AssessmentReportController::serialize. Two modes:

  • full β€” all fields
  • brief β€” list view metadata (id / session_id / rubric / scores / created_at)

serializeMany([...]) β€” list defaults to brief, detail to full.

Configuration​

return [
'enabled' => env('PLG_ASSESSMENT_REPORT_ENABLED', true),
'session_id' => [
'pattern' => '/^[A-Za-z0-9_\-]{1,191}$/',
'max_length' => 191,
],
'default_rubric' => 'session_general',
'store_raw_default' => false,
];

Usage​

$validator = AssessmentPayloadValidator::fromConfig(config('assessment-report'));
$normalized = $validator->validate($request->all());
$report = AssessmentReport::create([...$normalized, 'tenant_id' => $tid]);

$serializer = new ReportSerializer;
return response()->json(['data' => $serializer->serialize($report->toArray())]);

Origin​

Extracted from apis.how's AssessmentReport Model (105 LOC) + AssessmentReportController (318 LOC). Eloquent / RLS / Policy / auth remain in project; only pure validation + extraction + serialization in plugin.

Dependencies​

None (self-contained, PromptTemplating optional for narrative).

Plugin Relationships​

  • AiRelay β€” automatic narrative generation (optional)
  • AiTracking β€” call history (Phase 2)

Roadmap (Phase 3+)​

  • Standard AssessmentReport Model + Migration with RLS
  • Filament Resource
  • ApiToken ability integration
  • Auto narrative (PromptTemplating + AiRelay)
  • Writing/Reading evaluation domain extension

License​

MIT

Dependencies​

Demos​


πŸ›’ View on Plugin Store: store.codebase.how/plugins/assessment-report