Skip to content

feat(demo): one-click demo organization that tells the full loop story - #17

Merged
dalpan merged 1 commit into
feature/readiness-dashboardfrom
feature/demo-data
Oct 30, 2026
Merged

dalpan merged 1 commit into
feature/readiness-dashboardfrom
feature/demo-data

Conversation

@dalpan

@dalpan dalpan commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Stacked on #16 (which is stacked on #15). Merge order: #15 → #16 → this; GitHub retargets each PR as its base merges.

Summary

An admin-only Demo data card in Settings loads a fictional organization so the whole product story is visible in one click — for a booth, a judge, or a first look.

What it seeds (org org-demo, sandbox domain demo.test):

  • 12 people; 3 closed click campaigns over ~3 months — report rate 25% → 50% → 75%, click rate 42% → 25% → 8%, median time-to-report falling
  • The remediation loop for every click: 9 assigned → 8 passed → 5 retests passed
  • 24 Inbox Triage runs (d′ improving), risk profiles with authority as the weak spot
  • An attack-surface map for the demo org (and the admin's own workspace, only if empty)

Safety

  • Every record is tagged demo: True; clear removes exactly those, never real data. Map nodes are removed only for the workspaces the demo seeded (tracked in demo_state); an existing admin map is never overwritten.
  • Demo people get a random, discarded password — they cannot log in.
  • Deterministic (random.Random(42)), idempotent reload.
  • demo.load / demo.clear recorded in the hash-chained audit log.

Readiness tweak — the headline report rate and the index now reflect the latest campaign (readiness now); the all-campaign aggregate is shown as context.

Test plan

  • pytest — 215 passed; new tests/test_demo.py: admin-only, story numbers via /api/readiness, idempotent reload, clear leaves real users/map, existing map not overwritten; test_readiness updated for latest-campaign index
  • ruff check / ruff format --check
  • CI=true craco build
  • End to end on the docker stack: loaded via the Settings button, checked the Readiness screen as a demo-org trainer (Playwright screenshot)

🤖 Generated with Claude Code

Admin-only "Demo data" card in Settings (GET/POST/DELETE /api/demo) loads a
fictional organization on the sandbox domain demo.test: 12 people, three
campaigns over three months (report rate 25% -> 50% -> 75%, click rate
42% -> 8%, faster reports), remediation and retests for everyone who
clicked, Inbox Triage results, risk profiles with authority as the weak
spot, and an attack-surface map.

- Deterministic: the same numbers on every load; reloading replaces it.
- Removable: every record is tagged demo: True; clearing never touches
  real data. The admin's own map is only seeded when it is empty, and only
  the maps the demo seeded are removed (tracked in demo_state).
- Demo people get a random, discarded password and cannot log in.
- Load and clear are recorded in the audit log.

Readiness: the headline report rate and the index now use the latest
campaign (readiness now); the all-campaign aggregate stays as context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant