goa is a free, open source api development & testing project written in Go and released under MIT. It has 6,101 GitHub stars, 583 forks and 38 open issues, and was last pushed 22 hours ago. On this registry it ranks #36 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 1 stars over the last 3 tracked days.

What is goa?

What it is

Goa is a design-first framework for building APIs and microservices in Go. It lives in the Go ecosystem and is distributed under the MIT license, with a repository that has been active for roughly twelve years and currently carries about 6,100 stars, 583 forks, and 38 open issues. Instead of writing transport and boilerplate code by hand, a developer expresses the intent of an API in a type-safe domain-specific language, and Goa generates the server interfaces, client packages, transport adapters, and documentation from that single design. The project describes itself as generating between 30 and 50 percent of a codebase directly from the design.

The concrete problem it solves is drift. In traditional API development, documentation is written after implementation and falls out of sync, client packages need constant manual updates, and transport-layer code is repeated for every service. Goa addresses this by making the design the source of truth: code, OpenAPI/Swagger documentation, and clients are all produced from the same definition, so they stay aligned as the API evolves. It also keeps business logic separate from transport concerns, so the same design can be served over more than one protocol.

Key capabilities

  • Expressive, type-safe DSL for defining services, methods, payloads, and results.
  • Code generation of type-safe server interfaces that enforce the design.
  • Client package generation with full error handling.
  • Transport layer adapters for HTTP, gRPC, and JSON-RPC, including routing and encoding.
  • OpenAPI/Swagger documentation generated in sync with the design.
  • CLI tools for testing generated services.
  • Support for authentication, authorization, CORS, and logging.

Who uses it and how

  • Teams building microservices in Go that need consistent HTTP and gRPC endpoints from one definition.
  • Developers who want generated client packages so integrations do not require manual updates.
  • Projects that need OpenAPI/Swagger documentation kept aligned with the implementation.
  • Services that require authentication, authorization, CORS, or logging handled at the transport layer.
  • Workflows where the design is updated and code is regenerated as the API evolves.

Getting started

Install the CLI with go install goa.design/goa/v3/cmd/goa@latest, define a service in a design package, then run goa gen and goa example to produce the code. The generated server is run with go run, for example go run cmd/hello/*.go --http-port 8000.

When to use it — and when not to

Goa is a fit when a Go team wants design, code, and documentation to stay aligned across HTTP, gRPC, and JSON-RPC without maintaining each by hand. A self-hoster must operate

project readme (upstream, from github) — read inline

Goa

Release Go Doc GitHub Action: Test Go Report Card Software License Gurubase Goa Design Wizard
Substack: Design First Slack: Goa Bluesky: Goa Design

Goa - Design First, Code With Confidence

Overview

Goa transforms how you build APIs and microservices in Go with its powerful design-first approach. Instead of writing boilerplate code, you express your API's intent through a clear, expressive DSL. Goa then automatically generates production-ready code, comprehensive documentation, and client libraries—all perfectly aligned with your design.

The result? Dramatically reduced development time, consistent APIs, and the elimination of the documentation-code drift that plagues traditional development.

Sponsors

incident.io: Bounce back stronger after every incident

Use our platform to empower your team to run incidents end-to-end. Rapidly fix and learn from incidents, so you can build more resilient products.

Learn more

Speakeasy: Enterprise DevEx for your API

Our platform makes it easy to create feature-rich production ready SDKs. Speed up integrations and reduce errors by giving your API the DevEx it deserves.

Integrate with Goa

Why Goa?

Traditional API development suffers from:

Goa solves these problems by:

Key Features

How It Works

┌─────────────┐     ┌──────────────┐     ┌─────────────────────┐
│ Design API  │────>│ Generate Code│────>│ Implement Business  │
│ using DSL   │     │ & Docs       │     │ Logic               │
└─────────────┘     └──────────────┘     └─────────────────────┘
  1. Design: Express your API's intent in Goa's DSL
  2. Generate: Run goa gen to create server interfaces, client code, and documentation
  3. Implement: Focus solely on writing your business logic in the generated interfaces
  4. Evolve: Update your design and regenerate code as your API evolves

Quick Start

# Install Goa
go install goa.design/goa/v3/cmd/goa@latest

# Create a new module
mkdir hello && cd hello
go mod init hello

# Define a service in design/design.go
mkdir design
cat > design/design.go << EOF
package design

import . "goa.design/goa/v3/dsl"

var _ = Service("hello", func() {
    Method("say_hello", func() {
        Payload(func() {
            Field(1, "name", String)
            Required("name")
        })
        Result(String)

        HTTP(func() {
            GET("/hello/{name}")
        })
    })
})
EOF

# Generate the code
goa gen hello/design
goa example hello/design

# Build and run
go mod tidy
go run cmd/hello/*.go --http-port 8000

# In another terminal
curl http://localhost:8000/hello/world

The example above:

  1. Defines a simple "hello" service with one method
  2. Generates server and client code
  3. Starts a server that logs requests server-side (without displaying any client output)

JSON-RPC Alternative

For a JSON-RPC service, simply add a JSONRPC expression to the service and method:

var _ = Service("hello" , func() {
    JSONRPC(func() {
        Path("/jsonrpc")
    })
    Method("say_hello", func() {
        Payload(func() {
            Field(1, "name", String)
            Required("name")
        })
        Result(String)

        JSONRPC(func() {})
    })
}

Then test with:

curl -X POST http://localhost:8000/jsonrpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"hello.say_hello","params":{"name":"world"},"id":"1"}'

Documentation

Our documentation site at goa.design provides comprehensive guides and references:

Using a coding agent with Goa? See skills/ for reusable Agent Skills that help agents follow Goa's design-first workflow in application repositories.

Real-World Examples

The examples repository contains complete, working examples demonstrating:

readme truncated — read the full docs on github

Frequently asked questions

Is goa free to use?

goa is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does goa do?

Design-first Go framework that generates API code, documentation, and clients. Define once in an elegant DSL, deploy as HTTP and gRPC services with zero drift b

What is goa written in?

goa is primarily written in Go. Its source is publicly available at https://github.com/goadesign/goa, and it has 6,101 GitHub stars.