Skip to content

Latest commit

 

History

History
105 lines (76 loc) · 3.23 KB

File metadata and controls

105 lines (76 loc) · 3.23 KB

Demo Cheatsheet (End-to-End)

This cheatsheet runs the local Caliper demo from local seeded generator data to learner context and VP creation.

1) Prerequisites

  • Install dependencies:
    • npm ci
  • Have TLCS API reachable locally (or deployed and reachable).

2) Start TLCS services

Run whichever local start flow you use for this repo (API + queue consumer).

If testing UI:

  • npm run dev:learner-ux

3) Configure generator .env

Add these values to the repo root .env file:

CALIPER_INGEST_URL=https://<your-api>/ingest/caliper

Optional auth/token settings in the same .env file:

# Option A: direct bearer token
# CALIPER_INGEST_TOKEN=<bearer-token-if-required>

# Option B: auto-mint token from Cognito client credentials
CALIPER_OAUTH_TOKEN_URL=https://<your-cognito-domain>/oauth2/token
CALIPER_OAUTH_CLIENT_ID=<app-client-id>
CALIPER_OAUTH_CLIENT_SECRET=<app-client-secret>
# Optional scope string (space-delimited)
CALIPER_OAUTH_SCOPE=
export CALIPER_SENSOR_ID="urn:uuid:local-sensor-demo"
export GENERATOR_WARMUP_SECONDS="3"
export GENERATOR_PUSH_INTERVAL_SECONDS="20"

4) Generate and send Caliper envelopes

npm run generate:caliper

Expected console output includes startup plus repeating loop output:

  • sent entities snapshot
  • sent random scenarios
  • total count of envelope data[] items sent

5) Verify ingest and persistence

  1. Confirm ingest accepted (from logs or response with submissionId).
  2. Check submission status:
    • GET /submissions/{submissionId}
  3. Confirm learner context is materialized:
    • GET /learners/{learnerId}/context
  4. Confirm stacked timeline projection is available:
    • GET /learners/{learnerId}/context?view=timeline&stackBy=day

You should see session-oriented context derived from projected Caliper session credentials. Timeline mode should include timeline.layers[] with graph node/edge counts and snapshot provenance.

6) Create and verify VP

Create VP:

  • POST /presentation/create
  • Include:
    • learnerId
    • selected credential IDs and claim IDs
    • audience, purpose, expirationDate

Verify VP:

  • POST /presentation/verify
  • Include created vp.

7) Demo narrative tips

  • Generator now rotates through randomized story mixes (quick, assessment-heavy, instructor-review, discussion, practice).
  • Keep generator running to demonstrate replay-safe persistence as fresh random scenarios arrive.

8) Today demo script (maps to architecture diagram)

  1. Step 1 - quick user/course setup
    • Run generator and call Caliper ingest.
    • Narrate: "Institution systems send learner activity to Caliper endpoint."
  2. Step 2 - context builds up
    • Open learner UX and Load Context with stackBy=day.
    • Show stacked timeline layers increasing as new events are ingested.
  3. Step 3 - opinionated filtering
    • Select subset of credential claims in learner view.
    • Mention policy enforcement: known issuers only + max claims per credential.
  4. Step 4 - download filtered context
    • Generate VP and download JSON.
  5. Step 5 - upload and verify
    • Upload VP on verifier page and run verify.
  6. Step 6 - prove source and tamper checks
    • Show verifier checks and provenance hints in approved content cards.