# Build your own learning platform

> Use LearnHouse as an open-source headless LMS: embed lessons anywhere, render courses in React or Vue, or build your own learning app on the SDK and REST API.

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

- [Embed](https://docs.learnhouse.app/developers/embed): paste an iframe of any activity into another site.
- [React component](https://docs.learnhouse.app/developers/react): render activities in a React app with `@learnhouse/react`.
- [Vue component](https://docs.learnhouse.app/developers/vue): the same in Vue with `@learnhouse/vue`.
- [SDK](https://docs.learnhouse.app/developers/sdk): typed JavaScript/TypeScript client for the API.
- [REST API & webhooks](https://docs.learnhouse.app/developers/api): every endpoint, from any language.

## 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.

**Products**

- [Help Center](https://docs.learnhouse.app/demos/docs): Docs site with a ⌘K command palette, per-page table of contents and feedback.
- [In-app Onboarding](https://docs.learnhouse.app/demos/onboarding): An academy admin dashboard with a getting-started checklist and lesson drawer driven by a course.
- [Reader](https://docs.learnhouse.app/demos/reader): Publication-style reader with reading time, progress bar, focus mode and type controls.
- [Practice](https://docs.learnhouse.app/demos/practice): Pulls every quiz and flashcard out of a course into a spaced-repetition study deck.
- [Slides](https://docs.learnhouse.app/demos/slides): Turns any course into a keyboard-driven slide deck with speaker view and outline.
- [Shelf](https://docs.learnhouse.app/demos/catalog): A course storefront with filters by topic, length and level, and rich course pages.
- [Cohort](https://docs.learnhouse.app/demos/cohort): A cohort schedule that unlocks one chapter a week from a start date you pick.
- [Certify](https://docs.learnhouse.app/demos/certify): Timed certification exams built from a course’s quizzes, with a pass mark and certificate.
- [Daily](https://docs.learnhouse.app/demos/daily): One bite-sized lesson card a day, swiped like stories, with a streak to keep.
- [Paths](https://docs.learnhouse.app/demos/paths): Stitch several courses into a learning path with total time and progress.

**Themes**

- [Kids](https://docs.learnhouse.app/demos/kids): Neo-brutalist learning portal with a quest map, stars for every quiz and a daily streak.
- [Mobile App](https://docs.learnhouse.app/demos/mobile): iPhone app with tab bar, live search across the org and a “continue learning” home.
- [VR Experience](https://docs.learnhouse.app/demos/vr): 3D living room with a Vision Pro-style floating window rendering the real lessons.
- [Retro Terminal](https://docs.learnhouse.app/demos/retro): CRT terminal you drive with commands: ls, cd, cat, grep, quiz.
- [Luxury Magazine](https://docs.learnhouse.app/demos/luxe): Editorial magazine with an issue contents page, reading times and drop-cap articles.
- [Riso Zine](https://docs.learnhouse.app/demos/zine): The catalog as a two-colour risograph zine, misregistration and all.
- [Blueprint](https://docs.learnhouse.app/demos/blueprint): Courses drafted as engineering blueprints with dimension lines and title blocks.
- [Pixel Quest](https://docs.learnhouse.app/demos/pixel): A four-shade handheld game where every lesson is a level.
- [Notebook](https://docs.learnhouse.app/demos/notebook): Lined paper, margin doodles and highlighter: a student’s notebook.
- [Grid](https://docs.learnhouse.app/demos/swiss): Strict International Typographic Style: grid, red, and nothing else.

**Embeds & widgets**

- [Course card](https://docs.learnhouse.app/demos/widget): A drop-in course card for any blog post, shown on a sample article with its embed snippet.
- [Huddle bot](https://docs.learnhouse.app/demos/chatbot): A team-chat bot that posts the lesson of the day and runs quizzes in the thread.
- [Weekly digest](https://docs.learnhouse.app/demos/digest): A weekly email digest of new lessons, rendered as the email learners receive.
- [Sidekick](https://docs.learnhouse.app/demos/extension): A browser side panel that keeps your current lesson next to whatever you are reading.
- [Wiki block](https://docs.learnhouse.app/demos/wiki): A lesson embedded as a live block inside a company wiki page.
- [Progress widget](https://docs.learnhouse.app/demos/progress): A learning-progress widget for an intranet home page, with assigned courses and due dates.
- [Search box](https://docs.learnhouse.app/demos/searchbox): A search box any site can add, with instant course and lesson results.
- [Quiz embed](https://docs.learnhouse.app/demos/quizlet): A single quiz dropped into an article, with its own score and retry.
- [Poster](https://docs.learnhouse.app/demos/poster): Printable posters with QR codes that open each lesson on a phone.
- [Study planner](https://docs.learnhouse.app/demos/planner): Plan study sessions across a course and download them as a calendar file.

**AI & experiments**

- [Ask the course](https://docs.learnhouse.app/demos/ask): Ask a question and get answers quoted from the lessons, with links to each source.
- [Voice tutor](https://docs.learnhouse.app/demos/voice): Lessons read aloud, driven by voice commands like “next” and “repeat”.
- [Course radio](https://docs.learnhouse.app/demos/podcast): Any course turned into a two-voice audio show with chapters and a waveform.
- [TL;DR](https://docs.learnhouse.app/demos/tldr): Short summaries and key terms pulled from each lesson’s own sentences.
- [Concept map](https://docs.learnhouse.app/demos/graph): Courses, chapters, lessons and recurring terms drawn as an explorable graph.
- [Quiz show](https://docs.learnhouse.app/demos/gameshow): A timed quiz game with lives, streaks and a final score, built from course quizzes.
- [Typist](https://docs.learnhouse.app/demos/typing): Learn the material by typing it: lesson sentences become typing drills.
- [Fill the gap](https://docs.learnhouse.app/demos/cloze): Fill-in-the-blank exercises generated from key terms in each lesson.
- [Focus room](https://docs.learnhouse.app/demos/focus): A focus timer with one lesson in view and short breaks between sessions.
- [Word map](https://docs.learnhouse.app/demos/wordcloud): The vocabulary of a course as a weighted word map, linked back to lessons.

**Industries**

- [Acme Academy](https://docs.learnhouse.app/demos/corporate): Mandatory training with due dates, completion status and a manager view.
- [Maple School](https://docs.learnhouse.app/demos/school): A class page where a teacher assigns lessons and students see what is due.
- [Northbridge U](https://docs.learnhouse.app/demos/campus): A campus portal with terms, modules and a weekly timetable.
- [Forge](https://docs.learnhouse.app/demos/bootcamp): A dark, code-first bootcamp dashboard with sprints and challenges.
- [CarePoint CE](https://docs.learnhouse.app/demos/clinic): Continuing-education credits for clinicians, with credit hours per course.
- [Volunteer Hub](https://docs.learnhouse.app/demos/nonprofit): Short training a volunteer finishes before their first shift.
- [Shift](https://docs.learnhouse.app/demos/retail): Five-minute lessons store staff open on a shared tablet between customers.
- [CityLearn](https://docs.learnhouse.app/demos/civic): Accessible public training for residents and city staff, plain and high-contrast.
- [Studio](https://docs.learnhouse.app/demos/creator): A creator’s sales page for their course, with curriculum and preview lessons.
- [Floor](https://docs.learnhouse.app/demos/factory): A rugged shop-floor kiosk with big buttons and safety checks before each shift.

## 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](https://docs.learnhouse.app/developers/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](https://docs.learnhouse.app/guides/build-learning-platform/with-an-agent).

```
You are building a custom learning platform frontend on top of LearnHouse, used headless.

## What to build

## 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: 
- 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/developers
```

## Run the demos locally

```bash
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.

## One version for everything

The SDK and the React component are released with LearnHouse itself, under the same version number.

> Install the version that matches your self-hosted instance, or the latest one for LearnHouse Cloud. See
> [Versions & releases](https://docs.learnhouse.app/developers/versioning) and the full [release history](https://docs.learnhouse.app/releases).

## Inside LearnHouse

Working on LearnHouse itself rather than on top of it?

- [Architecture](https://docs.learnhouse.app/developers/architecture): how the web app, API and collaboration server fit together.
- [Contributing](https://docs.learnhouse.app/developers/contributing): run the stack locally and open your first pull request.
- [Migration](https://docs.learnhouse.app/developers/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`](https://docs.learnhouse.app/developers/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`](https://docs.learnhouse.app/developers/vue) does the same for Vue 3 and Nuxt.

### Is there a TypeScript SDK for the LearnHouse API?

Yes. [`@learnhouse/sdk`](https://docs.learnhouse.app/developers/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](https://docs.learnhouse.app/developers/embed): an iframe you can paste into any
website, blog, help center or Notion page.
