Authoring commands

The local loop from scaffold to review.

These commands are the working path for a campus author or developer. Start with a starter package, edit the learning files, validate the contract, run preview checks, and import the same package for review.

Path

Use one narrow path.

  1. Scaffold a package.Pick one starter. Do not begin by copying internal Lantern routes or admin code.
  2. Edit content and UI.Keep lesson data in content/ and app-specific behavior in dist/app.js.
  3. Validate the package.Check the manifest, referenced files, preview fixtures, preview tests, and content JSON.
  4. Run preview assertions.Use preview/tests.json to prove the app renders through the local runtime.
  5. Open a live preview when useful.Use a browser for human inspection, not as a substitute for contract checks.
  6. Import the same package.The validated directory is the artifact reviewers inspect and approve.

Start

Choose the starter that matches the course activity.

deno task app:new --list-starters

Simple activity

Use this for flashcards, practice tools, short simulations, checks for understanding, and course-specific activities.

deno task app:new /tmp/my-lantern-app \
  --starter=simple-activity \
  --app-id=my-app \
  --title="My App"

Browser autograder

Use this when the package needs reviewed browser grading specs, structured evidence, or Jasmine-style checks.

deno task app:new /tmp/my-autograder \
  --starter=browser-autograder \
  --app-id=my-autograder \
  --title="My Autograder"

Files

Edit the package files reviewers will inspect.

Most apps

  • manifest.json
  • content/activity.json
  • dist/index.html
  • dist/app.js
  • preview/fixtures.json
  • preview/tests.json

Browser autograders

  • grading/specs/checks.spec.js
  • evidence/example-output.json

These files are part of the reviewed artifact. They are not hidden implementation details.

Commands

The commands authors use day to day.

deno task app:dev /path/to/appRun the authoring loop. It keeps one preview URL open and reruns validation plus preview assertions after saves.
deno task app:validate /path/to/appValidate one package without starting a preview server.
deno task app:test-preview /path/to/appExecute preview/tests.json through Lantern's local preview runtime.
deno task app:preview /path/to/appOpen a live preview URL for human inspection.
deno task app:preview /path/to/app --port=8421Choose a preview port explicitly.

Validation checks today

  • Manifest schema and referenced files.
  • Preview fixtures shape.
  • Preview tests shape and executable assertion contract.
  • Content JSON when the package declares read_activity_content.

Preview files

Preview proves the app without touching the LMS.

preview/fixtures.json provides fake launch context, a fake attempt id, and initial local state. preview/tests.json is a short checklist of DOM assertions: selector exists, text equals, or text contains.

The preview runtime injects window.GatewayApp, serves reviewed content JSON, keeps local state in memory, records attempt events, accepts evidence artifacts and score proposals, and finalizes with fake LMS-free results.

Import

Import the exact package you validated.

deno task local:init
deno task local:bootstrap
deno task local:start

Open /admin/packages/import on the local URL printed by Wrangler and choose the package directory. Lantern validates the manifest and referenced files, stores an immutable reviewed snapshot, signs the runtime contract for that artifact, and adds the version to admin inventory for approval and LMS setup.