@edpire/sdk is the embeddable SDK for delivering, rendering, and grading Edpire assessments from your own application. It’s one npm package with three entry points — pick the ones your integration needs.
The SDK is optional. The simplest integration (Hosted Redirect) needs no SDK at all. Reach for the SDK when you want the assessment to render inside your own page or you’re building a custom learner experience.
The three entry points
| Import | Runs in | Use it for |
|---|---|---|
@edpire/sdk | Browser | Embedded Player (EdpireAssessment.mount()) and Custom Flow helpers (flattenAssessment, renderQuestion, buildSubmitPayload). |
@edpire/sdk/react | Browser (React 19) | React components: EdpireAssessmentPlayer (drop-in player), AssessmentShell (bring your own data), EdpireQuestion (single question for Custom Flow). |
@edpire/sdk/client | Node.js (18+) | Server client (EdpireClient) — list assessments, mint embed tokens, submit, check, manage webhooks. API key never leaves the server. |
<script> / mobile WebViews, use the UMD/CDN build instead — see CSS & CDN and Mobile.
Starter templates
The fastest way to get running — both examples ship inside the@edpire/sdk npm package:
createEdpireTokenHandler + <EdpireAssessmentPlayer> and include a README with a cp .env.example .env → npm install → npm run dev quickstart.
Installation
The SDK is published to the public npm registry — no auth token or.npmrc setup required.
react@^19 and react-dom@^19 (only required if you use @edpire/sdk in the browser or @edpire/sdk/react). The @edpire/sdk/client entry has zero browser dependencies and uses native fetch.
Licensing & security
The package is public and free to install, but it carries a proprietary license: you may use it to integrate with Edpire, not to redistribute it or build a competing product. See theLICENSE in the package.
Being public is safe because the SDK is not Edpire’s security boundary — the server is. The published bundle contains only the question renderer. It never includes:
- Answer keys — stripped from every client-facing payload.
- Grading logic — runs server-side; the SDK doesn’t ship it.
- API keys — stay on your server; the browser only ever holds a short-lived, single-use, origin-scoped embed token.
CSS
The SDK bundles all its styles into its JavaScript and injects them on first render. You normally don’t import any CSS.| Path | Behaviour |
|---|---|
Embedded Player (EdpireAssessment.mount()) | Fully automatic. Nothing to import. |
React components (AssessmentShell, EdpireQuestion) | Automatic — shell.css is imported by the components themselves. |
| Custom Flow, styles missing | Only if inline-style injection is blocked (sandboxed iframe, strict CSP), import the fallback explicitly: import "@edpire/sdk/styles/runtime-utilities.css". |
Next steps
Embedded Player
Drop the full assessment player into your page with one function call.
Custom Flow
Build a Duolingo-style, question-by-question experience.
React components
AssessmentShell and EdpireQuestion prop references.Server client
Every
EdpireClient method, typed.