You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,9 +253,18 @@ Each board has a workflow defined as a JSON state machine:
253
253
254
254
The workflow engine validates transitions, enforces terminal states, and provides health checks (detecting tasks orphaned in states with no outgoing transitions). Workflows are validated on board creation and replacement.
255
255
256
+
## Versioning
257
+
258
+
All binaries embed a version string from `git describe --tags --always` at build time via ldflags. The `internal/version.Version` variable defaults to `"dev"` if not set.
259
+
260
+
- Server adds `X-TaskFlow-Version` to all response headers
261
+
-`/health` includes `version` in the JSON response
262
+
- MCP reports the version during capability negotiation
263
+
- The httpclient checks the server version on the first request and warns on stderr if versions differ or the header is missing
264
+
256
265
## Authentication and RBAC
257
266
258
-
API keys are SHA-256 hashed and stored with actor records. Three roles:
267
+
API keys are SHA-256 hashed and stored with actor records. Creating an actor via the API generates a random key and returns it once in the response. Keys can be rotated with `PATCH /actors/{name}/rotate-key` — the old key is immediately invalidated. Three roles:
- HTTP API with auth (SHA-256 keys), RBAC, idempotency keys, and batch operations
114
-
-42 domain endpoints (19 Resources + 23 Operations) auto-derived from the model
114
+
-43 domain endpoints (19 Resources + 24 Operations) auto-derived from the model
115
115
- OpenAPI 3.1 spec auto-generated at startup
116
116
- CLI with commands derived from the same model
117
117
- Interactive TUI with kanban, list, workflow graph, and live event stream — see **[TUI Reference](docs/tui.md)**
@@ -208,7 +208,7 @@ Requires Go 1.25+ and [just](https://github.com/casey/just).
208
208
just check # fmt-check + vet + test (full suite)
209
209
just test # unit + integration + QA smoke test (45 endpoint checks)
210
210
just test-unit # unit + integration tests only (no server startup)
211
-
just build # build server + CLI binaries
211
+
just build # build all binaries (server, CLI, TUI, MCP)
212
212
just run # start the server locally
213
213
just fmt # format code
214
214
just seed # generate test database
@@ -222,13 +222,30 @@ just clean # remove build artifacts
222
222
223
223
Set `TASKFLOW_DEV_MODE=true` to disable all rate limiting (useful for testing and development). See [TESTING.md](TESTING.md) for the full manual QA checklist.
224
224
225
-
### Deployment note
225
+
### Releasing
226
+
227
+
```bash
228
+
just release v0.1.2
229
+
```
230
+
231
+
This creates an annotated git tag and pushes it. CI then:
232
+
1. Runs the full test suite
233
+
2. Cross-compiles binaries for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64
234
+
3. Creates a GitHub Release with downloadable archives and auto-generated release notes
235
+
4. Builds and pushes Docker images tagged `:latest`, `:sha`, and `:v0.1.2`
236
+
5. Watchtower deploys the new image to the VPS within 3 minutes
237
+
238
+
To build release archives locally: `just dist` (outputs to `dist/`).
239
+
240
+
### Deployment
226
241
227
242
The server must be hosted at the root of a domain (e.g. `https://taskflow.example.com`). Hosting at a subpath (e.g. `/taskflow`) is not currently supported — the dashboard, OpenAPI spec, and SSE endpoints generate absolute paths without a configurable prefix.
228
243
244
+
All binaries embed a version string from `git describe` at build time. The server exposes it via the `X-TaskFlow-Version` response header and the `/health` endpoint. Clients warn on stderr if their version differs from the server.
245
+
229
246
### Testing with the simulator
230
247
231
-
The activity simulator generates realistic board activity for testing SSE live updates:
248
+
The activity simulator generates realistic board activity for testing live updates:
taskflow actor update <name> [--display_name <name>][--role <role>][--active <bool>]
37
+
taskflow actor get <name>
38
+
taskflow actor update <name> [--display_name <name>][--role <role>][--active <bool>]
39
+
taskflow actor rotate_key <name> # generate new API key (shown once)
39
40
```
40
41
42
+
Creating an actor returns the API key in the response (shown once — save it). Use `rotate_key` to generate a new key if compromised. Use `update --active false` to deactivate an actor (revokes access, preserves audit history).
0 commit comments