An AI-powered learning platform made with motivation and consistency in mind — and gamified by design.
- TypeScript 95.2%
- Python 3.2%
- CSS 1.5%
Add a Script checks section to testing.md covering test_scripts.py, unit_test.py and diagnostics.py, drop the docs-voice note from the index, align the setup install steps with install.py and fix its stale Node and Yarn prerequisite hints. |
||
|---|---|---|
| .husky | ||
| .yarn/releases | ||
| docs | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.local.example | ||
| .gitignore | ||
| .node-version | ||
| .prettierignore | ||
| .yarnrc.yml | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| kubb.config.ts | ||
| LICENSE | ||
| next-env.d.ts | ||
| next.config.ts | ||
| openapi.json | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||
| yarn.lock | ||
OpenLearn Web App
The frontend for OpenLearn, an online learning platform. It is a Next.js App Router application that talks to the Platform API through a session-based proxy, so backend tokens never reach the browser. Lesson content is XML, API clients are generated from the backend OpenAPI contract, and the lesson player runs Python in the browser.
Stack
- Next.js 15 (App Router), React 19, TypeScript in strict mode
- Tailwind CSS
- next-auth v5: credentials provider, JWT sessions
- kubb-generated API client (axios + zod + types) from
openapi.json - fast-xml-parser for lesson content
- Pyodide for the in-browser Python runtime
- Vitest, ESLint and Prettier
Prerequisites
- Node.js 24 (
.node-versionpins24.14.0) - Yarn 4 (pinned in
.yarn/,packageManager: yarn@4.18.0) - The Platform API reachable at
API_URL. The two repositories are siblings:openlearn/andopenlearn-api/; setup is in../openlearn-api/docs/setup.md.
Quick start (local)
yarn install
cp .env.local.example .env.local
yarn dev
The app listens on http://localhost:3000 and proxies API calls to
http://localhost:4000 by default. See docs/setup.md for the
environment reference and the full command list.
Quick start (Docker)
docker compose up -d --build
The frontend service reads .env.local, uses host networking, exposes the app
on :3000 and expects the API on :4000. Start the API stack first.
Commands
yarn dev # dev server with hot reload
yarn build # production build
yarn check # typecheck + lint + unit tests
yarn api:check # regenerate the kubb client and fail on drift
All commands: docs/setup.md#commands.
Documentation
| Doc | Covers |
|---|---|
docs/setup.md |
prerequisites, env vars, local dev, Docker, commands |
docs/architecture.md |
layout, auth, proxy, routes, features, player, AI, admin |
docs/authoring.md |
lesson XML reference and validation |
docs/design.md |
themes, tokens, semantic colour, motion |
docs/testing.md |
test suites, static checks, API drift, manual checks |
scripts/README.md |
Python helper scripts |
AGENTS.md |
machine-facing invariants |
Start at docs/README.md for a task-oriented index.