Contributing
For contributors and maintainers, this page defines the local development workflow and required quality gates.
Developer quickstart
1. Clone and install workspace dependencies
git clone <repo-url>
cd new_livon
pnpm install
2. Install LIVON in your own app (outside this monorepo)
Server stack:
pnpm add @livon/runtime @livon/schema @livon/node-ws-transport
Client stack:
pnpm add @livon/runtime @livon/client @livon/client-ws-transport
Optional generator CLI:
pnpm add -D @livon/cli
3. Run local development apps in this repository
Run server app:
pnpm -C apps/server dev
Run client app:
pnpm -C apps/client dev
Default local endpoints:
- Client app:
http://127.0.0.1:3001 - Server WS endpoint:
ws://127.0.0.1:3002/ws
Run client API generation watcher:
pnpm -C apps/client gen:client:watch
Run monorepo dev orchestration:
pnpm dev
4. Build and run quality gates
pnpm check:policies
pnpm lint
pnpm typecheck
pnpm test
pnpm build
Single-command Turbo pipeline for packages/apps:
pnpm run ci
5. Run package-local checks during development
Example unit test run:
pnpm -C packages/runtime test:unit
Example integration test run:
pnpm -C apps/server test:integration
Monorepo test run via central Vitest workspace config:
pnpm test
pnpm run test --config vitest.workspace.ts
Coverage example:
pnpm -C packages/schema exec vitest run -c vitest.unit.config.ts --coverage
Packages without test files currently return No test files found for direct test:unit calls.
For local verification in those packages, use:
pnpm -C <package-path> exec vitest run -c vitest.unit.config.ts --passWithNoTests
6. Build and run docs locally
pnpm docs
7. Build only one package while iterating
pnpm -C packages/schema build
pnpm -C packages/runtime build:watch
8. Generate client API manually
pnpm gen node schema
pnpm -C apps/client gen:client
Tooling and build policy
Use default tool configs and standard commands first.
- Prefer native config files such as
rslib.config.ts,rsbuild.config.ts,vitest.*.config.ts,eslint.config.cjs, andtsconfig*.json. - Prefer standard tooling commands (
rslib,rsbuild,vitest,eslint,tsc) in package scripts. - Avoid custom wrapper scripts for normal build, lint, test, and typecheck flows.
- Keep package scripts atomic (single-tool command); orchestration belongs to Turborepo.
Use Turborepo as the monorepo execution layer:
- Cross-package sequencing, caching, and parallelism must be managed in
turbo.json. - Root workflows should call
pnpm run ciinstead of bespoke orchestration scripts.
Custom scripts are acceptable only when standard tooling cannot express required product behavior. When that happens, document the reason in the relevant docs and keep scope minimal.
Before opening a pull request
Run:
pnpm check:policies
pnpm lint
pnpm typecheck
pnpm test
pnpm build
Commit naming convention
Use this commit prefix pattern:
feature:for new user-facing capabilities.improvement:for non-breaking behavior and quality improvements.bug:for defect fixes.refactor:for structural code changes without behavior change.chore:for tooling, docs, config, and maintenance tasks.
Examples:
feature: add runtime explain payload tests
improvement: increase schema branch coverage for operation runner
bug: fix field operation input normalization
refactor: split api subscription normalization helpers
chore: update vitest workspace config
Parameters
The commands above are root quality-gate commands and do not require additional parameters.
For package-local commands:
-C <path>: run command in a specific workspace package/app directory.--filter <workspace-selector>: run command against a selected workspace package.
Update documentation whenever public behavior, API schemas, or workflows change.
For JSDoc @see links, use https://livon.tech as host prefix
to keep links stable against the published docs site.
Rule sources
- Governance and Rule Sources
- Coding Style Guide
- Definition of Done
- Project Context
- Governance Change History
- Getting Started
- Testing and Quality
GitHub Pages deployment
The docs site deploy pipeline is in .github/workflows/docs-pages.yml.
It:
- Installs dependencies with pnpm cache.
- Builds Docusaurus in
website/. - Uploads static output as Pages artifact.
- Deploys to GitHub Pages.
docusaurus.config.ts automatically adapts url and baseUrl in GitHub Actions mode.
Package publishing
Publishing is handled by .github/workflows/publish.yml.
Requirements:
NPM_TOKENrepository secret.- Valid package versions (no duplicate version publish).
- Build passes for all
packages/*. - Version updates are created locally (
pnpm changeset+pnpm changeset:version) and committed tomain. - Publish is executed in CI and starts automatically on
mainwhen.changeset/**or**/CHANGELOG.mdchanges.
Version management is handled with Changesets (fixed version group for all publishable @livon/* packages).
Lockstep versioning policy:
- Every
package.jsonin this repository uses the same version value. - This includes root,
apps/*,packages/*,tools/*, andwebsite. pnpm check:policiesfails if any version deviates from the rootpackage.jsonversion.
pnpm changeset
pnpm changeset:version
pnpm changeset:version runs Changesets versioning and then syncs the root package.json version to the shared workspace version.
The publish workflow uses:
pnpm changeset:publish
CI publish behavior:
Publish Packagescan be started manually via workflow dispatch without any parameters.- Tag handling is owned by Changesets:
- in pre mode (
.changeset/pre.json), Changesets publishes to the pre tag (for examplerc) - outside pre mode, Changesets publishes to
latest
- in pre mode (
- Pipeline always runs
lint,typecheck,test, andbuildbefore publish. - Pushes to
mainthat change.changeset/**or**/CHANGELOG.mdtrigger publish automatically.
Recommended RC publish flow:
- Keep pre mode active (
pnpm dlx @changesets/cli pre enter rconce, then stay in pre mode). - Create release notes with
pnpm changeset. - Apply versions with
pnpm changeset:version. - Commit and push to
main(auto publish), or triggerPublish Packagesmanually.
Recommended stable publish flow:
- Exit pre mode with
pnpm dlx @changesets/cli pre exit. - Create release notes with
pnpm changeset. - Apply versions with
pnpm changeset:version. - Commit and push to
main(auto publish), or triggerPublish Packagesmanually.