LearnHouse Headless Examples
Fifty frontends built on one LearnHouse organization through its public API. Same courses, chapters and lessons everywhere; each demo owns its look and its features end to end.
Lessons are rendered natively from LearnHouse's lesson JSON (no iframes), so quizzes, flashcards, callouts, tables, code, images, video and audio all take on each demo's design.
The demos
Fifty demos in five sections. Products and the industry, embed and AI demos are standalone apps in src/app/<id>; themes are skins over the shared catalog, course and lesson pages in src/app/[theme] and also get org-wide search (/<theme>/search) and a "My learning" page (/<theme>/learning).
The AI & experiments demos run entirely in the browser over the real lesson text (BM25, TF-IDF, the Web Speech API); no language model is involved.
Products
| Route |
Demo |
What it does |
/docs |
Northstar Docs |
Docs site with a ⌘K command palette, per-page table of contents and feedback. |
/onboarding |
Orbit |
An academy admin dashboard with a getting-started checklist and lesson drawer driven by a course. |
/reader |
The Long Read |
Publication-style reader with reading time, progress bar, focus mode and type controls. |
/practice |
Drill |
Pulls every quiz and flashcard out of a course into a spaced-repetition study deck. |
/slides |
Stage |
Turns any course into a keyboard-driven slide deck with speaker view and outline. |
/catalog |
Shelf |
A course storefront with filters by topic, length and level, and rich course pages. |
/cohort |
Cohort |
A cohort schedule that unlocks one chapter a week from a start date you pick. |
/certify |
Certify |
Timed certification exams built from a course\u2019s quizzes, with a pass mark and certificate. |
/daily |
Daily |
One bite-sized lesson card a day, swiped like stories, with a streak to keep. |
/paths |
Paths |
Stitch several courses into a learning path with total time and progress. |
Themes
| Route |
Demo |
What it does |
/products |
LearnyLand |
Neo-brutalist learning portal with a quest map, stars for every quiz and a daily streak. |
/mobile |
Pocket Courses |
iPhone app with tab bar, live search across the org and a “continue learning” home. |
/vr |
Nebula XR |
3D living room with a Vision Pro-style floating window rendering the real lessons. |
/retro |
LEARN.EXE |
CRT terminal you drive with commands: ls, cd, cat, grep, quiz. |
/luxe |
Atelier Académie |
Editorial magazine with an issue contents page, reading times and drop-cap articles. |
/zine |
RISO ZINE |
The catalog as a two-colour risograph zine, misregistration and all. |
/blueprint |
Blueprint |
Courses drafted as engineering blueprints with dimension lines and title blocks. |
/pixel |
PIXEL QUEST |
A four-shade handheld game where every lesson is a level. |
/notebook |
my notebook |
Lined paper, margin doodles and highlighter: a student\u2019s notebook. |
/swiss |
Grid |
Strict International Typographic Style: grid, red, and nothing else. |
Embeds & widgets
| Route |
Demo |
What it does |
/widget |
Course card |
A drop-in course card for any blog post, shown on a sample article with its embed snippet. |
/chatbot |
Huddle bot |
A team-chat bot that posts the lesson of the day and runs quizzes in the thread. |
/digest |
Weekly digest |
A weekly email digest of new lessons, rendered as the email learners receive. |
/extension |
Sidekick |
A browser side panel that keeps your current lesson next to whatever you are reading. |
/wiki |
Wiki block |
A lesson embedded as a live block inside a company wiki page. |
/progress |
Progress widget |
A learning-progress widget for an intranet home page, with assigned courses and due dates. |
/searchbox |
Search box |
A search box any site can add, with instant course and lesson results. |
/quizlet |
Quiz embed |
A single quiz dropped into an article, with its own score and retry. |
/poster |
Poster |
Printable posters with QR codes that open each lesson on a phone. |
/planner |
Study planner |
Plan study sessions across a course and download them as a calendar file. |
AI & experiments
| Route |
Demo |
What it does |
/ask |
Ask the course |
Ask a question and get answers quoted from the lessons, with links to each source. |
/voice |
Voice tutor |
Lessons read aloud, driven by voice commands like \u201cnext\u201d and \u201crepeat\u201d. |
/podcast |
Course radio |
Any course turned into a two-voice audio show with chapters and a waveform. |
/tldr |
TL;DR |
Short summaries and key terms pulled from each lesson\u2019s own sentences. |
/graph |
Concept map |
Courses, chapters, lessons and recurring terms drawn as an explorable graph. |
/gameshow |
Quiz show |
A timed quiz game with lives, streaks and a final score, built from course quizzes. |
/typing |
Typist |
Learn the material by typing it: lesson sentences become typing drills. |
/cloze |
Fill the gap |
Fill-in-the-blank exercises generated from key terms in each lesson. |
/focus |
Focus room |
A focus timer with one lesson in view and short breaks between sessions. |
/wordcloud |
Word map |
The vocabulary of a course as a weighted word map, linked back to lessons. |
Industries
| Route |
Demo |
What it does |
/corporate |
Acme Academy |
Mandatory training with due dates, completion status and a manager view. |
/school |
Maple School |
A class page where a teacher assigns lessons and students see what is due. |
/campus |
Northbridge U |
A campus portal with terms, modules and a weekly timetable. |
/bootcamp |
Forge |
A dark, code-first bootcamp dashboard with sprints and challenges. |
/clinic |
CarePoint CE |
Continuing-education credits for clinicians, with credit hours per course. |
/nonprofit |
Volunteer Hub |
Short training a volunteer finishes before their first shift. |
/retail |
Shift |
Five-minute lessons store staff open on a shared tablet between customers. |
/civic |
CityLearn |
Accessible public training for residents and city staff, plain and high-contrast. |
/creator |
Studio |
A creator\u2019s sales page for their course, with curriculum and preview lessons. |
/factory |
Floor |
A rugged shop-floor kiosk with big buttons and safety checks before each shift. |
The site
/: LearnHouse Headless, the marketing page. Five sliding rows of demo cards with real screenshots; lingering on a card shows what it does.
/how: how to build on LearnHouse Headless: the REST API, rendering lessons in React, embeds, the upcoming SDK, and a brief to paste into Claude, Codex or any coding assistant.
Getting started
Requires Node.js 20+ and Bun (or npm/pnpm/yarn).
bun install
cp .env.example .env.local # then fill in your values
bun dev --port 3100 # 3000 is usually taken by LearnHouse itself
Open http://localhost:3100. The landing page is a switcher: point at a demo to preview a real screenshot of it, click to open it.
To refresh those screenshots after changing a demo, run the dev server and:
PW_PATH=/path/to/node_modules/playwright-core node scripts/capture-previews.mjs # or name ids: docs slides
Screenshots land in public/previews/.
The demos are built and tested against the LearnHouse University courses (LearnHouse Essentials, Course Creation Mastery, AI, Podcasts, Boards, Analytics…), which use every block type: videos, screenshots, quizzes, flashcards and callouts. Point them at any organization; courses with empty lessons simply show an empty-lesson note.
Typography follows the LearnHouse marketing site: Wix Madefor Text, Space Mono and Zilla Slab (Google Fonts via next/font).
Environment variables
| Variable |
Required |
Notes |
LEARNHOUSE_API_URL |
yes |
Your LearnHouse backend, e.g. http://127.0.0.1:1338. |
LEARNHOUSE_API_TOKEN |
no |
An lh_… API token, needed for private or unpublished content. Public courses are read without one. Server-side only, never sent to the browser. |
LEARNHOUSE_ORG_SLUG |
yes |
The organization whose content is shown. |
LEARNHOUSE_ORG_UUID |
no |
Read from the first course when unset. |
NEXT_PUBLIC_EMBED_URL / NEXT_PUBLIC_ORG_SLUG |
no |
LearnHouse frontend used for "Open in LearnHouse" links on assignments and other activity types that need its runtime. |
If you use a token, it needs read rights on courses, chapters, activities and search. Nothing in these demos writes to LearnHouse.
The server caches every upstream response (fresh for 60s, then served stale while it refreshes in the background) and warms all courses on the first visit, so only the very first page load waits on LearnHouse.
How it fits together
src/
lib/
learnhouse.ts Server-only API client: token, 60s in-memory cache, typed calls
api.ts Shared types + helpers (content URLs, reading time, headings, quizzes…)
client.ts Browser hooks: useCourses, useCourse, useCourseContent, useActivity, useSearch…
progress.ts Learner progress in localStorage (see below)
themes.ts Demo registry used by the portal and the theme provider
app/
api/ Route handlers proxying LearnHouse (the browser only talks to these)
page.tsx Portal
[theme]/ Shared pages for the five creative themes
docs/ onboarding/ reader/ practice/ slides/ The product demos
themes/*.css One stylesheet per demo, scoped under html[data-theme="<id>"]
lesson.css Neutral lesson styles, themed through --lh-* CSS variables
components/
lesson/ LessonContent + ActivityBody: native rendering of any activity
API calls used
| This app |
LearnHouse |
GET /api/courses |
GET /api/v1/courses/org_slug/{slug}/page/1/limit/50 |
GET /api/courses/{uuid} |
GET /api/v1/courses/{uuid}/meta (course + chapter/activity tree) |
GET /api/courses/{uuid}/content |
GET /api/v1/activities/{uuid} for every lesson, in parallel |
GET /api/activities/{uuid} |
GET /api/v1/activities/{uuid} |
GET /api/search?q= |
GET /api/v1/search/org_slug/{slug} (courses, lessons, discussions, podcasts) |
GET /api/courses/{uuid}/certifications |
GET /api/v1/certifications/course/{uuid} |
GET /api/content/… |
GET /content/… (thumbnails, lesson images, video, audio, PDFs; supports Range) |
Learner progress
API tokens act for the organization, not for a learner, so a headless frontend owns its learners' state. lib/progress.ts keeps completions, quiz scores, last-opened lessons and streaks in localStorage, one namespace per demo. Swap it for your own user store in a real integration.
Rendering lessons
<ActivityBody> renders any activity: dynamic lessons through <LessonContent> (TipTap JSON → React with lh-* classes), YouTube and hosted video, PDFs. Assignments, SCORM and other types that need LearnHouse's runtime link out to it. Style lessons per demo by setting --lh-text, --lh-accent, --lh-font and friends on a parent element.
License
MIT.