Examples

Reference packages for different course app shapes.

These examples show how the same package contract works for a simple learner-facing activity and for a richer browser autograder.

Simple activity

Quick Study is the calm Tier 0 reference app.

Quick Study is a flashcard deck with a light mastery loop. Learners reveal the answer, mark Again, Almost, or Got it, build a streak while clearing the tray, and log the completed session back to Lantern.

Package shape

  • Static frontend bundle.
  • Manifest.
  • Content file.
  • Preview fixtures.
  • Preview tests.

Runtime behavior

  • Reads reviewed card content from the gateway when available.
  • Emits answer and progress events as the learner rates each card.
  • Uses Lantern local state for deck memory.
  • Finalizes the study session through Lantern.
  • Never writes grades directly or accesses LMS tokens or D1.

Browser autograder

Web Checkup is the richer HTML, CSS, and JavaScript reference.

Use Web Checkup when the starter package is too small and you want a concrete example with multiple reviewed grader spec files, preview assertions, and structured evidence.

deno task app:validate examples/apps/web-checkup
deno task app:test-preview examples/apps/web-checkup
deno task app:preview examples/apps/web-checkup

Included proof files

  • preview/tests.json
  • grading/specs/structure.spec.js
  • grading/specs/behavior.spec.js
  • evidence/example-output.json

Boundary

  • manifest.json uses grading.mode = "browser".
  • Evidence submission is granted only with finalize_attempt.
  • Reviewed grading reuses authoring.grader_spec_files.
  • Lantern runs specs through its own Jasmine harness.
  • Anonymous evidence return stays inside Lantern.

The learner activity is deliberately institutional: learners inspect a small page revision checklist, record progress, and finalize the review through Lantern. It is still Tier 0: no backend code, direct LMS API, arbitrary outbound HTTP, or direct grade writes.

Specialized autograder

TypeScript Ladder shows a narrower code-revision shape.

TypeScript Ladder is a ten-step correction activity. Each step shows a reviewed TypeScript snippet. The learner corrects the current snippet before the next one unlocks. Difficulty rises from primitive annotations to exhaustive checks.

deno task app:preview examples/apps/typescript-ladder-game
deno task app:validate examples/apps/typescript-ladder-game
deno task app:test-preview examples/apps/typescript-ladder-game

The app does not execute arbitrary learner TypeScript. It compares the learner's edited snippet against reviewed corrections and still uses Lantern's browser grader, local state, finalize flow, and anonymous evidence return.