{"id":13416854,"url":"https://github.com/goadesign/goa","last_synced_at":"2026-02-19T03:03:18.506Z","repository":{"id":24188577,"uuid":"27579614","full_name":"goadesign/goa","owner":"goadesign","description":"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.","archived":false,"fork":false,"pushed_at":"2025-05-05T17:47:46.000Z","size":36966,"stargazers_count":5841,"open_issues_count":18,"forks_count":567,"subscribers_count":152,"default_branch":"v3","last_synced_at":"2025-05-05T18:57:53.146Z","etag":null,"topics":["api","code-generation","go","goa","golang","microservices","openapi","rest","swagger"],"latest_commit_sha":null,"homepage":"https://goa.design","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"eugenp/tutorials","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goadesign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/scheme.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"goadesign","github":["raphael","tchssk"]}},"created_at":"2014-12-05T07:17:53.000Z","updated_at":"2025-05-05T17:47:49.000Z","dependencies_parsed_at":"2024-02-07T22:30:54.415Z","dependency_job_id":"907d9347-7e4a-44d4-b270-99ade174953e","html_url":"https://github.com/goadesign/goa","commit_stats":{"total_commits":2202,"total_committers":124,"mean_commits":"17.758064516129032","dds":"0.48910081743869205","last_synced_commit":"c0ce58b887671197655712e1b2a74b87bc2c71b1"},"previous_names":[],"tags_count":130,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goadesign%2Fgoa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goadesign%2Fgoa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goadesign%2Fgoa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goadesign%2Fgoa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goadesign","download_url":"https://codeload.github.com/goadesign/goa/tar.gz/refs/heads/v3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252561029,"owners_count":21768062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","code-generation","go","goa","golang","microservices","openapi","rest","swagger"],"created_at":"2024-07-30T22:00:23.741Z","updated_at":"2026-02-19T03:03:18.500Z","avatar_url":"https://github.com/goadesign.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://goa.design\"\u003e\n      \u003cimg alt=\"Goa\" src=\"https://goa.design/img/social/goa-banner.png\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/goadesign/goa/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/goadesign/goa.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/goa.design/goa/v3@v3.25.3/dsl?tab=doc\"\u003e\u003cimg alt=\"Go Doc\" src=\"https://img.shields.io/badge/godoc-reference-blue.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/goadesign/goa/actions/workflows/ci.yml\"\u003e\u003cimg alt=\"GitHub Action: Test\" src=\"https://img.shields.io/github/actions/workflow/status/goadesign/goa/test.yml?branch=v3\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/goadesign/goa\"\u003e\u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/goadesign/goa?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"/LICENSE\"\u003e\u003cimg alt=\"Software License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://gurubase.io/g/goa\"\u003e\u003cimg alt=\"Gurubase\" src=\"https://img.shields.io/badge/Gurubase-Ask%20Goa%20Guru-006BFF?style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://chat.openai.com/g/g-mLuQDGyro-goa-design-wizard\"\u003e\u003cimg alt=\"Goa Design Wizard\" src=\"https://img.shields.io/badge/Goa%20Design%20Wizard-ChatGPT-00A67D?logo=openai\u0026logoColor=white\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003c/br\u003e\n    \u003ca href=\"https://goadesign.substack.com\"\u003e\u003cimg alt=\"Substack: Design First\" src=\"https://img.shields.io/badge/Design%20First-Substack-FF6719?logo=substack\u0026logoColor=white\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://gophers.slack.com/messages/goa\"\u003e\u003cimg alt=\"Slack: Goa\" src=\"https://img.shields.io/badge/Goa-Slack-4A154B?logo=slack\u0026logoColor=white\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://bsky.app/profile/goadesign.bsky.social\"\u003e\u003cimg alt=\"Bluesky: Goa Design\" src=\"https://img.shields.io/badge/Goa%20Design-Bluesky-0285FF?logo=bluesky\u0026logoColor=white\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- Removed card; Wizard is now a badge button above --\u003e\n\n# Goa - Design First, Code With Confidence\n\n## Overview\n\nGoa 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.\n\nThe result? Dramatically reduced development time, consistent APIs, and the elimination of the documentation-code drift that plagues traditional development.\n\n## Sponsors\n\n\u003ctable width=\"100%\"\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003cimg width=\"1000\" height=\"0\" /\u003e\n            \u003ca href=\"https://www.incident.io\"\u003e\n                \u003cimg src=\"docs/incidentio.png\" alt=\"incident.io\" width=\"260\" align=\"right\" /\u003e\n            \u003c/a\u003e\n            \u003ch3\u003eincident.io: Bounce back stronger after every incident\u003c/h3\u003e\n            \u003cp\u003e\n                Use our platform to empower your team to run incidents end-to-end. Rapidly fix and\n                learn from incidents, so you can build more resilient products.\n            \u003c/p\u003e\n            \u003ca href=\"https://incident.io\"\u003eLearn more\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\n            \u003cimg width=\"1000\" height=\"0\" /\u003e\n            \u003ca href=\"https://www.speakeasy.com/editor?utm_source=goa+repo\u0026utm_medium=github+sponsorship\"\u003e\n                \u003cimg src=\"docs/speakeasy.png\" alt=\"Speakeasy\" width=\"260\" align=\"right\" /\u003e\n            \u003c/a\u003e\n            \u003ch3\u003eSpeakeasy: Enterprise DevEx for your API\u003c/h3\u003e\n            \u003cp\u003e\n                Our platform makes it easy to create feature-rich production ready SDKs.\n                Speed up integrations and reduce errors by giving your API the DevEx it deserves.\n            \u003c/p\u003e\n            \u003ca href=\"https://www.speakeasy.com/docs/api-frameworks/goa?utm_source=goa+repo\u0026utm_medium=github+sponsorship\"\u003eIntegrate with Goa\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n## Why Goa?\n\nTraditional API development suffers from:\n- **Inconsistency**: Manually maintained docs that quickly fall out of sync with code\n- **Wasted effort**: Writing repetitive boilerplate and transport-layer code\n- **Painful integrations**: Client packages that need constant updates\n- **Design afterthoughts**: Documentation added after implementation, missing key details\n\nGoa solves these problems by:\n- Generating 30-50% of your codebase directly from your design\n- Ensuring perfect alignment between design, code, and documentation\n- Supporting multiple transports (HTTP, gRPC, and JSON-RPC) from a single design\n- Maintaining a clean separation between business logic and transport details\n\n## Key Features\n\n- **Expressive Design Language**: Define your API with a clear, type-safe DSL that captures your intent\n- **Comprehensive Code Generation**:\n  - Type-safe server interfaces that enforce your design\n  - Client packages with full error handling\n  - Transport layer adapters (HTTP/gRPC/JSON-RPC) with routing and encoding\n  - OpenAPI/Swagger documentation that's always in sync\n  - CLI tools for testing your services\n- **Multi-Protocol Support**: Generate HTTP REST, gRPC, and JSON-RPC endpoints from a single design\n- **Clean Architecture**: Business logic remains separate from transport concerns\n- **Enterprise Ready**: Supports authentication, authorization, CORS, logging, and more\n- **Comprehensive Testing**: Includes extensive unit and integration test suites ensuring quality and reliability\n\n## How It Works\n\n```\n┌─────────────┐     ┌──────────────┐     ┌─────────────────────┐\n│ Design API  │────\u003e│ Generate Code│────\u003e│ Implement Business  │\n│ using DSL   │     │ \u0026 Docs       │     │ Logic               │\n└─────────────┘     └──────────────┘     └─────────────────────┘\n```\n\n1. **Design**: Express your API's intent in Goa's DSL\n2. **Generate**: Run `goa gen` to create server interfaces, client code, and documentation\n3. **Implement**: Focus solely on writing your business logic in the generated interfaces\n4. **Evolve**: Update your design and regenerate code as your API evolves\n\n## Quick Start\n\n```bash\n# Install Goa\ngo install goa.design/goa/v3/cmd/goa@latest\n\n# Create a new module\nmkdir hello \u0026\u0026 cd hello\ngo mod init hello\n\n# Define a service in design/design.go\nmkdir design\ncat \u003e design/design.go \u003c\u003c EOF\npackage design\n\nimport . \"goa.design/goa/v3/dsl\"\n\nvar _ = Service(\"hello\", func() {\n    Method(\"say_hello\", func() {\n        Payload(func() {\n            Field(1, \"name\", String)\n            Required(\"name\")\n        })\n        Result(String)\n\n        HTTP(func() {\n            GET(\"/hello/{name}\")\n        })\n    })\n})\nEOF\n\n# Generate the code\ngoa gen hello/design\ngoa example hello/design\n\n# Build and run\ngo mod tidy\ngo run cmd/hello/*.go --http-port 8000\n\n# In another terminal\ncurl http://localhost:8000/hello/world\n```\n\nThe example above:\n1. Defines a simple \"hello\" service with one method\n2. Generates server and client code\n3. Starts a server that logs requests server-side (without displaying any client output)\n\n### JSON-RPC Alternative\n\nFor a JSON-RPC service, simply add a `JSONRPC` expression to the service and\nmethod:\n\n```go\nvar _ = Service(\"hello\" , func() {\n    JSONRPC(func() {\n        Path(\"/jsonrpc\")\n    })\n    Method(\"say_hello\", func() {\n        Payload(func() {\n            Field(1, \"name\", String)\n            Required(\"name\")\n        })\n        Result(String)\n\n        JSONRPC(func() {})\n    })\n}\n```\n\nThen test with:\n```bash\ncurl -X POST http://localhost:8000/jsonrpc \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"method\":\"hello.say_hello\",\"params\":{\"name\":\"world\"},\"id\":\"1\"}'\n```\n\n## Documentation\n\nOur documentation site at [goa.design](https://goa.design) provides comprehensive guides and references:\n\n- **[Introduction](https://goa.design/docs/1-introduction/)**: Understand Goa's philosophy and benefits\n- **[Getting Started](https://goa.design/docs/2-getting-started/)**: Build your first Goa service step-by-step\n- **[Tutorials](https://goa.design/docs/3-tutorials/)**: Learn to create REST APIs, gRPC services, and more\n- **[Core Concepts](https://goa.design/docs/4-concepts/)**: Master the design language and architecture\n- **[Real-World Guide](https://goa.design/docs/5-real-world/)**: Follow best practices for production services\n- **[Advanced Topics](https://goa.design/docs/6-advanced/)**: Explore advanced features and techniques\n\n##  Real-World Examples\n\nThe [examples repository](https://github.com/goadesign/examples) contains complete, working examples demonstrating:\n\n- **Basic**: Simple service showcasing core Goa concepts\n- **Cellar**: A more complete REST API example\n- **Cookies**: HTTP cookie management\n- **Encodings**: Working with different content types\n- **Error**: Comprehensive error handling strategies\n- **Files \u0026 Upload/Download**: File handling capabilities\n- **HTTP Status**: Custom status code handling\n- **Interceptors**: Request/response processing middleware\n- **Multipart**: Handling multipart form submissions\n- **Security**: Authentication and authorization examples\n- **Streaming**: Implementing streaming endpoints (HTTP, WebSocket, JSON-RPC SSE)\n- **Tracing**: Integrating with observability tools\n- **TUS**: Resumable file uploads implementation\n\n## Community \u0026 Support\n\n- Join the [#goa](https://gophers.slack.com/messages/goa/) channel on Gophers Slack\n- Ask questions on [GitHub Discussions](https://github.com/goadesign/goa/discussions)\n- Follow us on [Bluesky](https://goadesign.bsky.social)\n- Report issues on [GitHub](https://github.com/goadesign/goa/issues)\n- Find answers with the [Goa Guru](https://gurubase.io/g/goa) AI assistant\n- Subscribe to our Substack, “Design First”: [Design First](https://goadesign.substack.com/subscribe?params=%5Bobject%20Object%5D)\n\n## What's New\n\n**July 2025:** Goa now includes comprehensive **JSON-RPC 2.0 support** as a\nfirst-class transport alongside HTTP and gRPC! Generate complete JSON-RPC\nservices with streaming support (WebSocket and SSE), client/server code, CLI\ntools, and full type safety - all from a single design.\n\n**February 2025:** The Goa website has been completely redesigned with extensive\nnew documentation, tutorials, and guides to help you build better services.\n\n**Jan 2024:** Goa's powerful design DSL is now accessible through the\n[Goa Design Wizard](https://chat.openai.com/g/g-mLuQDGyro-goa-design-wizard), a\nspecialized AI trained on Goa. Generate service designs through natural language\nconversations!\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","funding_links":["https://patreon.com/goadesign","https://github.com/sponsors/raphael","https://github.com/sponsors/tchssk"],"categories":["Popular","Uncategorized","开源类库","Go","武器库","Misc","Web Frameworks","Microservice","Open source library","TODO:","API tools","语言资源库","HarmonyOS","Web框架","Utility","Service Toolkits","golang","DevOps Utilities"],"sub_categories":["Uncategorized","微服务","后端","Utility/Miscellaneous","Microservices","Threat modelling","go","Windows Manager","实用程序/Miscellaneous","Go","HTTP Clients","Fail injection"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoadesign%2Fgoa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoadesign%2Fgoa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoadesign%2Fgoa/lists"}