This guide walks through creating a new app in the CaLab monorepo.
cp -r apps/_template apps/<name>In your new apps/<name>/ directory, find-and-replace these tokens:
| Placeholder | Replace with | Example |
|---|---|---|
app-template |
npm workspace name (lowercase) | caview |
__APP_DISPLAY_NAME__ |
Human-readable name (PascalCase) | CaView |
Files that contain placeholders:
package.json— name (app-template), calab.displayName, calab.descriptionindex.html—<title>src/App.tsx— header title, placeholder text
Also fill in the following calab fields in package.json:
| Field | Description | Example |
|---|---|---|
description |
Short tagline for the app | "Trace visualization" |
longDescription |
One-paragraph app description | "Interactively explore traces..." |
features |
Array of feature strings | ["Feature 1", "Feature 2"] |
status |
"stable", "beta", or "coming-soon" |
"beta" |
screenshot |
Filename of app screenshot (or "") |
"screenshot.png" |
These fields populate the CaLab landing page. Apps with status: "stable" appear first, then "beta", then "coming-soon".
From the repo root:
npm installnpm auto-discovers the new workspace under apps/*.
// package.json (root)
"scripts": {
"typecheck": "tsc -b apps/catune apps/carank apps/<name>"
}npm run dev:<name> # Dev server starts
npm run typecheck # No errors
npm run build:apps # Builds all apps including yoursThe build and deploy scripts auto-discover apps from apps/*/package.json,
so no changes are needed to build-apps.mjs, combine-dist.mjs, or CI.
The template includes @calab/core, @calab/io, and @calab/ui by default.
To add another package (e.g., @calab/compute):
-
package.json — add to
dependencies:"@calab/compute": "*"
-
vite.config.ts — add alias:
'@calab/compute': path.resolve(repoRoot, 'packages/compute/src'),
-
tsconfig.json — add path mapping and reference:
"paths": { "@calab/compute": ["../../packages/compute/src/index.ts"], "@calab/compute/*": ["../../packages/compute/src/*"] }
"references": [ { "path": "../../packages/compute" } ]
-
Run
npm installfrom the root to link the workspace dependency.