Contributing
Local dev setup
git clone https://github.com/manykarim/lernkit.git
cd lernkit
pnpm install
pnpm install runs the post-install scripts that vendor Pyodide and the RF
libdocs into apps/docs/public/. Expect ~30 seconds extra the first time.
Common commands
| Command | Purpose |
|---|---|
pnpm dev | All packages in watch mode (turbo) |
pnpm --filter=@lernkit/docs dev | Just the rf-training course site |
pnpm --filter=@lernkit/website dev | Just this docs site |
pnpm test | Vitest across all packages |
pnpm typecheck | tsc + astro check across the workspace |
pnpm lint | Biome check (read-only) |
pnpm lint:fix | Biome check + auto-fix |
pnpm build | Build everything (turbo) |
pnpm build:scorm12 | Build the docs course site + package as SCORM |
Repo layout
See Architecture → Repo layout.
Adding an ADR
- Pick the next number in
docs/adr/(e.g.,0025-…). - Copy the most recent ADR as a template.
- Fill in Status (proposed → accepted), Context, Decision, Consequences.
- Open a PR. The ADR loader plugin picks it up on next build.
Adding a new package
- Create
packages/<name>/withpackage.json,tsconfig.json(extends@lernkit/config/tsconfig.base),src/index.ts. - Add to
pnpm-workspace.yamlis automatic (the glob includespackages/*). - Add tests; mirror the layout of
packages/tracker/for the simplest case orpackages/packagers/for one with assets. - If exposing an API surface, ensure
src/index.tshas/** */summaries on every exported symbol — the TypeDoc plugin generates the API reference from these.
Releasing
Phase 1 stub
The release process (changesets vs manual tags) is being decided.
For now, commits land on main; tags trigger nothing automatic yet.
Code style
- Biome for formatting and linting. Run
pnpm lint:fixbefore committing. - TypeScript strict mode including
noUncheckedIndexedAccess. Array access yieldsT | undefined; handle theundefinedcase. - No emojis in source files unless in user-visible UI strings or doc pages.
- Comments explain why, not what. Well-named code self-documents the what; comments are for non-obvious context.