Internal documentation — not for external distribution.

Build Commands

All tools Bazel-managed. No host Go, Node, Docker, or npm required — only Bazelisk.

Planekeeper lives at go/planekeeper/ inside the rhoat/client-sites monorepo.

Quick Reference

CommandDescription
bazel build //go/planekeeper/...Build all Go targets (98 targets)
bazel test //go/planekeeper/...Run all tests (29 targets)
bazel run //toolchains/golangci-lint -- run ./planekeeper/...Lint
bazel build //containers/planekeeper/...Build all 9 container images
bazel run //containers/planekeeper:server_loadLoad server image into local Docker
bazel run --config=release //containers/planekeeper:server_pushPush to ghcr.io with git tag
bazel run //hugo/planekeeper-docs:serveServe public docs locally
bazel run //hugo/planekeeper-internal-docs:serveServe internal docs locally
bazel run //hugo/planekeeper-docs:deployDeploy public docs to Cloudflare Pages
bazel run //hugo/planekeeper-internal-docs:deployDeploy internal docs to Cloudflare Pages

Build and Test

bazel build //go/planekeeper/...         # Build all binaries + libraries
bazel test //go/planekeeper/...          # Run all 29 test targets
bazel run //go/planekeeper/app/server    # Run server binary locally

Lint

bazel run //toolchains/golangci-lint -- run ./planekeeper/...

Code Generation

Generated code checked in. Run manually when specs/schemas change, verify freshness with git diff --exit-code.

# OpenAPI (server + client + routes)
bazel run //toolchains/redocly -- bundle openapi/planekeeper/openapi.yaml \
    -o openapi/planekeeper/openapi.bundled.yaml --ext yaml
bazel run //toolchains/oapi-codegen -- \
    -config openapi/planekeeper/codegen-server.yaml \
    openapi/planekeeper/openapi.bundled.yaml
bazel run //toolchains/oapi-codegen -- \
    -config openapi/planekeeper/codegen-client.yaml \
    openapi/planekeeper/openapi.bundled.yaml
rm openapi/planekeeper/openapi.bundled.yaml
bazel run //go/planekeeper/hack/dev/tools/gen-routes

# Database access layer
bazel run //toolchains/sqlc -- generate -f go/planekeeper/pkg/storage/sqlc.yaml

# Templ HTML templates
bazel run //toolchains/templ -- generate -f go/planekeeper/internal/templates/

# Stringer
bazel run @rules_go//go -- -C go generate ./planekeeper/pkg/version/...

Container Images

9 services, each cross-compiled to linux/amd64 + arm64 on distroless base.

bazel build //containers/planekeeper/...                          # Build all images
bazel run //containers/planekeeper:server_load                    # Load into local Docker
bazel run --config=release //containers/planekeeper:server_push   # Push with git tag

Documentation

Public docs at docs.planekeeper.com, internal docs at internal-docs.planekeeper.com (GitHub OAuth gated).

bazel build //hugo/planekeeper-docs:build                # Build public docs
bazel build //hugo/planekeeper-internal-docs:build       # Build internal docs
bazel run //hugo/planekeeper-docs:serve                  # Local dev server
bazel run //hugo/planekeeper-internal-docs:serve         # Local dev server
bazel run //hugo/planekeeper-docs:deploy                 # Deploy to Cloudflare Pages
bazel run //hugo/planekeeper-internal-docs:deploy        # Deploy to Cloudflare Pages

Toolchain Versions

bazel run //go/toolchain-updater -- list       # Current vs latest for all toolchains
bazel run //go/toolchain-updater -- check      # Exit 1 if anything stale
bazel run //go/toolchain-updater -- update --all --dry-run

sqlc and templ managed by toolchain-updater. oapi-codegen pinned by go/go.mod. Never hand-edit version constants in toolchains/*/.

CI

ci/build.sh runs on PR:

  1. bazel build //hugo/... — all Hugo sites
  2. bazel build //go/planekeeper/... — all Go targets
  3. bazel test //go/planekeeper/... — full test suite
  4. bazel build //containers/planekeeper/... — all container images
  5. bazel run //toolchains/golangci-lint -- run ./planekeeper/... — lint

Gazelle (BUILD file generation)

After adding/changing Go deps:

bazel run //:gazelle                    # Regenerate BUILD files
bazel run //:gazelle -- update-repos    # Update MODULE.bazel deps

Don’t hand-edit go_library/go_binary/go_test — Gazelle manages them.

Terraform (infrastructure)

bazel run //terraform/cloudflare:plan    # Preview changes
bazel run //terraform/cloudflare:apply   # Apply (prompts for yes)

Manages: Cloudflare Pages projects, DNS, GitHub OAuth Access for internal docs.