{"id":13590387,"url":"https://github.com/cloudwego/biz-demo","last_synced_at":"2025-05-15T20:03:58.205Z","repository":{"id":61839407,"uuid":"511801052","full_name":"cloudwego/biz-demo","owner":"cloudwego","description":"Business Demo for CloudWeGo","archived":false,"fork":false,"pushed_at":"2025-03-25T13:23:19.000Z","size":18226,"stargazers_count":308,"open_issues_count":8,"forks_count":122,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-08T04:11:19.232Z","etag":null,"topics":["demo","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudwego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-08T07:18:26.000Z","updated_at":"2025-04-04T09:54:24.000Z","dependencies_parsed_at":"2024-04-28T04:41:13.558Z","dependency_job_id":"c57bec91-2572-4f8a-abb7-4b1a2f90e610","html_url":"https://github.com/cloudwego/biz-demo","commit_stats":{"total_commits":316,"total_committers":16,"mean_commits":19.75,"dds":0.5759493670886076,"last_synced_commit":"7bf334426acfdfc4861df2cb8826da4762b899f8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"cloudwego/.github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fbiz-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fbiz-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fbiz-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fbiz-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudwego","download_url":"https://codeload.github.com/cloudwego/biz-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414497,"owners_count":22067272,"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":["demo","go"],"created_at":"2024-08-01T16:00:44.668Z","updated_at":"2025-05-15T20:03:51.527Z","avatar_url":"https://github.com/cloudwego.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# CloudWeGo Demo for Business\n\nThis repo contains CloudWeGo demos with business logic, providing valuable references for enterprise user using in production.\n\nEach demo should/may contain multiple CloudWeGo subprojects, e.g. Kitex \u0026 Hertz, and demonstrate an individual business scenario.\n\n## Demo List\n\n### 1. Bookinfo\n\n#### Description\n##### What is it about and what problem does it solve?\n- How to use kitex proxyless in istio?\n- How to implement full-process traffic lane using CloudWeGo?\n\n##### What is the business scenario?\nRewrite **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)** project using `hertz`, `kitex`, same as the **[Bookinfo](https://istio.io/latest/docs/examples/bookinfo/)**\n\n\u003e The application displays information about a book, similar to a single catalog entry of an online book store. Displayed on the page is a description of the book, book details (ISBN, number of pages, and so on), and a few book reviews.\n\nThe Bookinfo application is broken into four separate microservices:\n\n- **productpage**. The productpage microservice calls the details and reviews **microservices** to populate the page.\n- **details**. The details microservice contains book information.\n- **reviews**. The reviews microservice contains book reviews. It also calls the ratings microservice.\n- **ratings**. The ratings microservice contains book ranking information that accompanies a book review.\n\n##### What are the core technologies/projects used?\n\n- [x] Use `istiod` as xDS server for CRD configuration and distribution\n- [x] Use `wire` for dependency injection\n- [x] Use `opentelemetry` for tracing\n- [x] Implement proxyless `flow lane` with [`Kitex-xds`](https://github.com/kitex-contrib/xds) and `opentelemetry baggage`\n- [x] Implement a bookinfo ui using `arco-design` react\n\n##### Which CloudWeGo subprojects are used? List all technologies used.\n- [Kitex](https://github.com/cloudwego/kitex)\n- [Hertz](https://github.com/cloudwego/hertz)\n- [kitex-xds](https://github.com/kitex-contrib/xds)\n- [kitex-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)\n- [hertz-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)\n\n##### Detailed documentation\n[bookinfo](./bookinfo/README.md)\n\n#### Contributors \u0026 Maintainers\n[@CoderPoet](https://github.com/CoderPoet)\n\n\n### 2. Open Payment Platform\n\n#### Description\n##### What is it about and what problem does it solve?\n- How to use kitex generic call as the http gateway?\n- How to implement Clean Structure of `Go` using kitex?\n\n##### What is the business scenario?\n\u003e The application demonstrates the usage of kitex generic call.\n\n- We build the `generic call` client for each backend server by traversing IDL in Hertz.\n- Hertz will accept the requests with the query path of prefix `/gateway` .\n- `Gateway` handler will process these requests and route them to backend server by `generic call` client.\n- `payment` server is just a sample server using kitex.This service design pkg with `Clean Structure`.\n\n##### What are the core technologies/projects used?\n\n- [x] Use `Hertz` as Gateway.\n- [x] Use `Kitex` generic call client route requests.\n- [x] Use `Kitex` as RPC framework to build micro-services.\n- [x] Use `Clean Architecture` for design pkg and code layout.\n- [x] Use `ent` entity framework for implementing repository.\n- [x] Use `wire` for dependency injection\n- [x] Use `Nacos` as service registry.\n- [x] Use `MySQL` as RDBMS.\n\n##### Which CloudWeGo subprojects are used? List all technologies used.\n- [Kitex](https://github.com/cloudwego/kitex)\n- [Hertz](https://github.com/cloudwego/hertz)\n- kitex-layout(coming soon)\n\n##### Detailed documentation\n[Open Payment Platform](./open-payment-platform/README.md)\n\n#### Contributors \u0026 Maintainers\n[@baiyutang](https://github.com/baiyutang)\n\n\n### 3. Easy Note\n\n#### Description\n##### What is it about and what problem does it solve?\n- How to get started with Hertz and Kitex collaboration?\n- How to structure projects when using Hertz and Kitex?\n\n##### What is the business scenario?\nMigrate **[easy_note](https://github.com/cloudwego/kitex-examples/tree/main/bizdemo/easy_note)** and optimize the project.\n\n\u003e The application shows a note service that allows users to create, delete, update, and query notes.\n\nThe easy_note application is divided into three microservices:\n\n- **demoapi** is an HTTP service that handles HTTP requests and calls other services via RPC.\n- **demouser** is an RPC service that handles user related operations.\n- **demonote** is an RPC service that handles note related operations and calls demouser service via RPC.\n\n##### What are the core technologies/projects used?\n\n- [x] Use `hz` and `kitex` to generate code\n- [x] Use Hertz `requestid`, `jwt`, `pprof`, `gzip` middlewares\n- [x] Use `go-tagexpr` and `thrift-gen-validator` for validating HTTP and RPC request\n- [x] Use `obs-opentelemetry` for tracing\n- [x] Use `etcd` as service registry.\n- [x] Use `GORM` for implementing repository.\n- [x] Use `MySQL` as RDBMS.\n\n##### Which CloudWeGo subprojects are used? List all technologies used.\n- [Hertz](https://github.com/cloudwego/hertz)\n  - [obs-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)\n  - [requestid](https://github.com/hertz-contrib/requestid)\n  - [jwt](https://github.com/hertz-contrib/jwt)\n  - [pprof](https://github.com/hertz-contrib/pprof)\n  - [gzip](https://github.com/hertz-contrib/gzip)\n- [Kitex](https://github.com/cloudwego/kitex)\n  - [obs-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)\n  - [registry-etcd](https://github.com/kitex-contrib/registry-etcd)\n- [thrift-gen-validator](https://github.com/cloudwego/thrift-gen-validator)\n\n##### Detailed documentation\n[easy_note](./easy_note/README.md)\n\n#### Contributors \u0026 Maintainers\n- [@justlorain](https://github.com/justlorain)\n- [@li-jin-gou](https://github.com/li-jin-gou)\n\n### 4. Book Shop\n\n#### Description\n##### What is it about and what problem does it solve?\n- How to integrate middlewares(such as `ElasticSearch`, `Redis`...) in Kitex project?\n- How to layer code in projects of different complexity using Hertz and Kitex?\n\n##### What is the business scenario?\n\u003e The application shows an e-commerce system that includes merchants managing items, consumers managing personal accounts and placing orders to buy items.\n\nThe book-shop application is divided into four microservices:\n\n- **facade** is an HTTP service that handles HTTP requests and calls other services via RPC.\n- **user** is an RPC service that handles user managements.\n- **item** is an RPC service that handles item managements.\n- **order** is an RPC service that handles order managements.\n\n##### What are the core technologies/projects used?\n\n- [x] Use `Hertz` as Gateway.\n- [x] Use `Kitex` as RPC framework to build microservices.\n- [x] Use Hertz `swagger`, `jwt`, `pprof`, `gzip` middlewares.\n- [x] Use `ETCD` as service registry.\n- [x] Use `MySQL` as RDBMS.\n- [x] Use `Redis` as cache.\n- [x] Use `ElasticSearch` as search-engine.\n\n##### Which CloudWeGo subprojects are used? List all technologies used.\n\n- [Hertz](https://github.com/cloudwego/hertz)\n  - [swagger](http://github.com/hertz-contrib/swagger)\n  - [jwt](http://github.com/hertz-contrib/jwt)\n  - [pprof](https://github.com/hertz-contrib/pprof)\n  - [gzip](https://github.com/hertz-contrib/gzip)\n- [Kitex](https://github.com/cloudwego/kitex)\n  - [registry-etcd](https://github.com/kitex-contrib/registry-etcd)\n- [sonic](https://github.com/bytedance/sonic)\n\n##### Detailed documentation\n[Book Shop](./book-shop/README.md)\n\n#### Contributors \u0026 Maintainers\n[@bodhisatan](https://github.com/bodhisatan)\n\n### 5. [FreeCar](https://github.com/CyanAsterisk/FreeCar)\n\n#### Description\n##### What is it about and what problem does it solve?\n- How to use the idea of domain-driven development to develop in Kitex?\n- How to develop Hertz and Kitex through RPC + AGW mode?\n\n##### What is the business scenario?\n\u003eTime-sharing car rental system kit in the cloud-native era.\n\nThe FreeCar application is divided into six microservices:\n\n- **api** is an HTTP service that handles HTTP requests and calls other services via RPC.\n- **user** is an RPC service that handles user related operations.\n- **profile** is an RPC service that handles profile related operations.\n- **blob** is an RPC service that handles blob related operations.\n- **car** is an RPC service that handles car related operations.\n- **trip** is an RPC service that handles trip related operations.\n\n##### What are the core technologies/projects used?\n\n- [x] Use `hz` and `kitex` to generate code\n- [x] Use Hertz `paseto`, `cors`, `gzip`, `http2`, `limiter`, `opensergo`, `pprof`, `websocket` middlewares\n- [x] Use `obs-opentelemetry` for tracing\n- [x] Use `consul` as service registry and config center.\n- [x] Use `GORM` for implementing repository.\n- [x] Use `MySQL` as RDBMS.\n- [x] Use `MongoDB` as DOCDB.\n- [x] Use `Redis` as cache.\n- [x] Use `MinIO` as object storage center.\n- [x] Use `RabbitMQ` as MQ.\n- [x] Implement a [FreeCar-Admin](https://github.com/CyanAsterisk/FreeCar-Admin) using `arco-design` react.\n- [x] Implement a [FreeCar-MP](https://github.com/CyanAsterisk/FreeCar-MP) using WeChat applet.\n\n##### Which CloudWeGo subprojects are used? List all technologies used.\n- [Hertz](https://github.com/cloudwego/hertz)\n  - [obs-opentelemetry](https://github.com/hertz-contrib/obs-opentelemetry)\n  - [registry](https://github.com/hertz-contrib/registry)\n  - [paseto](https://github.com/hertz-contrib/paseto)\n  - [cors](https://github.com/hertz-contrib/cors)\n  - [pprof](https://github.com/hertz-contrib/pprof)\n  - [gzip](https://github.com/hertz-contrib/gzip)\n  - [http2](https://github.com/hertz-contrib/http2)\n  - [limiter](https://github.com/hertz-contrib/limiter)\n  - [opensergo](https://github.com/hertz-contrib/opensergo)\n  - [websocket](https://github.com/hertz-contrib/websocket)\n- [Kitex](https://github.com/cloudwego/kitex)\n  - [obs-opentelemetry](https://github.com/kitex-contrib/obs-opentelemetry)\n  - [registry-consul](https://github.com/kitex-contrib/registry-consul)\n\n##### Detailed documentation\n[FreeCar](https://github.com/CyanAsterisk/FreeCar/blob/dev/README.md)\n\n#### Contributors \u0026 Maintainers\n- [@L2ncE](https://github.com/L2ncE)\n- [@Claude-Zq](https://github.com/Claude-Zq)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fbiz-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudwego%2Fbiz-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fbiz-demo/lists"}