{"id":26881523,"url":"https://github.com/0xtuanit/aspnet_microservices","last_synced_at":"2025-03-31T15:20:14.879Z","repository":{"id":273567508,"uuid":"913848879","full_name":"0xtuanit/aspnet_microservices","owner":"0xtuanit","description":"A comprehensive Micro-services application built with .NET Core demonstrating a real-world Ecommerce system where different modules were implemented as independent services. Highly-recommended practices like Design Patterns or Strategies were also applied in the app codebase.","archived":false,"fork":false,"pushed_at":"2025-03-30T13:45:19.000Z","size":2501,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T04:28:57.110Z","etag":null,"topics":["api","api-gateway","asp-net-core","clean-architecture","cqrs","csharp","ddd","docker","ecommerce","elk-stack","grpc","health-checker","mongodb","mssql","mysql","postgresql","rabbitmq","redis","saga-pattern"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xtuanit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2025-01-08T13:22:44.000Z","updated_at":"2025-03-30T18:03:45.000Z","dependencies_parsed_at":"2025-02-06T13:23:57.287Z","dependency_job_id":"bca5c77a-5249-4717-965c-8b5aa94181ea","html_url":"https://github.com/0xtuanit/aspnet_microservices","commit_stats":null,"previous_names":["haohmaru3000/aspnet_microservices","0xtuanit/aspnet_microservices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtuanit%2Faspnet_microservices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtuanit%2Faspnet_microservices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtuanit%2Faspnet_microservices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtuanit%2Faspnet_microservices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xtuanit","download_url":"https://codeload.github.com/0xtuanit/aspnet_microservices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246489458,"owners_count":20785881,"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","api-gateway","asp-net-core","clean-architecture","cqrs","csharp","ddd","docker","ecommerce","elk-stack","grpc","health-checker","mongodb","mssql","mysql","postgresql","rabbitmq","redis","saga-pattern"],"created_at":"2025-03-31T15:20:14.243Z","updated_at":"2025-03-31T15:20:14.865Z","avatar_url":"https://github.com/0xtuanit.png","language":"C#","readme":"## Micro-services with ASP.NET Core\n\n## Prepare environment:\n\n* Install dotnet core version in file `global.json`\n* IDE: Visual Studio 2022+, Rider, Visual Studio Code\n* Docker Desktop\n\n## Architecture overview:\n- Introduction:\n    - The project is Micro-services based architecture where each separate service can use different technologies.\u003c/br\u003e\n      E.g. Product uses MySQL, Customer uses PostgresQL, Inventory uses MongoDB and so on.\n    - By the end of the day, these separate services can get connected and talked to each other though they use different technologies. So, together they will get a full flow of features completed for the whole system.\n-  Screenshot:\u003c/br\u003e\n    \u003cp align=\"center\"\u003e\n      \u003cimg width=\"700\" height=\"400\" alt=\"Architecture\" src=\"https://github.com/user-attachments/assets/0e7ca967-ace4-41e7-8af3-a8665588c599\" /\u003e\n    \u003c/p\u003e\n\n\n## Warning:\n\nSome docker images are not compatible with Apple Chip (M1, M2). You should replace them with appropriate images. Suggestion images below:\n- sql server: mcr.microsoft.com/azure-sql-edge\n- mysql: arm64v8/mysql:oracle\n---\n## How to run the project\n\nRun command for build project\n```Powershell\ndotnet build\n```\nGo to folder contain file `docker-compose`\n\n1. Using docker-compose\n```Powershell\ndocker-compose -f docker-compose.yml -f docker-compose.override.yml up -d --remove-orphans\n```\n\n## Application URLs - LOCAL Environment (Docker Container):\n- Product API: http://localhost:6002/api/products\n- Customer API: http://localhost:6003/api/customers\n- Basket API: http://localhost:6004/api/baskets\n\n## Docker Application URLs - LOCAL Environment (Docker Container):\n- Portainer: http://localhost:9000 - username: admin ; pass: admin\n- Kibana: http://localhost:5601 - username: elastic ; pass: admin\n- RabbitMQ: http://localhost:15672 - username: thomas ; pass: Admin3000\n\n2. Using Visual Studio 2022\n- Open aspnetcore-microservices.sln - `aspnetcore-microservices.sln`\n- Run Compound to start multi-projects\n---\n## Application URLs - DEVELOPMENT Environment:\n- Product API: http://localhost:5002/api/products\n- Customer API: http://localhost:5003/api/customers\n- Basket API: http://localhost:5004/api/baskets\n---\n## Application URLs - PRODUCTION Environment:\n\n---\n## Packages References\n\n## Install Environment\n\n- https://dotnet.microsoft.com/download/dotnet/6.0\n- https://visualstudio.microsoft.com/\n\n## References URLS\n- https://github.com/jasontaylordev/CleanArchitecture\n\n## Docker Commands: (cd into folder contain file `docker-compose.yml`, `docker-compose.override.yml`)\n\n- Up \u0026 running:\n```Powershell\ndocker-compose -f docker-compose.yml -f docker-compose.override.yml up -d --remove-orphans --build\n```\n- Stop \u0026 Removing:\n```Powershell\ndocker-compose down\n```\n\n## Useful commands:\n\n- ASPNETCORE_ENVIRONMENT=Production dotnet ef database update\n- dotnet watch run --environment \"Development\"\n- dotnet restore\n- dotnet build\n- Migration commands for Ordering API:\n    - cd into Ordering folder\n    - dotnet ef migrations add \"Init_OrderDB\" -p Ordering.Infrastructure --startup-project Ordering.API --output-dir Persistence/Migrations\n    - dotnet ef migrations add \"Order_Add_Status\" -p Ordering.Infrastructure --startup-project Ordering.API --output-dir Persistence/Migrations\n    - dotnet ef database update -p Ordering.Infrastructure --startup-project Ordering.API\n- Revert everything before removing migrations when there's any error:\n       // The number 0 is a special case that means before the first migration and causes all migrations to be reverted.\n    - \" dotnet ef database update 0 -p Ordering.Infrastructure --startup-project Ordering.API   \n        dotnet ef migrations remove -p Ordering.Infrastructure --startup-project Ordering.API\n        dotnet ef database drop -p Ordering.Infrastructure --startup-project Ordering.API \" \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtuanit%2Faspnet_microservices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtuanit%2Faspnet_microservices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtuanit%2Faspnet_microservices/lists"}