Skip to main content

Start an app package

The starter’s default export is a function from the installer’s choices to app(...):
src/app.ts
commentFunctions declares the tables and functions afresh on each call, so each mount has its own:
src/comments.ts
An app’s contract is its function’s parameters. Take roles, labels and functions as arguments rather than declaring the installer’s choices yourself. Give allow only to what the installer’s callers should reach; everything else stays internal to the mount.

Start a library package

A library is a module, or a function returning a subtree that the including app places in its tree. Its tables and functions take their paths there. A helper that acts takes ctx first and uses the ctx verbs; no library adds a verb to ctx.

Test on the real kernel

Mount the app in a root app and run it on the test kernel:
src/comments.test.ts
See Testing. When you publish a new version, its installers review the change as a bijection.lock diff.