https://github.com/goadesign/goa
๐ Goa: Elevate Go API development! ๐ Streamlined design, automatic code generation, and seamless HTTP/gRPC support. โจ
https://github.com/goadesign/goa
api code-generation go goa golang microservices openapi rest swagger
Last synced: 4 days ago
JSON representation
๐ Goa: Elevate Go API development! ๐ Streamlined design, automatic code generation, and seamless HTTP/gRPC support. โจ
- Host: GitHub
- URL: https://github.com/goadesign/goa
- Owner: goadesign
- License: mit
- Created: 2014-12-05T07:17:53.000Z (over 10 years ago)
- Default Branch: v3
- Last Pushed: 2024-05-18T22:30:50.000Z (11 months ago)
- Last Synced: 2024-05-19T22:36:54.547Z (11 months ago)
- Topics: api, code-generation, go, goa, golang, microservices, openapi, rest, swagger
- Language: Go
- Homepage: https://goa.design
- Size: 34.6 MB
- Stars: 5,474
- Watchers: 155
- Forks: 550
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: security/scheme.go
Awesome Lists containing this project
- awesome-go - goadesign/goa - based APIs and microservices in Go|5,159| (Popular)
- favorite-link - Go ไธญๅบไบ่ฎพ่ฎก็ API ๅๅพฎๆๅกใ
- awesome-starred - goadesign/goa - Design-based APIs and microservices in Go (go)
- go-awesome - goa
- awesome-go - Goa - Goa provides a holistic approach for developing remote APIs and microservices in Go. Stars:`5.8K`. (Web Frameworks / Utility/Miscellaneous)
- awesome-go-extra - goa - based APIs and microservices in Go|4826|485|12|2014-12-05T07:17:53Z|2022-08-22T01:08:30Z| (Web Frameworks / Fail injection)
- awesome-discoveries - goa - a framework for building micro-services and REST APIs using a unique design-first approach _(`Go`)_ (DevOps Utilities)
- awesome - goa - Design-based APIs and microservices in Go (Go)
- my-awesome - goadesign/goa - generation,go,goa,golang,microservices,openapi,rest,swagger pushed_at:2025-04 star:5.8k fork:0.6k 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 between code and docs. (Go)
- awesome-arsenal - Goa - ๅบไบ่ฎพ่ฎก็ API ๅๅพฎๆๅกใ (ๆญฆๅจๅบ / ๅ็ซฏ)
- awesome-repositories - goadesign/goa - ๐ Goa: Elevate Go API development! ๐ Streamlined design, automatic code generation, and seamless HTTP/gRPC support. โจ (Go)
- awesomeLibrary - goa - ๐ Goa: Elevate Go API development! ๐ Streamlined design, automatic code generation, and seamless HTTP/gRPC support. โจ (่ฏญ่จ่ตๆบๅบ / go)
README
Goa Design Wizard
Use the Goa Design Wizard to:
- Create Goa designs in seconds
- Review existing designs
- Explore the Goa DSL
(requires a ChatGPT Plus subscription)
# 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:
- **Inconsistency**: Manually maintained docs that quickly fall out of sync with code
- **Wasted effort**: Writing repetitive boilerplate and transport-layer code
- **Painful integrations**: Client packages that need constant updates
- **Design afterthoughts**: Documentation added after implementation, missing key detailsGoa solves these problems by:
- Generating 30-50% of your codebase directly from your design
- Ensuring perfect alignment between design, code, and documentation
- Supporting multiple transports (HTTP and gRPC) from a single design
- Maintaining a clean separation between business logic and transport details## ๐ Key Features
- **Expressive Design Language**: Define your API with a clear, type-safe DSL that captures your intent
- **Comprehensive Code Generation**:
- Type-safe server interfaces that enforce your design
- Client packages with full error handling
- Transport layer adapters (HTTP/gRPC) with routing and encoding
- OpenAPI/Swagger documentation that's always in sync
- CLI tools for testing your services
- **Multi-Protocol Support**: Generate HTTP REST and gRPC endpoints from a single design
- **Clean Architecture**: Business logic remains separate from transport concerns
- **Enterprise Ready**: Supports authentication, authorization, CORS, logging, and more## ๐ 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
```bash
# 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 designimport . "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)## ๐ Documentation
Our completely redesigned documentation site at [goa.design](https://goa.design) provides comprehensive guides and references:
- **[Introduction](https://goa.design/docs/1-introduction/)**: Understand Goa's philosophy and benefits
- **[Getting Started](https://goa.design/docs/2-getting-started/)**: Build your first Goa service step-by-step
- **[Tutorials](https://goa.design/docs/3-tutorials/)**: Learn to create REST APIs, gRPC services, and more
- **[Core Concepts](https://goa.design/docs/4-concepts/)**: Master the design language and architecture
- **[Real-World Guide](https://goa.design/docs/5-real-world/)**: Follow best practices for production services
- **[Advanced Topics](https://goa.design/docs/6-advanced/)**: Explore advanced features and techniques## ๐ ๏ธ Real-World Examples
The [examples repository](https://github.com/goadesign/examples) contains complete, working examples demonstrating:
- **Basic**: Simple service showcasing core Goa concepts
- **Cellar**: A more complete REST API example
- **Cookies**: HTTP cookie management
- **Encodings**: Working with different content types
- **Error**: Comprehensive error handling strategies
- **Files & Upload/Download**: File handling capabilities
- **HTTP Status**: Custom status code handling
- **Interceptors**: Request/response processing middleware
- **Multipart**: Handling multipart form submissions
- **Security**: Authentication and authorization examples
- **Streaming**: Implementing streaming endpoints
- **Tracing**: Integrating with observability tools
- **TUS**: Resumable file uploads implementation## ๐ข Success Stories
*"Goa reduced our API development time by 40% while ensuring perfect consistency between our documentation and implementation. It's been a game-changer for our microservices architecture."* - Lead Engineer at FinTech Company
*"We migrated 30+ services to Goa and eliminated documentation drift entirely. Our teams can now focus on business logic instead of maintaining OpenAPI specs by hand."* - CTO at SaaS Platform
## ๐ค Community & Support
- Join the [#goa](https://gophers.slack.com/messages/goa/) channel on Gophers Slack
- Ask questions on [GitHub Discussions](https://github.com/goadesign/goa/discussions)
- Follow us on [Bluesky](https://goadesign.bsky.social)
- Report issues on [GitHub](https://github.com/goadesign/goa/issues)
- Find answers with the [Goa Guru](https://gurubase.io/g/goa) AI assistant## ๐ฃ What's New
**Jan 2024:** Goa's powerful design DSL is now accessible through the [Goa Design Wizard](https://chat.openai.com/g/g-mLuQDGyro-goa-design-wizard), a specialized AI trained on Goa. Generate service designs through natural language conversations!
**February 2025:** The Goa website has been completely redesigned with extensive new documentation, tutorials, and guides to help you build better services.
## ๐ License
MIT License - see [LICENSE](LICENSE) for details.