Repolode
goadesign

goadesign/goa

Design-first Go framework that generates HTTP, gRPC, and JSON-RPC services, clients, and OpenAPI/protobuf specs from one Go contract.

Stars
6,122
Forks
582
Open issues
37
Last commit
3 days ago

What is it?

Goa lets you describe types, operations, and validation rules once in a Go DSL. From that design it generates server and client code for HTTP, gRPC, and JSON-RPC, a CLI client, OpenAPI specifications, and Protocol Buffer definitions. All transports call the same generated service interface, so the API documentation stays in step with the code.

Developers write only the business logic in their own Go files, kept outside the generated gen/ directory. Changing a field or validation rule in the design and regenerating updates handlers, clients, validation, and specs together. The project also provides a coding-agent skill that guides design changes, generation, and verification.

Goa also has a companion project, Goa-AI, for building AI agents and MCP servers that reuse the same type definitions.

Key features

  • 01Generates HTTP, gRPC, and JSON-RPC transports from a single Go design
  • 02Produces Go clients, a CLI client, and request validation automatically
  • 03Outputs OpenAPI specifications and Protocol Buffer definitions
  • 04Supports streaming through WebSocket, SSE, and gRPC streams
  • 05Keeps implementation code separate from generated code

Use cases

  • Building a Go microservice that must expose both REST and gRPC endpoints
  • Keeping OpenAPI docs in sync with a Go API without hand-writing them
  • Letting coding agents change an API by editing a typed contract and regenerating

Quick start

  1. 1

    Install the Goa module (requires Go 1.27.3 or later)

    go get goa.design/goa/v3@latest
  2. 2

    Generate the server and client code from your design

    go run goa.design/goa/v3/cmd/goa gen hello/design
  3. 3

    Create the starter application files

    go run goa.design/goa/v3/cmd/goa example hello/design
  4. 4

    Run the service on port 8000

    go run ./cmd/hello --http-port=8000

Things to know

  • Requires Go 1.27.3 or later.
  • Using gRPC or JSON-RPC requires installing the Protocol Buffer compiler and Go protobuf generators; an HTTP-only first run avoids this.

In collections

Topics

FAQ

What is goa?
Design-first Go framework that generates HTTP, gRPC, and JSON-RPC services, clients, and OpenAPI/protobuf specs from one Go contract. Goa lets you describe types, operations, and validation rules once in a Go DSL. From that design it generates server and client code for HTTP, gRPC, and JSON-RPC, a CLI client, OpenAPI specifications, and Protocol Buffer definitions. All transports call the same generated service interface, so the API documentation stays in step with the code.
Is goa free to use? What license does it have?
goa is open source under the MIT license. Check the license terms before using it in commercial products.
Is goa still maintained?
Actively maintained. The last commit to goa was on Nov 3, 2026.
What can I use goa for?
Building a Go microservice that must expose both REST and gRPC endpoints Keeping OpenAPI docs in sync with a Go API without hand-writing them Letting coding agents change an API by editing a typed contract and regenerating
How do I install goa?
Install the Goa module (requires Go 1.27.3 or later): go get goa.design/goa/v3@latest Generate the server and client code from your design: go run goa.design/goa/v3/cmd/goa gen hello/design Create the starter application files: go run goa.design/goa/v3/cmd/goa example hello/design Run the service on port 8000: go run ./cmd/hello --http-port=8000
Where can I get goa?
The source code and installation instructions are on GitHub: https://github.com/goadesign/goa

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects