Build your own learning platform
Keep authoring, learners and progress in LearnHouse, and put the learning wherever you want it: a page, your React app, a mobile app, an internal tool.
The building blocks
What people build with it
Every card is a real app built on the LearnHouse API, from full products to small widgets. They are open source, so you can start from the one closest to your idea.
Which one do I need?
They combine well. A common setup is the SDK on your server to list courses and track progress, and
<LearnHouseActivity> in the browser to show the lessons themselves.
AI agents in your app
The Agent API gives your product the agents LearnHouse runs itself: Atlas for staff and automation, and Copilot or custom agents that answer learners from their courses, with citations. Replies stream as typed events (text, tool calls, approvals for risky actions, structured views), and the SDK, React and Vue packages ship a ready chat component.
Let an AI assistant build it
Paste this into Claude, Codex or any coding assistant, fill in the first section, and let it build the first version. For a longer, step-by-step spec, see Build with an agent.
You are building a custom learning platform frontend on top of LearnHouse, used headless.
## What to build
<Describe your product: who it is for, the main screens, the look and feel. Example: "A mobile-first microlearning app for retail staff: today's lesson, a 3-question quiz, a streak.">
## Stack
- Next.js (App Router) + TypeScript. Plain CSS or Tailwind.
- Server-only environment variables: LEARNHOUSE_URL, LEARNHOUSE_TOKEN (an lh_ org API token, optional for public courses), LEARNHOUSE_ORG_SLUG.
- npm packages: @learnhouse/sdk (typed API client) and @learnhouse/react (renders lessons with LearnHouse's own blocks). Install the version that matches the LearnHouse instance.
## Data (server side, with @learnhouse/sdk)
- const lh = createClient({ baseUrl: process.env.LEARNHOUSE_URL, token: process.env.LEARNHOUSE_TOKEN })
- Courses: lh.courses.list(orgSlug, { limit: 50 })
- Course tree (chapters, activities): lh.courses.getMeta(courseUuid, { slim: true })
- A lesson with its content: lh.activities.get(activityUuid)
- Search: lh.search.org(orgSlug, query)
- Media URLs: lh.media.* helpers
- Never send the token to the browser. Fetch in Server Components or route handlers.
## Lessons (client side, with @learnhouse/react)
- Import '@learnhouse/react/styles.css' once.
- Render a lesson fetched on the server: <LearnHouseActivity activity={activity} courseId={courseUuid} baseUrl={LEARNHOUSE_URL} />
- Match the product's look with theme={{ accent, fontFamily, radius, contentWidth }}, and replace blocks with components={{ blockQuiz: MyQuiz }} when needed.
- Use onEvent (load, ready, complete, media...) for analytics and progress.
## Learner state
An lh_ API token acts for the organization, not a learner. Keep progress in your app (localStorage for a prototype, your database for production), or sign learners in to LearnHouse and use lh.trail.completeActivity with their own token.
## Quality bar
Responsive down to 375px, keyboard accessible, real loading/empty/error states, no placeholder text: use the real courses from the API.
Docs: https://docs.learnhouse.app/developersRun the demos locally
git clone https://github.com/learnhouse/headless-examples cd headless-examples && bun install cp .env.example .env.local # set LEARNHOUSE_API_URL and LEARNHOUSE_ORG_SLUG bun dev --port 3100
Point it at your own instance, or at any public LearnHouse organization. The demos fetch on their server, so no token reaches the browser.
Same blocks everywhere
Embeds and the React component render lessons with LearnHouse's own blocks, without starting the editor.
No editor is started to show an activity: the saved document is turned straight into the same block components LearnHouse uses, and each block’s code loads only when the document contains that block.
One version for everything
The SDK and the React component are released with LearnHouse itself, under the same version number.
ghcr.io/learnhouse/appDocker image1.4.3@learnhouse/sdknpm1.4.3@learnhouse/reactnpm1.4.3@learnhouse/vuenpm1.4.3Install the version that matches your self-hosted instance, or the latest one for LearnHouse Cloud. See Versions & releases and the full release history.
Inside LearnHouse
Working on LearnHouse itself rather than on top of it?
- Architecture: how the web app, API and collaboration server fit together.
- Contributing: run the stack locally and open your first pull request.
- Migration: bring courses over from another LMS.
Frequently asked questions
What is a headless LMS?
A headless LMS keeps courses, learners, progress and grading in the learning platform, and lets you build the interface yourself. With LearnHouse you author courses in the LearnHouse editor, then show them in your own website, React or Vue app, mobile app or internal tool through the API, the SDK and the components.
Is LearnHouse an open-source headless LMS?
Yes. The LearnHouse platform is open source under the AGPL-3.0 license, and the developer packages
(@learnhouse/sdk, @learnhouse/react and @learnhouse/vue) are MIT-licensed. You can use LearnHouse Cloud or
self-host it.
Does LearnHouse have React components?
Yes. @learnhouse/react renders LearnHouse activities (pages, quizzes, flipcards, scenarios,
code playgrounds, math, video and PDFs) inside any React 18 or 19 app, including Next.js and Vite.
@learnhouse/vue does the same for Vue 3 and Nuxt.
Is there a TypeScript SDK for the LearnHouse API?
Yes. @learnhouse/sdk is a typed TypeScript and JavaScript client generated from the API schema.
It has no dependencies and runs in browsers, Node, Bun, Deno, edge workers and React Native.
Can I embed LearnHouse courses without writing code?
Yes. Every page, video and PDF activity has an embed code: an iframe you can paste into any website, blog, help center or Notion page.