Goa: services from a design
Define your Go API contract once. Generate HTTP, gRPC, and JSON-RPC servers, typed clients, validation, and OpenAPI 3 specifications.
Goa generates Go service APIs from a single typed Go contract. You declare payloads, validation constraints, error mappings, and HTTP, gRPC, or JSON-RPC transports in design/*.go; goa gen compiles the transport layer, clients, and OpenAPI / Protobuf specs into gen/. You write only the business logic behind a plain Go interface.
- Start in 5 minutes: Build a working HTTP service (
go install goa.design/goa/v3/cmd/goa@latest, requires Go 1.27+) - Using Claude Code, Codex, or Cursor? Follow the coding-agent workflow (
npx skills add goadesign/goa --skill goa-service-designer)
One contract to running endpoint
1. Design the contract (design/catalog.go)
package design
import . "goa.design/goa/v3/dsl"
var LookupPayload = Type("LookupPayload", func() {
Field(1, "sku", String, "Product SKU", func() {
Pattern("^[A-Z0-9-]+$")
Example("BOOK-1")
})
Required("sku")
})
var Product = Type("Product", func() {
Field(1, "sku", String, "Product SKU")
Field(2