Skip to content

Development setup

Zentri is one repository. The coordinator and the CLI are Go. The Slack bot and the two web packages are TypeScript. A top-level Makefile is the entry point for all of them, so you rarely run go or pnpm by hand.

Tool Version Needed for
Go The go line in go.mod (1.27) or later Everything
make, git Any recent Everything
Docker with Compose v2 A local engine, with buildx for make release-dry-run make dev, make test-integration, make e2e, make release-dry-run
Node 22.23.4 or later The web packages. The Slack bot needs 22.19 or later.
pnpm The packageManager pin (11.1.1), through corepack enable The Slack bot and the web packages
Google Chrome Installed, not downloaded The web accessibility tests and Lighthouse
shellcheck Any recent make lint
curl, jq, openssl, python3 Any recent make e2e. make release-dry-run needs python3 too.
ssh-keygen OpenSSH 8.1 or later make test-install, make release-dry-run

You do not install golangci-lint, actionlint, or GoReleaser. make lint and make release-dry-run run them with go run at versions pinned in the Makefile.

Turn on corepack once, so pnpm matches each package.json:

Terminal window
corepack enable

Build the two Go binaries. This is the fastest build and needs no Node:

Terminal window
make build-go

It writes bin/zentri, bin/zentri-server, and bin/zt, a symlink to bin/zentri. Each is static, built with CGO_ENABLED=0. Then scripts/check-cgo.sh checks that no dependency needs cgo.

Run Postgres and the coordinator in Docker:

Terminal window
make dev

In another terminal, check that it is ready:

Terminal window
curl -fsS localhost:8080/readyz

The first start prints a bootstrap admin token once, in the server’s output. deploy/.env.example lists the variables Compose reads. Its defaults are for local development only. See Docker Compose.

make help lists every target. These are the ones you use most:

Target What it does
make build build-go, the Slack bot into integrations/slack-bot/dist, and both web packages into web/*/dist
make test Go unit tests with the race detector, the terminal kit’s smoke test, the Slack bot’s Vitest suite, the web tests, and the installer tests
make lint golangci-lint, shellcheck, the license-header check, the OpenShell policy check, ESLint, type checks and Prettier on the TypeScript packages, and actionlint on the workflows
make test-integration The Go tests behind the integration build tag, on Postgres
make e2e One end-to-end script per milestone. Run make build first.
make docs-gen Rewrite the generated reference pages in the docs
make lighthouse Lighthouse CI on both built web packages
make dev Postgres and the coordinator with Docker Compose
make release-dry-run A signed GoReleaser snapshot into dist/, with every artifact checked and installed. Nothing is published. See Release process.
make clean Remove the build output

Each part has its own target too, such as make test-go, make lint-web or make build-slack-bot. See Testing for what each suite covers.

Before you open a pull request, run:

Terminal window
make build test lint

Run make test-integration and make e2e as well when you change the coordinator, the CLI or the database.

The docs are a Starlight site in web/docs. Run it with live reload:

Terminal window
cd web/docs
pnpm install --frozen-lockfile
pnpm dev

pnpm build fails on any broken internal link or anchor. pnpm test fails on a page without a title and a description, or with an em dash. Write internal links as absolute paths with a trailing slash, such as /self-hosting/docker-compose/.

Every .go, .ts, .tsx and .sh file starts with an SPDX header in its first five lines:

  • outside ee/: SPDX-License-Identifier: Apache-2.0
  • inside ee/: SPDX-License-Identifier: LicenseRef-Zentri-Enterprise

scripts/check-license-headers.sh checks this in make lint and in CI.

Every commit carries a Signed-off-by line. With it you certify the Developer Certificate of Origin 1.1: you wrote the change, or you have the right to submit it under the project’s license. Use your real name and email.

Terminal window
git commit -s

CI fails a pull request with any commit that lacks the line. To sign off the commits on your branch, rebase onto the branch you target with --signoff, then force-push:

Terminal window
git rebase --signoff main
git push --force-with-lease

Commits follow Conventional Commits 1.0:

<type>(<scope>): <subject>
  • Types: feat, fix, docs, refactor, perf, test, build, ci, chore, revert.
  • The scope is the area you changed, such as cli, server, deploy, web or ee.
  • Mark a breaking change with ! after the scope, and add a BREAKING CHANGE: footer.

The release notes come from these messages, so write the subject for a user.

  • Keep each pull request to one change.
  • Add or update tests for any behavior you change.
  • Add a line under Unreleased in CHANGELOG.md for any change a user can see.
  • Say whether new code belongs in the Apache-2.0 core or in ee/. The default is the core. See Architecture tour.
  • Write an ADR first for a decision that is hard to reverse. See The ADR process.

Follow CODE_OF_CONDUCT.md. Report a security issue as SECURITY.md describes, never in a public issue.

  • The repository is private for now.
  • There is no root pnpm workspace. Each TypeScript package has its own lockfile and its own pnpm install.
  • make dev, make test-integration and make e2e need a local Docker engine. A remote engine cannot see the bind-mounted files or the 127.0.0.1 ports.