{"id":13432114,"url":"https://github.com/vietnam-devs/coolstore-microservices","last_synced_at":"2025-04-14T08:53:02.116Z","repository":{"id":33556185,"uuid":"135726659","full_name":"vietnam-devs/coolstore-microservices","owner":"vietnam-devs","description":"A full-stack .NET microservices build on Dapr and Tye","archived":false,"fork":false,"pushed_at":"2023-03-07T00:21:52.000Z","size":62989,"stargazers_count":2495,"open_issues_count":32,"forks_count":583,"subscribers_count":135,"default_branch":"feature/upgrade-net6","last_synced_at":"2025-04-07T01:08:57.007Z","etag":null,"topics":["aks","clean-architecture","cloud-native","dapr","ddd","ddd-example","docker","dotnet-core","grpc","kubernetes","microservices","microservices-architecture","postgresql","reactjs","redis","rest-api","service-mesh","tye","typescript"],"latest_commit_sha":null,"homepage":"https://vietnam-devs.github.io/coolstore-microservices","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vietnam-devs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2018-06-01T14:18:27.000Z","updated_at":"2025-04-03T14:32:54.000Z","dependencies_parsed_at":"2023-10-21T13:17:50.211Z","dependency_job_id":null,"html_url":"https://github.com/vietnam-devs/coolstore-microservices","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietnam-devs%2Fcoolstore-microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietnam-devs%2Fcoolstore-microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietnam-devs%2Fcoolstore-microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietnam-devs%2Fcoolstore-microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vietnam-devs","download_url":"https://codeload.github.com/vietnam-devs/coolstore-microservices/tar.gz/refs/heads/feature/upgrade-net6","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852078,"owners_count":21171839,"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":["aks","clean-architecture","cloud-native","dapr","ddd","ddd-example","docker","dotnet-core","grpc","kubernetes","microservices","microservices-architecture","postgresql","reactjs","redis","rest-api","service-mesh","tye","typescript"],"created_at":"2024-07-31T02:01:08.698Z","updated_at":"2025-04-14T08:53:02.090Z","avatar_url":"https://github.com/vietnam-devs.png","language":"C#","funding_links":[],"categories":["Sample Projects","C# #","typescript","C\\#","Resources","C#","例子","Architectural Patterns","Sample \u0026 Reference Applications","docker"],"sub_categories":["Workflow","Examples","工作流","Domain Driven Design - Domain Centric"],"readme":"# CoolStore Web Application - :ferris_wheel: Modern Application on Dapr and Tye :sailboat:\n\n![Travis (.org)](https://travis-ci.org/vietnam-devs/coolstore-microservices.svg?branch=master)\n[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/vietnam-devs/coolstore-microservices)\n[![Price](https://img.shields.io/badge/price-FREE-0098f7.svg)](https://github.com/vietnam-devs/coolstore-microservices/blob/master/LICENSE)\n\nCoolStore Website is a containerised microservices application consisting of services based on .NET Core running on Dapr. It demonstrates how to wire up small microservices into a larger application using microservice architectural principals.\n\n\u003e This repository based on some of the old libraries. So be careful if you use it in your production environment!!!\n\u003e\n\u003e We are working on [practical-clean-ddd](https://github.com/thangchung/practical-clean-ddd) for the new version of building the .NET apps with domain-driven design, clean architecture with Docker, Kubernetes, Tye, and Dapr in a practical way 👍\n\nRead [documentation](https://vietnam-devs.github.io/coolstore-microservices) for more information.\n\nThe business domain is inspired from [CoolStore project](https://github.com/jbossdemocentral/coolstore-microservice) by [JBoss Demo Central](https://github.com/jbossdemocentral) and [Red Hat Demo Central](https://gitlab.com/redhatdemocentral).\n\nCheck out my [medium](https://medium.com/@thangchung), or my [dev.to](https://dev.to/thangchung) or say hi on [Twitter](https://twitter.com/thangchung)!\n\n# Table of contents\n\n- [Dapr Building Blocks](https://github.com/vietnam-devs/coolstore-microservices#dapr-building-blocks)\n- [Screenshots](https://github.com/vietnam-devs/coolstore-microservices#screenshots)\n- [Try it!](https://github.com/vietnam-devs/coolstore-microservices#try-it)\n- [OS, SDK, library, tooling and prerequisites](https://github.com/vietnam-devs/coolstore-microservices#os-sdk-library-tooling-and-prerequisites)\n- [µService development](https://github.com/vietnam-devs/coolstore-microservices#µmicroservice-development)\n- [Open API](https://github.com/vietnam-devs/coolstore-microservices#open-api)\n- [CI/CD](https://github.com/vietnam-devs/coolstore-microservices#ci-cd)\n- [Public presentation](https://github.com/vietnam-devs/coolstore-microservices#public-presentation)\n- [Contributing](https://github.com/vietnam-devs/coolstore-microservices#contributing)\n- [Contributors](https://github.com/vietnam-devs/coolstore-microservices#contributors)\n- [Licence](https://github.com/vietnam-devs/coolstore-microservices#licence)\n\n## Dapr Building Blocks\n\n![](assets/dapr/dapr_platform.png)\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003cth\u003eName\u003c/th\u003e\n    \u003cth\u003eUsecase\u003c/th\u003e\n    \u003cth\u003eApps Participants\u003c/th\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eService-to-service invocation\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003e\n         - User clicks to the detail product\u003cbr\u003e\n         - Populate product information for shopping cart items\u003cbr\u003e\n         - Order gets detail information of buyer\n      \u003c/td\u003e\n      \u003ctd\u003eproductcatalogapp, inventoryapp, shoppingcartapp, identityapp\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eState management\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eItems in the shopping cart\u003c/td\u003e\n      \u003ctd\u003eshoppingcartapp\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003ePublish and subscribe\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eUser clicks checkout button, and the checkout process happens. It triggers the pub/sub flow in the system\u003c/td\u003e\n      \u003ctd\u003eshoppingcartapp, saleapp, identityapp\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eResource bindings\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eEvery 30 seconds and 1 minutes the validation process happens. It will change the status of order from Received to Process and Complete via Cron binding\u003c/td\u003e\n      \u003ctd\u003eproductcatalogapp, inventoryapp\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eObservability\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eAll apps in the application are injected by daprd so that it's tracked and observed by dapr \u003c/td\u003e\n      \u003ctd\u003eidentityapp, webapigatewayapp, inventoryapp, productcatalogapp, shoppingcartapp, saleapp, web\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eSecrets\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eBind with local secret file to hide password of redis\u003c/td\u003e\n      \u003ctd\u003einventoryapp, productcatalogapp, shoppingcartapp, saleapp\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003eActors\u003c/b\u003e\u003c/td\u003e\n      \u003ctd\u003eN/A\u003c/td\u003e\n      \u003ctd\u003eN/A\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Screenshots\n\n### Home page\n\n![home-page](assets/dapr/ui_screen_1.png?raw=true)\n\n### Shopping Cart page\n\n![cart-page](assets/dapr/ui_screen_2.png?raw=true)\n\n### Order page\n\n![order-page](assets/dapr/ui_screen_3.png?raw=true)\n\n## Try it\n\nMake sure you have [`dapr`](https://docs.dapr.io/getting-started/install-dapr/) and [`tye`](https://github.com/dotnet/tye/blob/master/docs/getting_started.md) installed on your machine!\n\n### Only wanna see wth is it?\n\n```\n$ tye run\n```\n\nGo to [`http://localhost:8000`](http://localhost:8000), and you're able to access to several endpoints whenevever it's ready as below:\n\n- Web App: [`http://localhost:3000`](http://localhost:3000)\n- Web Api Gateway: [`http://localhost:5000`](http://localhost:5000)\n- Identity Server: [`http://localhost:5001`](http://localhost:5001)\n\n### Wanna go deeply to see how can we built it!\n\n1. Start core components\n\n```\n$ tye run tye.slim.yaml\n```\n\n2. Start dapr apps locally via dapr cli\n\n```\n$ dapr run --app-port 5001 --app-id identityapp dotnet run -- -p src\\Services\\Identity\\IdentityService\\IdentityService.csproj\n```\n\n```\n$ dapr run --app-port 5002 --app-id inventoryapp dotnet run -- -p src\\Services\\Inventory\\InventoryService.Api\\InventoryService.Api.csproj\n```\n\n```\n$ dapr run --app-port 5003 --app-id productcatalogapp dotnet run -- -p src\\Services\\ProductCatalog\\ProductCatalogService.Api\\ProductCatalogService.Api.csproj\n```\n\n```\n$ dapr run --app-port 5004 --app-id shoppingcartapp dotnet run -- -p src\\Services\\ShoppingCart\\ShoppingCartService.Api\\ShoppingCartService.Api.csproj\n```\n\nNow, you can start to develop, debug or explore more about `dapr` with `tye` via Coolstore Apps.\n\n\u003e Enable `vm.max_map_count` for ElasticSearch via run `sysctl -w vm.max_map_count=262144`\n\n## OS, SDK, library, tooling and prerequisites\n\n### Infrastructure\n\n- **`Windows 10`** - The OS for developing and building this demo application.\n- **[`WSL2 - Ubuntu OS`](https://docs.microsoft.com/en-us/windows/wsl/install-win10)** - the subsystem that helps to run easily the bash shell on Windows OS\n- **[`Docker for desktop (Kubernetes enabled)`](https://www.docker.com/products/docker-desktop)** - The easiest tool to run Docker, Docker Swarm and Kubernetes on Mac and Windows\n- **[`Kubernetes`](https://kubernetes.io) / [`AKS`](https://docs.microsoft.com/en-us/azure/aks)** - The app is designed to run on Kubernetes (both locally on \"Docker for Desktop\" as well as on the cloud with AKS)\n- **[`helm`](https://helm.sh)** - Best package manager to find, share, and use software built for Kubernetes\n- **[`dapr`](https://dapr.io/)** - An event-driven, portable runtime for building microservices on cloud and edge\n- **[`tye`](https://github.com/dotnet/tye)** - A developer tool that makes developing, testing, and deploying microservices and distributed applications easier\n\n### Back-end\n\n- **[`.NET Core 5`](https://dotnet.microsoft.com/download)** - .NET Framework and .NET Core, including ASP.NET and ASP.NET Core\n- **[`IdentityServer4`](https://identityserver.io)** - Identity and Access Control solution for .NET Core\n- **[`YARP`](https://github.com/microsoft/reverse-proxy)** - A toolkit for developing high-performance HTTP reverse proxy applications\n- **[`FluentValidation`](https://github.com/FluentValidation/FluentValidation)** - Popular .NET validation library for building strongly-typed validation rules\n- **[`MediatR`](https://github.com/jbogard/MediatR)** - Simple, unambitious mediator implementation in .NET\n- **[`EF Core`](https://github.com/dotnet/efcore)** - Modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations\n- **[`Scrutor`](https://github.com/khellang/Scrutor)** - Assembly scanning and decoration extensions for Microsoft.Extensions.DependencyInjection\n- **[`serilog`](https://github.com/serilog/serilog)** - Simple .NET logging with fully-structured events\n- **[`NEST`](https://github.com/elastic/elasticsearch-net)** - Elasticsearch.Net \u0026 NEST\n\n### Front-end\n\n- **[`nodejs 10.x`](https://nodejs.org/en/download)** - JavaScript runtime built on Chrome's V8 JavaScript engine\n- **[`typescript`](https://www.typescriptlang.org)** - A typed superset of JavaScript that compiles to plain JavaScript\n- **[`create-react-app`](https://facebook.github.io/create-react-app)** - A modern web app by running one command\n\n## µService development\n\nGuidance for developing µService can be found at [Clean Domain-Driven Design in 10 minutes](https://medium.com/@thangchung/clean-domain-driven-design-in-10-minutes-6037a59c8b7b)\n\n![µService Screenshot](assets/images/miniservice-development.PNG?raw=true 'Microservice')\n\n## Open API\n\n![OpenAPI Screenshot](assets/images/open-api.png?raw=true 'OpenAPI')\n\nhttps://documenter.getpostman.com/view/4847807/SVmvUeZv?version=latest#9f5ed7e4-e855-46e5-a42d-64edb31bc1cb\n\n## CI/CD\n\n![Lift and Shift](assets/images/lift-and-shift.PNG?raw=true 'liftandshift')\n\n## Debug and Tracing Apps\n\n- Setup Kibana with `TraceId`, `HandlerName`, `RequestPath`, `level` and filter with `HandlerName`\n\n![](assets/dapr/tracing_kibana_logs.png)\n\nThen, you can find the exception happend in code via Kibana dashboard with settings above. Grab the `TraceId`, then paste it to `Zipkin` dashboard, then you can see the tracing of this request as the following picture\n\n![](assets/dapr/tracing_zipkin.png)\n\n## Public presentation\n\n- [Service Mesh on AKS, the future is now - Microsoft Build event in May 2019](https://mybuild.techcommunity.microsoft.com/sessions/77172?source=TechCommunity)\n- [From Microservices to Service Mesh - DevCafe event in July 2018](https://www.slideshare.net/ThangChung/from-microservices-to-service-mesh-devcafe-event-july-2018)\n- [Service Mesh for Microservices- Vietnam Mobile Day event in June 2018](https://www.slideshare.net/ThangChung/service-mesh-for-microservices-vietnam-mobile-day-june-2017)\n- [Avoid SPOF in Cloud-native Apps - Vietnam Web Summit event in December 2018](https://www.slideshare.net/ThangChung/avoid-single-point-of-failure-in-cloud-native-application)\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :p\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key))\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\"\u003e\n        \u003cimg width=\"150\" height=\"150\" src=\"https://github.com/thangchung.png?s=150\"\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://github.com/thangchung\"\u003eThang Chung\u003c/a\u003e\n        \u003cp\u003e\n          \u003ca href=\"https://github.com/vietnam-devs/coolstore-microservices/commits?author=thangchung\" title=\"Developer\"\u003e💻\u003c/a\u003e\n          \u003ca href=\"#question\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\n          \u003ca href=\"#docs\" title=\"Documentation\"\u003e📖\u003c/a\u003e\n          \u003ca href=\"#review\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\n          \u003ca href=\"#infra\" title=\"Infrastructure\"\u003e🚇\u003c/a\u003e\n          \u003ca href=\"#maintance\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\"\u003e\n        \u003cimg width=\"150\" height=\"150\" src=\"https://github.com/tungphuong.png?s=150\"\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://github.com/tungphuong\"\u003ePhuong Le\u003c/a\u003e\n        \u003cp\u003e\n          \u003ca href=\"https://github.com/vietnam-devs/coolstore-microservices/commits?author=tungphuong\" title=\"Developer\"\u003e💻\u003c/a\u003e\n          \u003ca href=\"#package\" title=\"Packaging\"\u003e📦\u003c/a\u003e\n          \u003ca href=\"#infra\" title=\"Infrastructure\"\u003e🚇\u003c/a\u003e\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\"\u003e\n        \u003cimg width=\"150\" height=\"150\" src=\"https://github.com/trumhemcut.png?s=150\"\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://github.com/trumhemcut\"\u003ePhi Huynh\u003c/a\u003e\n        \u003cp\u003e\n          \u003ca href=\"#idea\" title=\"Ideas \u0026 Planning\"\u003e🤔\u003c/a\u003e\n          \u003ca href=\"https://github.com/vietnam-devs/coolstore-microservices/commits?author=trumhemcut\" title=\"Infrastructure\"\u003e🚇\u003c/a\u003e\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\"\u003e\n        \u003cimg width=\"150\" height=\"150\" src=\"https://github.com/thinhnotes.png?s=150\"\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://github.com/thinhnotes\"\u003eThinh Nguyen\u003c/a\u003e\n        \u003cp\u003e\n          \u003ca href=\"https://github.com/vietnam-devs/coolstore-microservices/commits?author=thinhnotes\" title=\"Developer\"\u003e💻\u003c/a\u003e\n          \u003ca href=\"#maintance\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\n        \u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\"\u003e\n        \u003cimg width=\"150\" height=\"150\" src=\"https://github.com/stuartleeks.png?s=150\"\u003e\n        \u003cbr\u003e\n        \u003ca href=\"https://github.com/stuartleeks\"\u003eStuart Leeks\u003c/a\u003e\n        \u003cp\u003e\n          \u003ca href=\"#docs\" title=\"Documentation\"\u003e📖\u003c/a\u003e\n        \u003c/p\u003e\n      \u003c/td\u003e\n     \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Licence\n\nCode released under [the MIT license](https://github.com/vietnam-devs/coolstore-microservices/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietnam-devs%2Fcoolstore-microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvietnam-devs%2Fcoolstore-microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietnam-devs%2Fcoolstore-microservices/lists"}