Skip to main content

Scripts

Run everything from the repo root. Root scripts fan out to the workspaces with pnpm --filter, so you rarely need to cd into a package. Workspace layout is in Project structure.

pnpm install # install all workspace dependencies

Build

Builds run in dependency order — the library first, since every other artifact consumes it.

ScriptDoes
pnpm buildLibrary, then server and webapp concurrently
pnpm build:libLibrary only (@tumaet/apollon)
pnpm build:serverStandalone server only
pnpm build:webappStandalone webapp only
pnpm build:vscodeVS Code extension plus its webviews
pnpm build:docsLibrary, then the Docusaurus site (static HTML)

Dev

Hot-reload watchers for local development.

ScriptDoes
pnpm devLibrary build watch + server + webapp + local Redis, all concurrent
pnpm dev:libLibrary build watch only
pnpm dev:serverEnsures local Redis, then runs the server under tsx watch
pnpm dev:webappWebapp on Vite HMR
pnpm dev:vscodeVS Code extension build watch
pnpm dev:docsLibrary build, then the Docusaurus dev server

pnpm dev resolves port collisions for the webapp, server, WebSocket relay, and Redis, and starts the Redis container only when no compatible local instance is reachable. Override ports with APOLLON_WEBAPP_PORT, APOLLON_SERVER_PORT, APOLLON_WS_PORT, or APOLLON_REDIS_PORT.

Start

Run a production build locally — assumes pnpm build already ran.

ScriptDoes
pnpm startBuilt server and webapp concurrently
pnpm start:serverBuilt server only
pnpm start:webappBuilt webapp only
pnpm start:webapp:hostWebapp bound to 0.0.0.0 (LAN / device testing)
pnpm start:localdbLocal Redis container via docker/compose.local.db.yml

Lint and format

ScriptDoes
pnpm lintESLint across ui, library, server, webapp, vscode, and docs
pnpm lint:fixESLint with --fix across ui, library, server, webapp, vscode
pnpm formatPrettier write across all supported file types
pnpm format:checkPrettier check only — no writes (used in CI)

Per-workspace variants (lint:ui, lint:lib, lint:server, lint:webapp, lint:vscode, lint:docs, and their lint:fix:* counterparts) exist for narrower runs. lint:docs runs markdownlint-cli2 over the docs Markdown. Type-checking — the Docusaurus config/theme (typecheck) and the doc code examples (check:doc-snippets) — runs separately in CI, not as part of lint.

Test

ScriptDoes
pnpm testLibrary Vitest unit suite
pnpm test:e2eWebapp Playwright end-to-end tests

The webapp and server have their own Vitest suites that the root scripts do not aggregate. Run them per-workspace:

pnpm --filter @tumaet/webapp run test # webapp unit tests
pnpm --filter @tumaet/server run test # server unit tests

Playwright visual regression lives in the webapp workspace — see Visual tests.

Docs

ScriptDoes
pnpm dev:docsLibrary build, then the Docusaurus dev server
pnpm build:docsLibrary build, then the static Docusaurus site
pnpm check:doc-snippetsLibrary build, then type-check the docs' code examples

The docs site is published at https://ls1intum.github.io/Apollon/. The Docusaurus build uses onBrokenLinks: "throw", so a bad internal link fails build:docs.

Doc code examples are type-checked

check:doc-snippets (scripts/check-doc-snippets.mjs) compiles every fenced ts/tsx block in library/README.md, library/THEMING.md, and docs/library/** against the real built @tumaet/apollon types, so a public API change that breaks a documented example fails CI (pr-health-checks) instead of shipping rotten docs. Each block is checked as a standalone module, so it must carry its own imports.

Mark a block no-check in the fence info string to skip it — for bare fragments that reference an undeclared editor, type-signature illustrations, or framework-specific examples (@angular/core, next/dynamic, the resvg ?url wasm import) that can't compile in isolation:

```ts no-check
editor.fitView() // `editor` is illustrative, not declared here
```

The no-check token lives after the language in the info string, which Docusaurus, GitHub, and npm all ignore when rendering — readers never see it. Prefer making a block self-contained (add the imports) over no-check when it's a real copy-paste example.

Capacitor

Mobile shell scaffolding for the webapp. Run these once per platform; see Mobile builds for the full flow.

ScriptDoes
pnpm capacitor:add:androidAdd the Android platform
pnpm capacitor:add:iosAdd the iOS platform
pnpm capacitor:syncSync web assets into native shells
pnpm capacitor:open:androidOpen Android Studio
pnpm capacitor:open:iosOpen Xcode
pnpm capacitor:assets:generate:androidGenerate Android icons / splash
pnpm capacitor:assets:generate:iosGenerate iOS icons / splash

Release and packaging

Releases run on GitHub Actions — there are no local publish scripts. Cut a release by merging the Version Packages PR that release.yml opens from the accumulated changesets; the library, the standalone images and the VS Code extension advance together. See npm publishing. pnpm package:vscode builds a local .vsix for the VS Code extension.

ScriptDoes
pnpm changesetRecord a changelog entry for a user-visible PR

Writing rules: Release notes.

Before opening a PR

The pull-request checklist (lint, format check, build, test) lives in the Contributor overview.