- Backend:
go mod,go get - Frontend:
pnpmexclusively (pnpm dlxinstead ofnpx)
- Run everything from the project root — delegate with
just <workspace> <cmd>rather thancd-ing in - Workspaces:
frontend,backend,cli,database(aliasesfe,be,db) - Combined across all four:
just lint,just test,just build,just validate - Every workspace justfile sets
fallback := true, so root recipes still resolve from inside one
just ops <recipe> [args]forwards to the trakrf/infra justfile; barejust opslists what's available- Shortcuts:
just gcp-auth,just psql preview,just logs prod 1h - Cluster/namespace/pod knowledge stays in infra — never reimplement a kubectl incantation here
- Infra checkout is
TRAKRF_INFRA_DIR, else a siblinginfra/; set it in.env.localif yours is elsewhere
- Never push directly to main — all changes via PR
- Never squash merge —
gh pr merge --merge - Branch naming:
<type>/tra-NNNN-slug, e.g.feat/tra-1065-kitting-capability,fix/broken-xyz,chore/...,docs/... - Conventional commits:
feat:,fix:,docs:,chore: - Prefer incremental commits over amending
- Adding a migration requires
just backend migrate-checksums— CI fails without it, and applied migrations are immutable
- Playwright e2e never runs in CI — green CI does not mean e2e passes; run it against preview yourself
- Name specs and tooling for what they do, never for a ticket —
locate-mask-length-variants.spec.ts, nottra-1120-…. Cite the ticket in the file header. Applies todescribeblocks, log prefixes and artifact dirs, since those appear in output - Re-used vs merely re-read — reusable things live in the repo under a behaviour name; point-in-time records go on the ticket, and working notes in
docs/notes/stay untracked (see.gitignore)
ble-mcp-testis test tooling only, never the product path — the app reaches a CS108 solely via browsernavigator.bluetooth- One connection at a time: a running bridge blocks preview/prod hand-testing, and an idle bridge port does not mean the reader is free — see
docs/ble-hardware-access.md
- Opening/updating a PR auto-deploys to
https://app.preview.trakrf.id - See
.github/workflows/sync-preview.ymlfor details
- Go backend, React/TypeScript frontend, TimescaleDB, Go CLI, MQTT ingestion (
mqtt-rpc/) - Architecture context:
README.md,docs/architecture-decisions.md,docs/adr/,docs/logical-schema.md
- Git worktrees live in
.claude/worktrees/(gitignored) — where the nativeEnterWorktreetool writes just bootstrapfirst, backgrounded — generates the gitignoredgo:embedtargets; without itjust validatefails withpattern frontend/dist: no matching files found. Idempotent, near-instant warm- An unbootstrapped tree invalidates verifications — everything fails, so a deliberate-break check proves nothing. Confirm bootstrap ran before believing a failure