LearnSell dev shell TEST MODE

The whole spine is running locally on a non-WordPress page: core → REST API → SDK → widgets → embed. Core is in-memory and TEST mode. Nothing is deployed.

Wired surface

Prove it from the browser console

// Public catalog (no auth, tenant via publishable-key header):
fetch('http://localhost:8787/api/v1/courses', { headers: { 'X-LearnSell-Tenant': 't_dev' } })
  .then(r => r.json()).then(console.log);

// Log in the seeded student, then list their courses:
fetch('http://localhost:8787/api/v1/auth/login', { method:'POST',
  headers:{'content-type':'application/json','X-LearnSell-Tenant':'t_dev'},
  body: JSON.stringify({ email:'learner@example.com', password:'hunter2' }) })
  .then(r=>r.json()).then(s => fetch('http://localhost:8787/api/v1/my/courses',{headers:{Authorization:'Bearer '+s.token}}))
  .then(r=>r.json()).then(console.log);

Embed contract (live on this page)

The loader tag below is real and running on THIS page — it loads embed.js from this host, which lazy-loads sdk.umd.js + widgets/course-player.umd.js and mounts into the box below (data-core → the API, data-cdn → the built bundles on this host):

<script src="http://localhost:8788/v1/embed.js" async
        data-tenant="t_dev"
        data-widget="course-player"
        data-course="course_0mr4l3u453f20601f3864493c"
        data-core="http://localhost:8787"
        data-cdn="http://localhost:8788/v1"
        data-mode="test"></script>
<div data-learnsell="course-player"></div>

Status: the SDK/embed/widget UMD bundles are built (tsup) and served from /v1/ on this host. The drop-in <script src=embed.js> path is live. Some widget→SDK port methods (free-enrol, quiz fetch) still return a stub until Lane A lands those routes — the load/mount/embed plumbing itself is real.