Arc for Go
Arc for Go is the Go port of Cratis Arc’s HTTP CQRS framework. Without these foundation packages, each application must recreate Arc’s routes, scalar codecs and result envelopes; with them, you share those contracts explicitly.
Start with your first running application. Go 1.26 or later is required. This experimental port supports backend pipelines, snapshot and observable HTTP hosting, identity, and protected discovery. Typed Go adapters and bounded TypeScript model/command/snapshot/observable-query proxies are available, alongside optional Chronicle integration and MongoDB snapshots and source-only watches. The generated observable Node case exercises default WebSocket hub/Delta behavior with an independent collection consumer. A separate bounded mounted React lane executes real generated hook reconstruction, cache reuse and joined cleanup with explicit WebSocket/Delta providers. This is not browser/DOM/StrictMode or full Arc-wrapper parity; suspense, reconnect, server paging, setter correctness and 30-second expiry remain unverified. MongoDB watches require explicit close/join/reopen after terminal loss; see the Partial provider profiles and limits. Opaque provider-source generation, Chronicle watches, and OpenAPI remain unsupported. Constructing metadata or a result alone does not execute business code; the application builder compiles the HTTP endpoints.
The paired snapshot HTTP checkpoint compares 36 GET/QUERY requests against pinned C# Arc: 34 strict matches and two exact ordinary-list paging-metadata allowances. This remains Partial; commands, authentication, HEAD, providers, streams and browsers are outside that pair.
Inspect a command route and result
Section titled “Inspect a command route and result”This is the body of the compiled Example. It uses packages
metadata, concepts and commands under github.com/cratis/arc.go, plus fmt.
command := metadata.Command{Type: metadata.TypeName{ Namespace: "Tasks.Registration", Name: "RegisterTask",}}catalog := metadata.Catalog{ Version: metadata.Version, Commands: []metadata.Command{command},}routes, err := metadata.Resolve(catalog, metadata.DefaultOptions())if err != nil { fmt.Println(err) return}id, err := concepts.ParseUUID("00112233-4455-4677-8899-aabbccddeeff")if err != nil { fmt.Println(err) return}result := commands.WithResponse(id, struct { ID string `json:"id"`}{ID: "a1"})response, present := result.Response()fmt.Println(routes[0].Method, routes[0].Path)fmt.Println(result.StatusCode(), response.ID, present)Output:
POST /api/tasks/registration/register-task200 a1 trueChoose a contract
Section titled “Choose a contract”- Concepts and JSON values: UUIDs, dates, ticks and missing/null input.
- Command results: success, rejection and response presence.
- Query results: readiness, paging and change-set values.
- Validation findings: severities and machine-readable reasons.
- Routes and stable identities: explicit metadata and collision diagnostics.
- Generate adapters and proxies: typed Go wiring and bounded TypeScript publication.
- Parity ledger: pinned sources, executable evidence and deliberate differences.
Publication
Section titled “Publication”After the first tagged release, use go get github.com/cratis/arc.go@latest.
The planned release series is v0.x; experimental APIs may change between minor
releases. See the contribution guide and
release policy. Foundation fixtures and Go-owned hosting tests do not certify full-product,
paired .NET or browser parity. Central documentation-site integration remains separate.