For the system overview, see ../README.md. For the documentation map, see README.md.
devices/unit/: self-contained currentunitdevice type, including MCU, board runtime, rig process implementation, AWS shadow contracts, docs, and web detail adapterrig/: standalone Go daemons and host tooling forraspirigsdevices/cloud-mcu/: AWS-hostedcloudrig andcloud-mcuLambda runtimeoffice/: React + Vite admin/operator SPAwww/: public static HTML/CSS/assets site fortxing.devwitness/: Sparkplug-to-shadow projection Lambda source and testsshared/aws/: shared AWS CLI helpers, CloudFormation, and registry utilitiesdevices/template/: scaffold for a new device type using the language-neutral manifest/process/web contracts
Repo-wide tooling:
uvjustjq- AWS CLI v2
- GitHub CLI (
gh) for dispatching release workflows
Host-specific setup starts in installation.md. Detailed board runtime setup, including read-only rootfs, lives in components/board.md.
Release versions are component-scoped under release/versions/. Git SHA and
dirty state are exported separately for diagnostics. Create artifact releases
with just release::build <component> after bumping and pushing the managed
component version files yourself. The recipe dispatches the matching GitHub
Actions workflow from the selected branch. Each workflow reads that branch's
component version file, fails unless it is newer than the latest existing tag
with the same component prefix, and publishes only that component's artifacts.
It does not commit or push version changes back to the selected branch.
After a release workflow finishes, the operator Mac deploys CloudFormation infrastructure changes and then publishes already-built Lambda runtime artifacts with:
just aws::deploy
just release::publish lambdaDevelopment direction for installable host tools and board-side native artifacts:
- release artifacts point at the component artifact built from its
release/versions/<component>value, for examplex.y.z. - GitHub release assets should be immutable for each exact artifact version.
- Board and rig host binaries use mise's GitHub backend directly; Lambda code is uploaded to AWS Lambda from GitHub release assets; see artifacts.md.
- Board and rig binary updates are manual writable-root maintenance actions. The installed systemd service starts offline from root-owned mise shims and does not call GitHub during normal service restart.
latestis component scoped: rig hosts userig-v*, board hosts useunit-v*, and Lambda publishing useslambda-v*. Existing host mise configs are forward-only manual state; replace old configs that do not setversion_prefix = "rig-v"orversion_prefix = "unit-v"before relying onlatest.- The Lambda component version covers Go runtime Lambda artifacts only. Release
builds inject that semver into the Go Lambda binaries, which emit a structured
cold-start log with
version=<release-version>. Python admin Lambdas are deployed with the current CloudFormation stack code through a content-addressedcfn/aws-admin/<sha>.zippackage. - Office tracks its version for Cloudflare Pages metadata only. Bump
release/versions/officeand the managed office package/runtime surfaces, but do not create a GitHub Release or release asset for office.
Native AWS CLI configuration is the source of truth for AWS account,
credentials, selected profile, and region. TXING_AWS_STACK and optional
selected thing IDs come from the operator shell. TXING_AWS_STACK is the
environment prefix; the base CloudFormation stack is
<TXING_AWS_STACK>-aws-base. The wrapper recipes run plain AWS CLI commands:
just aws-town ...just aws-rig ...just aws-device ...
AWS bring-up and destructive rebuild steps live in aws.md.
Web/admin base stack parameters are initialized separately with
just aws::deploy-init; CloudFormation reads the resulting /txing/stack/*
SSM Parameter Store values during aws::deploy. just aws::delete leaves
those manual init parameters in place; just aws::delete-init removes only
those final inputs.
This monorepo uses just at the root.
Common commands:
just --list
just unit::mcu::build
just rig::test
just rig::build
just rig::check <config-dir>
just rig::start <config-dir> true
just rig::stop
just unit::daemon::run
just office::dev
just office::write-env
just aws::deploy
just aws::deploy-town town
just aws::deploy-rig <town-id> raspi server
just aws::deploy-device <rig-id> unit bot
just aws::shadow <thing>
just aws::shadow-reset <thing>Root modules:
rig::...-> generic rig host tooling inrig/justfileunit::...-> current device type tooling indevices/unit/justfileaws::...->shared/aws/justfileoffice::...->office/justfilewitness::...->witness/justfile
Named shadows are selected from the thing's AWS IoT ThingType and the
CloudFormation-managed SSM type catalog under /txing.
Current capabilities:
town:sparkplugraspi:sparkplugcloud:sparkplugunit:sparkplug,ble,power,board,mcp,videocloud-mcu:sparkplug,sqs,power,ecsweather:sparkplug,ble,power,weatherpower:sparkplug,ble,power
There is no device named shadow in the current implementation.
Useful commands:
just aws::shadow <thing>
just aws::shadow <thing> sparkplug
just aws::shadow-reset <thing>
just aws::shadow-reset <thing> mcpaws::shadow-reset deletes the classic unnamed shadow, removes known named
shadows that are not valid for the thing's type catalog capabilities, and
reseeds device named shadows from the default payloads declared in
devices/<type>/manifest.toml.
MCU:
just mcu::check
just unit::mcu::buildRig:
just rig::test
just rig::build
just rig::start <config-dir> true
just rig::log
just rig::stopThat source-checkout rig loop is for development. Production raspi rig hosts
publish GitHub release assets through root-owned mise and systemd via
just release::publish rig. Production cloud rig infrastructure is deployed
through just aws::deploy; its runtime Lambda code is published from GitHub
release artifacts with just release::publish lambda.
Board:
just unit::daemon::run
just unit::daemon::test
just unit::daemon::kvs-build-native
just unit::daemon::kvs-test-native
just unit::daemon::kvs-build-trixie
just unit::daemon::hardware-build-native
just unit::daemon::hardware-test-native
just unit::daemon::hardware-build-trixieThe Go unit daemon loads its default config from
${TXING_DAEMON_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/txing/unit-daemon}/daemon.env
and expects certificate files in the same directory unless explicit certificate
path overrides are supplied. Provision that directory with
just aws::cert <thing-id> only when AWS resource changes are
intended; the recipe renders systemd-compatible daemon.env content from
devices/unit/daemon/daemon.env.template and refuses to overwrite existing
daemon env or certificate material.
The deployed board runtime, MCP/video transport contract, and board install flow are documented in components/board.md.
Office:
just office::install
just office::write-env
just office::devPublic site:
cd www
python3 -m http.server 5174Witness:
just witness::testThe current implementation contracts are: