OpenLearn Web App
- TypeScript 94.5%
- Python 4.4%
- CSS 0.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Wire the previously dead husky config: the pre-commit hook now runs yarn check (typecheck + lint + unit tests), yarn api:check (kubb drift gate on openapi.json and the generated client) and lint-staged (prettier). The core .husky/_ directory stays gitignored. |
||
| .husky | ||
| .yarn/releases | ||
| docs | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.local.example | ||
| .gitignore | ||
| .node-version | ||
| .prettierignore | ||
| .yarnrc.yml | ||
| 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.
Stack
- Next.js 15 (App Router) with React 19, TypeScript in strict mode
- Tailwind CSS
- next-auth v5 — credentials provider, JWT sessions
- kubb-generated API client (axios + zod + types) from the backend
openapi.json - fast-xml-parser for lesson content
- Vitest for unit tests; ESLint and Prettier for code quality
Prerequisites
- Node.js (see
.node-version) - The Platform API running locally — see
../backend/docs/setup.md
Getting started
# Install dependencies
yarn install
# Copy the env file and fill in values
cp .env.local.example .env.local
# Start the dev server
yarn dev
The app runs at http://localhost:3000 and proxies API calls to the backend
at API_URL (default http://localhost:4000).
Environment variables
| Variable | Description |
|---|---|
API_URL |
Backend base URL (default http://localhost:4000) |
AUTH_SECRET |
Secret used to sign session JWTs |
Branding variables (NEXT_PUBLIC_APP_*) and their defaults live in
.env.local.example; see docs/setup.md for the full list.
Scripts
yarn dev # Dev server with hot reload
yarn build # Production build
yarn start # Serve production build
yarn lint # ESLint
yarn typecheck # tsc --noEmit
yarn test # Vitest unit tests
yarn api:generate # Regenerate clients from openapi.json (kubb)
yarn api:validate # Validate openapi.json operationIds
yarn api:check # Regenerate + validate + confirm nothing drifted
yarn format # Prettier write
Project structure
See docs/architecture.md for the feature-first layout, the server/client
boundary, and how the auth session and proxy work.