All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
2.1 KiB
2.1 KiB
Contributing to Armature
Development Setup
Requirements: Go 1.23+, Node.js 20+ (for frontend tests), SQLite (local dev).
Build from source:
cd server
go build -o armature .
DB_DRIVER=sqlite DATABASE_URL=/tmp/armature.db ./armature
Docker (recommended):
docker compose up --build
# open http://localhost:3000 (default login: admin / admin)
Data persists in the sb_data named volume. Reset with docker compose down -v.
Project Structure
server/ Go backend (handlers, store, config, auth, workflow engine)
src/js/ Browser SDK and built-in surface JS
packages/ Extension packages (surfaces, libraries, browser extensions)
build.sh Builds each subdirectory into a .pkg archive
docs/ Documentation markdown (served at /api/v1/docs)
k8s/ Kubernetes manifests and Helm chart
Running Tests
Backend: cd server && go test ./...
Frontend: node --test src/js/__tests__/
Code Conventions
- Go: Standard formatting via
gofmt. Handlers inserver/handlers/, persistence inserver/store/. Database access goes through the store interface, never directly from handlers. - Browser JS: Vanilla ES modules + Preact via CDN. No build step for
browser code (except the CM6 editor bundle). SDK lives at
src/js/sw/. - Extensions: IIFE pattern (see
packages/*/js/script.js). Register withsw.renderersorsw.slotsvia thesw:readyevent.
Creating a Package
A package is a ZIP archive (.pkg) containing manifest.json and optional
js/, css/, assets/, and script.star files. The build script
(packages/build.sh) automates this. See docs/PACKAGE-FORMAT.md for the
full manifest spec and docs/TUTORIAL-FIRST-EXTENSION.md for a walkthrough.
Pull Request Process
- Create a feature branch from
main. - Make your changes. Keep commits focused.
- Run both Go and JS test suites and confirm they pass.
- Submit a PR with a clear description of what changed and why.
- Address review feedback, then squash-merge when approved.