├── .gitattributes ├── .github └── workflows │ ├── basket-api-deploy.yml │ ├── basket-api.yml │ ├── catalog-api-deploy.yml │ ├── catalog-api.yml │ ├── composite │ ├── build-push │ │ └── action.yml │ ├── build-test │ │ └── action.yml │ ├── build │ │ └── action.yml │ └── deploy-helm │ │ └── action.yml │ ├── identity-api-deploy.yml │ ├── identity-api.yml │ ├── mobileshoppingagg-deploy.yml │ ├── mobileshoppingagg.yml │ ├── ordering-api-deploy.yml │ ├── ordering-api.yml │ ├── ordering-backgroundtasks-deploy.yml │ ├── ordering-backgroundtasks.yml │ ├── ordering-signalrhub-deploy.yml │ ├── ordering-signalrhub.yml │ ├── payment-api-deploy.yml │ ├── payment-api.yml │ ├── webhooks-api-deploy.yml │ ├── webhooks-api.yml │ ├── webhooks-client.yml │ ├── webmvc-deploy.yml │ ├── webmvc.yml │ ├── webshoppingagg-deploy.yml │ ├── webshoppingagg.yml │ ├── webspa-deploy.yml │ ├── webspa.yml │ ├── webstatus-deploy.yml │ └── webstatus.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── branch-guide.md ├── build ├── acr-build │ └── queue-all.ps1 └── multiarch-manifests │ └── create-manifests.ps1 ├── deploy ├── azure │ ├── az │ │ ├── cosmos │ │ │ ├── deploycosmos.json │ │ │ ├── deploycosmos.parameters.json │ │ │ └── readme.md │ │ ├── create-resources.cmd │ │ ├── createresources.sh │ │ ├── readme.md │ │ ├── redis │ │ │ ├── readme.md │ │ │ ├── redisdeploy.json │ │ │ └── redisdeploy.parameters.json │ │ ├── servicebus │ │ │ ├── readme.md │ │ │ ├── sbusdeploy.json │ │ │ └── sbusdeploy.parameters.json │ │ ├── sql │ │ │ ├── readme.md │ │ │ ├── sqldeploy.json │ │ │ └── sqldeploy.parameters.json │ │ └── storage │ │ │ └── catalog │ │ │ ├── deploystorage.json │ │ │ ├── deploystorage.parameters.json │ │ │ └── readme.md │ └── readme.md ├── elk │ ├── Readme.md │ ├── elasticsearch │ │ ├── Dockerfile │ │ └── config │ │ │ └── elasticsearch.yml │ ├── img │ │ └── elk │ │ │ ├── azure-nsg-inboundportsConfig.png │ │ │ ├── bitnami_splash.png │ │ │ ├── create-vm-elk-azure-last-step.png │ │ │ ├── create-vm-elk-azure-summary.png │ │ │ ├── create-vm-elk-azure.png │ │ │ ├── discover-kibana.png │ │ │ ├── kibana_eshops_index.png │ │ │ ├── kibana_result.png │ │ │ ├── kibana_startup.png │ │ │ └── kibana_working.png │ ├── kibana │ │ ├── Dockerfile │ │ └── config │ │ │ └── kibana.yml │ └── logstash │ │ ├── Dockerfile │ │ ├── config │ │ └── logstash.yml │ │ └── pipeline │ │ └── logstash.conf ├── k8s │ ├── README.md │ ├── create-aks.ps1 │ ├── dashboard-adminuser.yaml │ ├── enable-tls.ps1 │ ├── helm-rbac.yaml │ ├── helm │ │ ├── aks-httpaddon-cfg.yaml │ │ ├── apigwms │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── envoy.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ ├── envoy-cm.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── apigwws │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── envoy.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ ├── envoy-cm.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── app.yaml │ │ ├── basket-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── basket-data │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── catalog-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── deploy-all-mac.ps1 │ │ ├── deploy-all.ps1 │ │ ├── deploy-all.sh │ │ ├── deploy-chart.sh │ │ ├── eshop-common │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ └── secret.yaml │ │ │ └── values.yaml │ │ ├── identity-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ ├── ingress-dockerk8s.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── inf.yaml │ │ ├── ingress_values.yaml │ │ ├── ingress_values_dockerk8s.yaml │ │ ├── ingress_values_linkerd.yaml │ │ ├── keystore-data │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── mobileshoppingagg │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── nosql-data │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── ordering-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── ordering-backgroundtasks │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── ordering-signalrhub │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── payment-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── rabbitmq │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── sql-data │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── tls-support │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── _helpers.tpl │ │ │ │ └── issuer.yaml │ │ │ ├── values-prod.yaml │ │ │ └── values-staging.yaml │ │ ├── webhooks-api │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── webhooks-web │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── webmvc │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ ├── ingress-dockerk8s.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── webshoppingagg │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ ├── webspa │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ │ ├── NOTES.txt │ │ │ │ ├── _helpers.tpl │ │ │ │ ├── _names.tpl │ │ │ │ ├── configmap.yaml │ │ │ │ ├── deployment.yaml │ │ │ │ ├── ingress.yaml │ │ │ │ └── service.yaml │ │ │ └── values.yaml │ │ └── webstatus │ │ │ ├── .helmignore │ │ │ ├── Chart.yaml │ │ │ ├── templates │ │ │ ├── NOTES.txt │ │ │ ├── _helpers.tpl │ │ │ ├── _names.tpl │ │ │ ├── configmap.yaml │ │ │ ├── deployment.yaml │ │ │ ├── ingress.yaml │ │ │ └── service.yaml │ │ │ └── values.yaml │ ├── linkerd │ │ ├── basket-api-sp.yaml │ │ └── catalog-api-sp.yaml │ ├── nginx-ingress │ │ ├── local-cm.yaml │ │ ├── local-dockerk8s │ │ │ ├── identityapi-cm-fix.yaml │ │ │ ├── mvc-cm-fix.yaml │ │ │ └── mvc-fix.yaml │ │ ├── local-svc.yaml │ │ ├── mandatory.yaml │ │ └── service-nodeport.yaml │ └── nodeports │ │ ├── rabbitmq-admin.yaml │ │ └── sql-service.yaml └── windows │ ├── add-firewall-rules-for-sts-auth-thru-docker.ps1 │ └── set-dockernat-networkategory-to-private.ps1 ├── github-actions.md ├── img ├── DevOps-Cover-small.png ├── Microservices-cover-small.png ├── architecture-book-cover-large-we.png ├── devops-book-cover-large-we.png ├── eShopOnContainers-architecture.png ├── eshop-spa-app-home.png ├── eshop-webmvc-app-screenshot.png ├── eshop_logo.png ├── xamarin-enterprise-patterns-ebook-cover-large-we.png └── xamarin-enterprise-patterns-ebook-cover-small.png └── src ├── .dockerignore ├── .env ├── ApiGateways ├── Envoy │ └── config │ │ ├── mobileshopping │ │ └── envoy.yaml │ │ └── webshopping │ │ └── envoy.yaml └── Web.Bff.Shopping │ └── aggregator │ ├── Config │ └── UrlsConfig.cs │ ├── Controllers │ ├── BasketController.cs │ ├── HomeController.cs │ └── OrderController.cs │ ├── Dockerfile │ ├── Dockerfile.develop │ ├── Filters │ └── AuthorizeCheckOperationFilter.cs │ ├── GlobalUsings.cs │ ├── Infrastructure │ ├── GrpcExceptionInterceptor.cs │ └── HttpClientAuthorizationDelegatingHandler.cs │ ├── Models │ ├── AddBasketItemRequest.cs │ ├── BasketData.cs │ ├── BasketDataItem.cs │ ├── CatalogItem.cs │ ├── OrderData.cs │ ├── OrderItemData.cs │ ├── UpdateBasketItemData.cs │ ├── UpdateBasketItemsRequest.cs │ ├── UpdateBasketRequest.cs │ └── UpdateBasketRequestItemData.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Services │ ├── BasketService.cs │ ├── CatalogService.cs │ ├── IBasketService.cs │ ├── ICatalogService.cs │ ├── IOrderApiClient.cs │ ├── IOrderingService.cs │ ├── OrderApiClient.cs │ └── OrderingService.cs │ ├── Startup.cs │ ├── Web.Shopping.HttpAggregator.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── appsettings.localhost.json │ ├── azds.yaml │ └── values.dev.yaml ├── BuildingBlocks ├── Devspaces.Support │ ├── Devspaces.Support.csproj │ ├── DevspacesMessageHandler.cs │ ├── GlobalUsings.cs │ ├── HttpClientBuilderDevspacesExtensions.cs │ └── ServiceCollectionDevspacesExtensions.cs └── WebHostCustomization │ └── WebHost.Customization │ ├── WebHost.Customization.csproj │ └── WebHostExtensions.cs ├── Create-DockerfileSolutionRestore.ps1 ├── Directory.Build.props ├── DockerfileSolutionRestore.txt ├── Mobile └── README.md ├── NuGet.config ├── Services ├── Basket │ ├── Basket.API │ │ ├── .dockerignore │ │ ├── Auth │ │ │ ├── Client │ │ │ │ ├── enable-token-client.js │ │ │ │ ├── oidc-token-manager.js │ │ │ │ └── popup.html │ │ │ └── Server │ │ │ │ └── AuthorizationHeaderParameterOperationFilter.cs │ │ ├── Basket.API.csproj │ │ ├── BasketSettings.cs │ │ ├── Controllers │ │ │ ├── BasketController.cs │ │ │ └── HomeController.cs │ │ ├── CustomExtensionMethods.cs │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── GlobalUsings.cs │ │ ├── Grpc │ │ │ └── BasketService.cs │ │ ├── Infrastructure │ │ │ ├── ActionResults │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ ├── Exceptions │ │ │ │ └── FailingMiddlewareAppBuilderExtensions.cs │ │ │ ├── Filters │ │ │ │ ├── JsonErrorResponse.cs │ │ │ │ └── ValidateModelStateFilter.cs │ │ │ ├── Middlewares │ │ │ │ ├── AuthorizeCheckOperationFilter.cs │ │ │ │ ├── FailingMiddleware.cs │ │ │ │ ├── FailingOptions.cs │ │ │ │ ├── FailingStartupFilter.cs │ │ │ │ └── FailingWebHostBuilderExtensions.cs │ │ │ └── Repositories │ │ │ │ └── RedisBasketRepository.cs │ │ ├── Model │ │ │ ├── BasketCheckout.cs │ │ │ ├── BasketItem.cs │ │ │ ├── CustomerBasket.cs │ │ │ └── IBasketRepository.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Proto │ │ │ └── basket.proto │ │ ├── README.md │ │ ├── Services │ │ │ ├── IIdentityService.cs │ │ │ └── IdentityService.cs │ │ ├── Startup.cs │ │ ├── TestHttpResponseTrailersFeature.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── azds.yaml │ │ ├── values.dev.yaml │ │ └── web.config │ ├── Basket.FunctionalTests │ │ ├── Base │ │ │ ├── AutoAuthorizeMiddleware.cs │ │ │ ├── BasketScenarioBase.cs │ │ │ ├── BasketTestStartup.cs │ │ │ └── HttpClientExtensions.cs │ │ ├── Basket.FunctionalTests.csproj │ │ ├── BasketScenarios.cs │ │ ├── GlobalUsings.cs │ │ ├── RedisBasketRepositoryTests.cs │ │ └── appsettings.json │ └── Basket.UnitTests │ │ ├── Application │ │ ├── BasketWebApiTest.cs │ │ └── CartControllerTest.cs │ │ ├── Basket.UnitTests.csproj │ │ └── GlobalUsings.cs ├── Catalog │ ├── Catalog.API │ │ ├── Catalog.API.csproj │ │ ├── CatalogSettings.cs │ │ ├── Controllers │ │ │ ├── CatalogController.cs │ │ │ ├── HomeController.cs │ │ │ └── PicController.cs │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── Extensions │ │ │ ├── CatalogItemExtensions.cs │ │ │ ├── LinqSelectExtensions.cs │ │ │ └── WebHostExtensions.cs │ │ ├── GlobalUsings.cs │ │ ├── Grpc │ │ │ └── CatalogService.cs │ │ ├── Infrastructure │ │ │ ├── ActionResults │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ ├── CatalogContext.cs │ │ │ ├── CatalogContextSeed.cs │ │ │ ├── CatalogMigrations │ │ │ │ ├── 20161103152832_Initial.Designer.cs │ │ │ │ ├── 20161103152832_Initial.cs │ │ │ │ ├── 20161103153420_UpdateTableNames.Designer.cs │ │ │ │ ├── 20161103153420_UpdateTableNames.cs │ │ │ │ ├── 20170314083211_AddEventTable.Designer.cs │ │ │ │ ├── 20170314083211_AddEventTable.cs │ │ │ │ ├── 20170316012921_RefactoringToIntegrationEventLog.Designer.cs │ │ │ │ ├── 20170316012921_RefactoringToIntegrationEventLog.cs │ │ │ │ ├── 20170316120022_RefactoringEventBusNamespaces.Designer.cs │ │ │ │ ├── 20170316120022_RefactoringEventBusNamespaces.cs │ │ │ │ ├── 20170322124244_RemoveIntegrationEventLogs.Designer.cs │ │ │ │ ├── 20170322124244_RemoveIntegrationEventLogs.cs │ │ │ │ ├── 20170509130025_AddStockProductItem.Designer.cs │ │ │ │ ├── 20170509130025_AddStockProductItem.cs │ │ │ │ ├── 20170530133114_AddPictureFileName.Designer.cs │ │ │ │ ├── 20170530133114_AddPictureFileName.cs │ │ │ │ └── CatalogContextModelSnapshot.cs │ │ │ ├── EntityConfigurations │ │ │ │ ├── CatalogBrandEntityTypeConfiguration.cs │ │ │ │ ├── CatalogItemEntityTypeConfiguration.cs │ │ │ │ └── CatalogTypeEntityTypeConfiguration.cs │ │ │ ├── Exceptions │ │ │ │ └── CatalogDomainException.cs │ │ │ └── Filters │ │ │ │ └── HttpGlobalExceptionFilter.cs │ │ ├── Model │ │ │ ├── CatalogBrand.cs │ │ │ ├── CatalogItem.cs │ │ │ └── CatalogType.cs │ │ ├── Pics │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Proto │ │ │ └── catalog.proto │ │ ├── README.md │ │ ├── Setup │ │ │ ├── CatalogBrands.csv │ │ │ ├── CatalogItems-MVC.zip │ │ │ ├── CatalogItems-SPA.zip │ │ │ ├── CatalogItems.csv │ │ │ ├── CatalogItems.zip │ │ │ ├── CatalogTypes.csv │ │ │ └── README.md │ │ ├── Startup.cs │ │ ├── ViewModel │ │ │ └── PaginatedItemsViewModel.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── azds.yaml │ │ ├── eshop.pfx │ │ ├── values.dev.yaml │ │ └── web.config │ ├── Catalog.FunctionalTests │ │ ├── Catalog.FunctionalTests.csproj │ │ ├── CatalogScenarioBase.cs │ │ ├── CatalogScenarios.cs │ │ ├── GlobalUsings.cs │ │ ├── Setup │ │ │ ├── CatalogBrands.csv │ │ │ ├── CatalogItems.csv │ │ │ ├── CatalogItems.zip │ │ │ └── CatalogTypes.csv │ │ └── appsettings.json │ └── Catalog.UnitTests │ │ ├── Application │ │ └── CatalogControllerTest.cs │ │ └── Catalog.UnitTests.csproj ├── Identity │ └── Identity.API │ │ ├── .dockerignore │ │ ├── AppSettings.cs │ │ ├── Configuration │ │ └── Config.cs │ │ ├── Data │ │ ├── ApplicationDbContext.cs │ │ └── Migrations │ │ │ ├── 20210914100206_InitialMigration.Designer.cs │ │ │ ├── 20210914100206_InitialMigration.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Devspaces │ │ ├── DevspacesRedirectUriValidator.cs │ │ └── IdentityDevspacesBuilderExtensions.cs │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── GlobalUsings.cs │ │ ├── IWebHostExtensions.cs │ │ ├── Identity.API.csproj │ │ ├── Models │ │ ├── AccountViewModels │ │ │ ├── ForgotPasswordViewModel.cs │ │ │ ├── LoggedOutViewModel.cs │ │ │ ├── LoginViewModel.cs │ │ │ ├── LogoutViewModel.cs │ │ │ ├── RedirectViewModel.cs │ │ │ ├── RegisterViewModel.cs │ │ │ ├── ResetPasswordViewModel.cs │ │ │ ├── SendCodeViewModel.cs │ │ │ └── VerifyCodeViewModel.cs │ │ ├── ApplicationUser.cs │ │ ├── ConsentViewModels │ │ │ ├── ConsentInputModel.cs │ │ │ ├── ConsentOptions.cs │ │ │ ├── ConsentViewModel.cs │ │ │ ├── ProcessConsentResult.cs │ │ │ └── ScopeViewModel.cs │ │ ├── ErrorViewModel.cs │ │ └── ManageViewModels │ │ │ ├── AddPhoneNumberViewModel.cs │ │ │ ├── ChangePasswordViewModel.cs │ │ │ ├── ConfigureTwoFactorViewModel.cs │ │ │ ├── FactorViewModel.cs │ │ │ ├── IndexViewModel.cs │ │ │ ├── SetPasswordViewModel.cs │ │ │ └── VerifyPhoneNumberViewModel.cs │ │ ├── Program.cs │ │ ├── ProgramExtensions.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Quickstart │ │ ├── Account │ │ │ ├── AccountController.cs │ │ │ ├── AccountOptions.cs │ │ │ ├── ExternalController.cs │ │ │ ├── ExternalProvider.cs │ │ │ ├── LoggedOutViewModel.cs │ │ │ ├── LoginInputModel.cs │ │ │ ├── LoginViewModel.cs │ │ │ ├── LogoutInputModel.cs │ │ │ ├── LogoutViewModel.cs │ │ │ └── RedirectViewModel.cs │ │ ├── Consent │ │ │ ├── ConsentController.cs │ │ │ ├── ConsentInputModel.cs │ │ │ ├── ConsentOptions.cs │ │ │ ├── ConsentViewModel.cs │ │ │ ├── ProcessConsentResult.cs │ │ │ └── ScopeViewModel.cs │ │ ├── Device │ │ │ ├── DeviceAuthorizationInputModel.cs │ │ │ ├── DeviceAuthorizationViewModel.cs │ │ │ └── DeviceController.cs │ │ ├── Diagnostics │ │ │ ├── DiagnosticsController.cs │ │ │ └── DiagnosticsViewModel.cs │ │ ├── Extensions.cs │ │ ├── Grants │ │ │ ├── GrantsController.cs │ │ │ └── GrantsViewModel.cs │ │ ├── Home │ │ │ ├── ErrorViewModel.cs │ │ │ └── HomeController.cs │ │ └── SecurityHeadersAttribute.cs │ │ ├── README.md │ │ ├── SeedData.cs │ │ ├── Services │ │ ├── EFLoginService.cs │ │ ├── ILoginService.cs │ │ ├── IRedirectService.cs │ │ ├── ProfileService.cs │ │ └── RedirectService.cs │ │ ├── Views │ │ ├── Account │ │ │ ├── AccessDenied.cshtml │ │ │ ├── LoggedOut.cshtml │ │ │ ├── Login.cshtml │ │ │ └── Logout.cshtml │ │ ├── Consent │ │ │ └── Index.cshtml │ │ ├── Device │ │ │ ├── Success.cshtml │ │ │ ├── UserCodeCapture.cshtml │ │ │ └── UserCodeConfirmation.cshtml │ │ ├── Diagnostics │ │ │ └── Index.cshtml │ │ ├── Grants │ │ │ └── Index.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ ├── Redirect.cshtml │ │ │ ├── _Layout.cshtml │ │ │ ├── _ScopeListItem.cshtml │ │ │ └── _ValidationSummary.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── appsettings.json │ │ ├── azds.yaml │ │ ├── bundleconfig.json │ │ ├── libman.json │ │ ├── tempkey.jwk │ │ ├── values.dev.yaml │ │ ├── web.config │ │ └── wwwroot │ │ ├── _references.js │ │ ├── css │ │ ├── site-spa.css │ │ ├── site.css │ │ └── site.min.css │ │ ├── favicon.ico │ │ ├── fonts │ │ ├── Montserrat-Bold.eot │ │ ├── Montserrat-Bold.svg │ │ ├── Montserrat-Bold.ttf │ │ ├── Montserrat-Bold.woff │ │ ├── Montserrat-Bold.woff2 │ │ ├── Montserrat-Regular.eot │ │ ├── Montserrat-Regular.svg │ │ ├── Montserrat-Regular.ttf │ │ ├── Montserrat-Regular.woff │ │ ├── Montserrat-Regular.woff2 │ │ ├── Oswald-Bold.eot │ │ ├── Oswald-Bold.svg │ │ ├── Oswald-Bold.ttf │ │ ├── Oswald-Bold.woff │ │ ├── Oswald-Bold.woff2 │ │ ├── Oswald-ExtraLight.eot │ │ ├── Oswald-ExtraLight.svg │ │ ├── Oswald-ExtraLight.ttf │ │ ├── Oswald-ExtraLight.woff │ │ ├── Oswald-ExtraLight.woff2 │ │ ├── Oswald-Light.eot │ │ ├── Oswald-Light.svg │ │ ├── Oswald-Light.ttf │ │ ├── Oswald-Light.woff │ │ ├── Oswald-Light.woff2 │ │ ├── Oswald-Medium.eot │ │ ├── Oswald-Medium.svg │ │ ├── Oswald-Medium.ttf │ │ ├── Oswald-Medium.woff │ │ ├── Oswald-Medium.woff2 │ │ ├── Oswald-Regular.eot │ │ ├── Oswald-Regular.svg │ │ ├── Oswald-Regular.ttf │ │ ├── Oswald-Regular.woff │ │ ├── Oswald-Regular.woff2 │ │ ├── Oswald-SemiBold.eot │ │ ├── Oswald-SemiBold.svg │ │ ├── Oswald-SemiBold.ttf │ │ ├── Oswald-SemiBold.woff │ │ └── Oswald-SemiBold.woff2 │ │ ├── icon.jpg │ │ ├── icon.png │ │ ├── images │ │ ├── arrow-down.png │ │ ├── arrow-right.svg │ │ ├── banner1.svg │ │ ├── banner2.svg │ │ ├── banner3.svg │ │ ├── banner4.svg │ │ ├── brand.PNG │ │ ├── brand_dark.PNG │ │ ├── cart.png │ │ ├── header.jpg │ │ ├── logo.svg │ │ ├── logo_color.svg │ │ ├── logout.PNG │ │ ├── main_banner.png │ │ ├── main_banner_text.png │ │ ├── main_banner_text.svg │ │ ├── main_footer_text.PNG │ │ ├── my_orders.PNG │ │ └── refresh.svg │ │ └── js │ │ ├── signin-redirect.js │ │ ├── signout-redirect.js │ │ ├── site.js │ │ └── site.min.js ├── Ordering │ ├── Ordering.API │ │ ├── .dockerignore │ │ ├── Controllers │ │ │ ├── HomeController.cs │ │ │ └── OrdersController.cs │ │ ├── DTOs │ │ │ ├── BasketItem.cs │ │ │ ├── BasketItemExtensions.cs │ │ │ ├── CancelOrderModel.cs │ │ │ ├── CreateOrderDraftModel.cs │ │ │ ├── NewOrderModel.cs │ │ │ ├── OrderDraftModel.cs │ │ │ ├── OrderViewModel.cs │ │ │ └── ShipOrderModel.cs │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── Extensions │ │ │ └── LinqSelectExtensions.cs │ │ ├── GlobalUsings.cs │ │ ├── Grpc │ │ │ └── OrderingService.cs │ │ ├── Infrastructure │ │ │ ├── ActionResults │ │ │ │ └── InternalServerErrorObjectResult.cs │ │ │ ├── Auth │ │ │ │ └── AuthorizationHeaderParameterOperationFilter.cs │ │ │ ├── Factories │ │ │ │ └── OrderingDbContextFactory.cs │ │ │ ├── Filters │ │ │ │ ├── AuthorizeCheckOperationFilter.cs │ │ │ │ └── HttpGlobalExceptionFilter.cs │ │ │ ├── Migrations │ │ │ │ ├── 20170208181933_Initial.Designer.cs │ │ │ │ ├── 20170208181933_Initial.cs │ │ │ │ ├── 20170303085729_RequestsTable.Designer.cs │ │ │ │ ├── 20170303085729_RequestsTable.cs │ │ │ │ ├── 20170313100034_Domain_events.Designer.cs │ │ │ │ ├── 20170313100034_Domain_events.cs │ │ │ │ ├── 20170403082405_NoBuyerPropertyInOrder.Designer.cs │ │ │ │ ├── 20170403082405_NoBuyerPropertyInOrder.cs │ │ │ │ ├── 20170405110939_NoPaymentMethodPropertyInOrder.Designer.cs │ │ │ │ ├── 20170405110939_NoPaymentMethodPropertyInOrder.cs │ │ │ │ ├── 20170511112333_AddOrderDescription.Designer.cs │ │ │ │ ├── 20170511112333_AddOrderDescription.cs │ │ │ │ ├── 20170713111342_AdressAsValueObject.Designer.cs │ │ │ │ ├── 20170713111342_AdressAsValueObject.cs │ │ │ │ ├── 20180412143935_NamePropertyInBuyer.Designer.cs │ │ │ │ ├── 20180412143935_NamePropertyInBuyer.cs │ │ │ │ ├── 20190808132242_Change_Relation_Of_Orders.Designer.cs │ │ │ │ ├── 20190808132242_Change_Relation_Of_Orders.cs │ │ │ │ └── OrderingContextModelSnapshot.cs │ │ │ ├── OrderingContextSeed.cs │ │ │ └── Services │ │ │ │ ├── IIdentityService.cs │ │ │ │ └── IdentityService.cs │ │ ├── Ordering.API.csproj │ │ ├── OrderingSettings.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Proto │ │ │ └── ordering.proto │ │ ├── README.md │ │ ├── Setup │ │ │ ├── CardTypes.csv │ │ │ └── OrderStatus.csv │ │ ├── Startup.cs │ │ ├── appsettings.json │ │ ├── azds.yaml │ │ └── web.config │ ├── Ordering.BackgroundTasks │ │ ├── BackgroundTaskSettings.cs │ │ ├── Dockerfile │ │ ├── Extensions │ │ │ └── CustomExtensionMethods.cs │ │ ├── Ordering.BackgroundTasks.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── Ordering.Domain │ │ ├── AggregatesModel │ │ │ ├── BuyerAggregate │ │ │ │ ├── Buyer.cs │ │ │ │ ├── CardType.cs │ │ │ │ └── PaymentMethod.cs │ │ │ └── OrderAggregate │ │ │ │ ├── Address.cs │ │ │ │ ├── Order.cs │ │ │ │ ├── OrderItem.cs │ │ │ │ ├── OrderManager.cs │ │ │ │ └── OrderStatus.cs │ │ ├── Exceptions │ │ │ └── OrderingDomainException.cs │ │ ├── GlobalUsings.cs │ │ ├── Ordering.Domain.csproj │ │ └── SeedWork │ │ │ ├── Entity.cs │ │ │ ├── Enumeration.cs │ │ │ └── ValueObject.cs │ ├── Ordering.FunctionalTests │ │ ├── AutoAuthorizeMiddleware.cs │ │ ├── GlobalUsings.cs │ │ ├── HttpClientExtensions.cs │ │ ├── Ordering.FunctionalTests.csproj │ │ ├── OrderingScenarioBase.cs │ │ ├── OrderingScenarios.cs │ │ ├── OrderingTestStartup.cs │ │ └── appsettings.json │ ├── Ordering.Infrastructure │ │ ├── EntityConfigurations │ │ │ ├── BuyerEntityTypeConfiguration.cs │ │ │ ├── CardTypeEntityTypeConfiguration.cs │ │ │ ├── ClientRequestEntityTypeConfiguration.cs │ │ │ ├── OrderEntityTypeConfiguration.cs │ │ │ ├── OrderItemEntityTypeConfiguration.cs │ │ │ ├── OrderStatusEntityTypeConfiguration.cs │ │ │ └── PaymentMethodEntityTypeConfiguration.cs │ │ ├── GlobalUsings.cs │ │ ├── Idempotency │ │ │ └── ClientRequest.cs │ │ ├── Ordering.Infrastructure.csproj │ │ └── OrderingContext.cs │ ├── Ordering.SignalrHub │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── GlobalUsings.cs │ │ ├── NotificationHub.cs │ │ ├── Ordering.SignalrHub.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.json │ │ └── azds.yaml │ └── Ordering.UnitTests │ │ ├── Builders.cs │ │ ├── Domain │ │ └── SeedWork │ │ │ └── ValueObjectTests.cs │ │ ├── GlobalUsings.cs │ │ └── Ordering.UnitTests.csproj ├── Payment │ └── Payment.API │ │ ├── Dockerfile │ │ ├── Dockerfile.develop │ │ ├── GlobalUsings.cs │ │ ├── Payment.API.csproj │ │ ├── PaymentSettings.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── azds.yaml └── Webhooks │ └── Webhooks.API │ ├── Controllers │ ├── HomeController.cs │ ├── WebhookSubscriptionRequest.cs │ └── WebhooksController.cs │ ├── Dockerfile │ ├── Dockerfile.develop │ ├── Exceptions │ └── WebhooksDomainException.cs │ ├── GlobalUsings.cs │ ├── Infrastructure │ ├── ActionResult │ │ └── InternalServerErrorObjectResult.cs │ ├── AuthorizeCheckOperationFilter.cs │ ├── HttpGlobalExceptionFilter.cs │ └── WebhooksContext.cs │ ├── Migrations │ ├── 20190118091148_Initial.Designer.cs │ ├── 20190118091148_Initial.cs │ └── WebhooksContextModelSnapshot.cs │ ├── Model │ ├── WebhookData.cs │ ├── WebhookSubscription.cs │ └── WebhookType.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Services │ ├── GrantUrlTesterService.cs │ ├── IGrantUrlTesterService.cs │ ├── IIdentityService.cs │ ├── IWebhooksRetriever.cs │ ├── IWebhooksSender.cs │ ├── IdentityService.cs │ ├── WebhooksRetriever.cs │ └── WebhooksSender.cs │ ├── Startup.cs │ ├── Webhooks.API.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── azds.yaml ├── Tests └── Services │ └── Application.FunctionalTests │ ├── Application.FunctionalTests.csproj │ ├── Extensions │ └── HttpClientExtensions.cs │ ├── GlobalUsings.cs │ ├── Middleware │ └── AutoAuthorizeMiddleware.cs │ ├── Services │ ├── Basket │ │ ├── BasketScenariosBase.cs │ │ ├── BasketTestsStartup.cs │ │ └── appsettings.json │ ├── Catalog │ │ ├── CatalogScenariosBase.cs │ │ └── appsettings.json │ ├── IntegrationEventsScenarios.cs │ └── Ordering │ │ ├── OrderingScenarios.cs │ │ ├── OrderingScenariosBase.cs │ │ ├── OrderingTestsStartup.cs │ │ └── appsettings.json │ └── Setup │ ├── CatalogBrands.csv │ ├── CatalogItems.csv │ ├── CatalogItems.zip │ └── CatalogTypes.csv ├── Web ├── WebMVC │ ├── .dockerignore │ ├── AppSettings.cs │ ├── Controllers │ │ ├── AccountController.cs │ │ ├── CartController.cs │ │ ├── CatalogController.cs │ │ ├── ErrorController.cs │ │ ├── OrderController.cs │ │ ├── OrderManagementController.cs │ │ └── TestController.cs │ ├── Dockerfile │ ├── Dockerfile.develop │ ├── Extensions │ │ ├── HttpClientExtensions.cs │ │ └── SessionExtensions.cs │ ├── Infrastructure │ │ ├── API.cs │ │ ├── HttpClientAuthorizationDelegatingHandler.cs │ │ ├── HttpClientRequestIdDelegatingHandler.cs │ │ └── WebContextSeed.cs │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ └── ToFile-publish.ps1 │ │ └── launchSettings.json │ ├── README.md │ ├── Services │ │ ├── BasketService.cs │ │ ├── CatalogService.cs │ │ ├── IBasketService.cs │ │ ├── ICatalogService.cs │ │ ├── IIdentityParser.cs │ │ ├── IOrderingService.cs │ │ ├── IdentityParser.cs │ │ ├── ModelDTOs │ │ │ ├── BasketDTO.cs │ │ │ ├── LocationDTO.cs │ │ │ ├── OrderDTO.cs │ │ │ └── OrderProcessAction.cs │ │ └── OrderingService.cs │ ├── Setup │ │ ├── images.zip │ │ └── override.css │ ├── Startup.cs │ ├── ViewComponents │ │ ├── Cart.cs │ │ └── CartList.cs │ ├── ViewModels │ │ ├── Annotations │ │ │ ├── CardExpiration.cs │ │ │ ├── LatitudeCoordinate.cs │ │ │ └── LongitudeCoordinate.cs │ │ ├── ApplicationUser.cs │ │ ├── Basket.cs │ │ ├── BasketItem.cs │ │ ├── Campaign.cs │ │ ├── CampaignItem.cs │ │ ├── CartViewModels │ │ │ └── IndexViewModel.cs │ │ ├── Catalog.cs │ │ ├── CatalogItem.cs │ │ ├── CatalogViewModels │ │ │ └── IndexViewModel.cs │ │ ├── Converters │ │ │ └── NumberToStringConverter.cs │ │ ├── Header.cs │ │ ├── Order.cs │ │ ├── OrderItem.cs │ │ └── Pagination │ │ │ └── PaginationInfo.cs │ ├── Views │ │ ├── Cart │ │ │ └── Index.cshtml │ │ ├── Catalog │ │ │ ├── Index.cshtml │ │ │ ├── _pagination.cshtml │ │ │ └── _product.cshtml │ │ ├── Order │ │ │ ├── Create.cshtml │ │ │ ├── Detail.cshtml │ │ │ ├── Index.cshtml │ │ │ └── _OrderItems.cshtml │ │ ├── OrderManagement │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Components │ │ │ │ ├── Cart │ │ │ │ │ └── Default.cshtml │ │ │ │ └── CartList │ │ │ │ │ └── Default.cshtml │ │ │ ├── Error.cshtml │ │ │ ├── _Header.cshtml │ │ │ ├── _Layout.cshtml │ │ │ ├── _LoginPartial.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ ├── WebMVC.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── azds.yaml │ ├── bundleconfig.json │ ├── compilerconfig.json │ ├── compilerconfig.json.defaults │ ├── globalusings.cs │ ├── libman.json │ ├── values.dev.yaml │ ├── web.config │ └── wwwroot │ │ ├── _references.js │ │ ├── css │ │ ├── _variables.scss │ │ ├── app.component.css │ │ ├── app.component.min.css │ │ ├── app.component.scss │ │ ├── app.css │ │ ├── basket │ │ │ ├── basket-status │ │ │ │ ├── basket-status.component.css │ │ │ │ ├── basket-status.component.min.css │ │ │ │ └── basket-status.component.scss │ │ │ ├── basket.component.css │ │ │ ├── basket.component.min.css │ │ │ └── basket.component.scss │ │ ├── catalog │ │ │ ├── catalog.component.css │ │ │ ├── catalog.component.min.css │ │ │ └── catalog.component.scss │ │ ├── orders │ │ │ ├── orders-detail │ │ │ │ ├── orders-detail.component.css │ │ │ │ ├── orders-detail.component.min.css │ │ │ │ └── orders-detail.component.scss │ │ │ ├── orders-new │ │ │ │ ├── orders-new.component.css │ │ │ │ ├── orders-new.component.min.css │ │ │ │ └── orders-new.component.scss │ │ │ ├── orders.component.css │ │ │ ├── orders.component.min.css │ │ │ └── orders.component.scss │ │ ├── override.css │ │ ├── shared │ │ │ └── components │ │ │ │ ├── header │ │ │ │ ├── header.css │ │ │ │ ├── header.min.css │ │ │ │ └── header.scss │ │ │ │ ├── identity │ │ │ │ ├── identity.css │ │ │ │ ├── identity.min.css │ │ │ │ └── identity.scss │ │ │ │ └── pager │ │ │ │ ├── pager.css │ │ │ │ ├── pager.min.css │ │ │ │ └── pager.scss │ │ └── toastr.css │ │ ├── favicon.ico │ │ ├── fonts │ │ ├── Montserrat-Bold.eot │ │ ├── Montserrat-Bold.svg │ │ ├── Montserrat-Bold.ttf │ │ ├── Montserrat-Bold.woff │ │ ├── Montserrat-Bold.woff2 │ │ ├── Montserrat-Regular.eot │ │ ├── Montserrat-Regular.svg │ │ ├── Montserrat-Regular.ttf │ │ ├── Montserrat-Regular.woff │ │ └── Montserrat-Regular.woff2 │ │ └── images │ │ ├── arrow-down.png │ │ ├── arrow-right.svg │ │ ├── brand.png │ │ ├── brand_dark.png │ │ ├── cart-inoperative.png │ │ ├── cart.png │ │ ├── logout.png │ │ ├── main_banner.png │ │ ├── main_banner_text.png │ │ ├── main_banner_text.svg │ │ ├── main_footer_text.png │ │ ├── my_orders.png │ │ └── refresh.svg ├── WebStatus │ ├── Controllers │ │ └── HomeController.cs │ ├── Dockerfile │ ├── GlobalUsings.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── Views │ │ ├── Home │ │ │ └── Config.cshtml │ │ └── Shared │ │ │ └── Error.cshtml │ ├── WebStatus.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── bundleconfig.json │ ├── libman.json │ └── wwwroot │ │ ├── css │ │ ├── custom.css │ │ ├── site.css │ │ └── site.min.css │ │ ├── favicon.ico │ │ └── lib │ │ └── bootstrap │ │ └── dist │ │ ├── css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js └── WebhookClient │ ├── .dockerignore │ ├── .gitignore │ ├── Controllers │ ├── AccountController.cs │ └── WebhooksReceivedController.cs │ ├── Dockerfile │ ├── GlobalUsings.cs │ ├── HeaderNames.cs │ ├── HttpClientAuthorizationDelegatingHandler.cs │ ├── Models │ ├── WebHookReceived.cs │ ├── WebhookData.cs │ ├── WebhookResponse.cs │ └── WebhookSubscriptionRequest.cs │ ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.cshtml │ ├── Index.cshtml.cs │ ├── Privacy.cshtml │ ├── Privacy.cshtml.cs │ ├── RegisterWebhook.cshtml │ ├── RegisterWebhook.cshtml.cs │ ├── Shared │ │ ├── _Layout.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── WebhooksList.cshtml │ ├── WebhooksList.cshtml.cs │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Services │ ├── IHooksRepository.cs │ ├── IWebhooksClient.cs │ ├── InMemoryHooksRepository.cs │ └── WebhooksClient.cs │ ├── Settings.cs │ ├── Startup.cs │ ├── WebhookClient.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── images │ ├── brand.png │ └── main_banner.png │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map ├── docker-compose-tests.override.yml ├── docker-compose-tests.yml ├── docker-compose-windows.prod.yml ├── docker-compose.dcproj ├── docker-compose.elk.yml ├── docker-compose.override.windows.yml ├── docker-compose.override.yml ├── docker-compose.prod.yml ├── docker-compose.windows.yml ├── docker-compose.yml ├── eShopOnContainers-ServicesAndWebApps.sln ├── package-lock.json ├── prepare-devspaces.ps1 └── run-test-infrastructure.ps1 /.github/workflows/composite/build/action.yml: -------------------------------------------------------------------------------- 1 | name: "Build for PRe" 2 | description: "Builds a docker image without pushing" 3 | 4 | inputs: 5 | service: 6 | description: "Service to build" 7 | required: true 8 | registry_endpoint: 9 | description: "Image registry repo e.g. myacr.azureacr.io/eshop" 10 | required: true 11 | 12 | runs: 13 | using: "composite" 14 | steps: 15 | - name: Compose build ${{ inputs.service }} 16 | shell: bash 17 | run: sudo -E docker-compose build ${{ inputs.service }} 18 | working-directory: ./src 19 | env: 20 | TAG: ${{ env.BRANCH }} 21 | REGISTRY: ${{ inputs.registry_endpoint }} 22 | -------------------------------------------------------------------------------- /deploy/azure/az/cosmos/deploycosmos.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "name": { 6 | "value": "eshop-nosql" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /deploy/azure/az/redis/redisdeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "namespaceprefix": { 6 | "value": "eshopredis" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /deploy/azure/az/servicebus/sbusdeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "namespaceprefix": { 6 | "value": "eshopsb" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /deploy/azure/az/sql/sqldeploy.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "sql_server": { 6 | "value": { 7 | "name": "eshopsql", 8 | "dbs": { 9 | "ordering": "orderingdb", 10 | "identity": "identitydb", 11 | "catalog": "catalogdb" 12 | } 13 | } 14 | }, 15 | "admin": { 16 | "value": null 17 | }, 18 | "adminpwd": { 19 | "value": null 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /deploy/azure/az/storage/catalog/deploystorage.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "catalogstorage": { 6 | "value": "catalog" 7 | }, 8 | "profileName":{ 9 | "value": "eshopcatalog" 10 | }, 11 | "endpointName":{ 12 | "value": "catalog-endpoint" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /deploy/elk/elasticsearch/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://github.com/elastic/elasticsearch-docker 2 | FROM docker.elastic.co/elasticsearch/elasticsearch-oss:6.0.0 3 | 4 | # Add your elasticsearch plugins setup here 5 | # Example: RUN elasticsearch-plugin install analysis-icu 6 | -------------------------------------------------------------------------------- /deploy/elk/img/elk/azure-nsg-inboundportsConfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/azure-nsg-inboundportsConfig.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/bitnami_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/bitnami_splash.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/create-vm-elk-azure-last-step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/create-vm-elk-azure-last-step.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/create-vm-elk-azure-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/create-vm-elk-azure-summary.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/create-vm-elk-azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/create-vm-elk-azure.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/discover-kibana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/discover-kibana.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/kibana_eshops_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/kibana_eshops_index.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/kibana_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/kibana_result.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/kibana_startup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/kibana_startup.png -------------------------------------------------------------------------------- /deploy/elk/img/elk/kibana_working.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/elk/img/elk/kibana_working.png -------------------------------------------------------------------------------- /deploy/elk/kibana/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://github.com/elastic/kibana-docker 2 | FROM docker.elastic.co/kibana/kibana-oss:6.0.0 3 | 4 | # Add your kibana plugins setup here 5 | # Example: RUN kibana-plugin install 6 | -------------------------------------------------------------------------------- /deploy/elk/kibana/config/kibana.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Default Kibana configuration from kibana-docker. 3 | ## from https://github.com/elastic/kibana-docker/blob/master/build/kibana/config/kibana.yml 4 | # 5 | server.name: kibana 6 | server.host: "0" 7 | elasticsearch.url: http://elasticsearch:9200 8 | -------------------------------------------------------------------------------- /deploy/elk/logstash/Dockerfile: -------------------------------------------------------------------------------- 1 | # https://github.com/elastic/logstash-docker 2 | FROM docker.elastic.co/logstash/logstash-oss:6.0.0 3 | 4 | # Add your logstash plugins setup here 5 | # Example: RUN logstash-plugin install logstash-filter-json 6 | RUN logstash-plugin install logstash-input-http -------------------------------------------------------------------------------- /deploy/elk/logstash/config/logstash.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Default Logstash configuration from logstash-docker. 3 | ## from https://github.com/elastic/logstash-docker/blob/master/build/logstash/config/logstash-oss.yml 4 | # 5 | http.host: "0.0.0.0" 6 | path.config: /usr/share/logstash/pipeline -------------------------------------------------------------------------------- /deploy/elk/logstash/pipeline/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | http { 3 | #default host 0.0.0.0:8080 4 | codec => json 5 | } 6 | } 7 | 8 | ## Add your filters / logstash plugins configuration here 9 | filter { 10 | split { 11 | field => "events" 12 | target => "e" 13 | remove_field => "events" 14 | } 15 | } 16 | 17 | output { 18 | elasticsearch { 19 | hosts => "elasticsearch:9200" 20 | index=>"eshops-%{+xxxx.ww}" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /deploy/k8s/README.md: -------------------------------------------------------------------------------- 1 | # Kubernetes deployment 2 | 3 | This folder contains the files required to deploy eShopOnContainers to a Kubernetes cluster. 4 | 5 | For more information see the following articles in the [wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki): 6 | 7 | - [Deploy to Local Kubernetes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes) 8 | - [Deploy to Azure Kubernetes Service (AKS)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS)) 9 | -------------------------------------------------------------------------------- /deploy/k8s/dashboard-adminuser.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: admin-user 5 | namespace: kubernetes-dashboard 6 | --- 7 | apiVersion: rbac.authorization.k8s.io/v1 8 | kind: ClusterRoleBinding 9 | metadata: 10 | name: admin-user 11 | roleRef: 12 | apiGroup: rbac.authorization.k8s.io 13 | kind: ClusterRole 14 | name: cluster-admin 15 | subjects: 16 | - kind: ServiceAccount 17 | name: admin-user 18 | namespace: kubernetes-dashboard 19 | -------------------------------------------------------------------------------- /deploy/k8s/helm-rbac.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: tiller 5 | namespace: kube-system 6 | --- 7 | apiVersion: rbac.authorization.k8s.io/v1 8 | kind: ClusterRoleBinding 9 | metadata: 10 | name: tiller 11 | roleRef: 12 | apiGroup: rbac.authorization.k8s.io 13 | kind: ClusterRole 14 | name: cluster-admin 15 | subjects: 16 | - kind: ServiceAccount 17 | name: tiller 18 | namespace: kube-system -------------------------------------------------------------------------------- /deploy/k8s/helm/aks-httpaddon-cfg.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | labels: 5 | # addonmanager.kubernetes.io/mode: Reconcile 6 | app: addon-http-application-routing-ingress-nginx 7 | kubernetes.io/cluster-service: "true" 8 | name: addon-http-application-routing-nginx-configuration 9 | namespace: kube-system 10 | data: 11 | proxy-buffer-size: "128k" 12 | proxy-buffers: "4 256k" 13 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwms/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwms/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: apigwms 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwms/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop API Gateway for Mobile Shopping services installed 2 | -------------------------------------------------------- -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwms/templates/envoy-cm.yaml: -------------------------------------------------------------------------------- 1 | {{- $name := include "apigwms.fullname" . -}} 2 | 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: "envoy-{{ $name }}" 7 | labels: 8 | app: {{ template "apigwms.name" . }} 9 | chart: {{ template "apigwms.chart" .}} 10 | release: {{ .Release.Name }} 11 | heritage: {{ .Release.Service }} 12 | data: 13 | {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} 14 | 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwws/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwws/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: apigwws 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwws/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop API Gateway for Web Shopping services installed 2 | ----------------------------------------------------- -------------------------------------------------------------------------------- /deploy/k8s/helm/apigwws/templates/envoy-cm.yaml: -------------------------------------------------------------------------------- 1 | {{- $name := include "apigwws.fullname" . -}} 2 | 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: "envoy-{{ $name }}" 7 | labels: 8 | app: {{ template "apigwws.name" . }} 9 | chart: {{ template "apigwws.chart" .}} 10 | release: {{ .Release.Name }} 11 | heritage: {{ .Release.Service }} 12 | data: 13 | {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} 14 | 15 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: basket-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Basket API installed. 2 | -------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-data/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-data/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: basket-data 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-data/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Redis for keystore data installed 2 | ---------------------------------------- 3 | 4 | Redis is not directly exposed outside cluster. If need to access it from outside use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-data/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.inf.redis.basket.svc }} 5 | labels: 6 | app: {{ template "basket-data.name" . }} 7 | chart: {{ template "basket-data.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "basket-data.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/basket-data/values.yaml: -------------------------------------------------------------------------------- 1 | replicaCount: 1 2 | 3 | image: 4 | repository: redis 5 | tag: 4.0.10 6 | pullPolicy: IfNotPresent 7 | 8 | service: 9 | type: ClusterIP 10 | port: 6379 11 | 12 | 13 | resources: {} 14 | 15 | nodeSelector: {} 16 | 17 | tolerations: [] 18 | 19 | affinity: {} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/catalog-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/catalog-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: catalog-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/catalog-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Catalog API installed. 2 | ---------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "catalog-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | 10 | -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: eshop-common 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Common eShop resources installed: 2 | 3 | {{- if .Values.inf.registry -}} 4 | * Docker registry secret ({{ .Values.inf.registry.secretName }}) 5 | {{- end -}} 6 | 7 | +++ Done +++ -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/templates/_names.tpl: -------------------------------------------------------------------------------- 1 | {{- define "imagePullSecret" }} 2 | {{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.inf.registry.server (printf "%s:%s" .Values.inf.registry.login .Values.inf.registry.pwd | b64enc) | b64enc }} 3 | {{- end }} -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/templates/secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.inf.registry -}} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ .Values.inf.registry.secretName }} 6 | type: kubernetes.io/dockerconfigjson 7 | data: 8 | .dockerconfigjson: {{ template "imagePullSecret" . }} 9 | {{- end -}} -------------------------------------------------------------------------------- /deploy/k8s/helm/eshop-common/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/deploy/k8s/helm/eshop-common/values.yaml -------------------------------------------------------------------------------- /deploy/k8s/helm/identity-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/identity-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: identity-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/identity-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Identity API installed. 2 | ----------------------------- 3 | 4 | Access this API through ingress. -------------------------------------------------------------------------------- /deploy/k8s/helm/identity-api/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.identity }} 5 | labels: 6 | app: {{ template "identity-api.name" . }} 7 | chart: {{ template "identity-api.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "identity-api.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ingress_values.yaml: -------------------------------------------------------------------------------- 1 | # This file contains common ingress annotations when using AKS with Http Application Routing 2 | 3 | ingress: 4 | annotations: 5 | kubernetes.io/ingress.class: addon-http-application-routing 6 | ingress.kubernetes.io/ssl-redirect: "false" 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ingress_values_dockerk8s.yaml: -------------------------------------------------------------------------------- 1 | # This file contains common ingress annotations when using Kubernetes included in Docker Desktop 2 | 3 | ingress: 4 | annotations: 5 | kubernetes.io/ingress.class: "nginx" 6 | ingress.kubernetes.io/ssl-redirect: "false" 7 | nginx.ingress.kubernetes.io/ssl-redirect: "false" 8 | -------------------------------------------------------------------------------- /deploy/k8s/helm/keystore-data/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/keystore-data/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: keystore-data 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/keystore-data/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Redis for keystore data installed 2 | ---------------------------------------- 3 | 4 | Redis is not directly exposed outside cluster. If need to access it from outside use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "keystore-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/keystore-data/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.inf.redis.keystore.svc }} 5 | labels: 6 | app: {{ template "keystore-data.name" . }} 7 | chart: {{ template "keystore-data.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "keystore-data.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/keystore-data/values.yaml: -------------------------------------------------------------------------------- 1 | replicaCount: 1 2 | 3 | image: 4 | repository: redis 5 | tag: 4.0.10 6 | pullPolicy: IfNotPresent 7 | 8 | service: 9 | type: ClusterIP 10 | port: 6379 11 | 12 | 13 | resources: {} 14 | 15 | nodeSelector: {} 16 | 17 | tolerations: [] 18 | 19 | affinity: {} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/mobileshoppingagg/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/mobileshoppingagg/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: mobileshoppingagg 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/mobileshoppingagg/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Mobile Shopping Aggregator is installed 2 | ---------------------------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mobileshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/mobileshoppingagg/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.mobileshoppingagg }} 5 | labels: 6 | app: {{ template "mobileshoppingagg.name" . }} 7 | chart: {{ template "mobileshoppingagg.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "mobileshoppingagg.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: nosql-data 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop MongoDb Installed 2 | ----------------------- 3 | 4 | MongoDb is not exposed outside the cluster. If need to access it from outside, use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "nosql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/templates/_names.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{- define "mongo-name" -}} 3 | {{- if .Values.inf.mongo.host -}} 4 | {{- .Values.inf.mongo.host -}} 5 | {{- else -}} 6 | {{- printf "%s" "nosql-data" -}} 7 | {{- end -}} 8 | {{- end -}} 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "mongo-name" . }} 5 | labels: 6 | app: {{ template "nosql-data.name" . }} 7 | chart: {{ template "nosql-data.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "nosql-data.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/nosql-data/values.yaml: -------------------------------------------------------------------------------- 1 | replicaCount: 1 2 | 3 | image: 4 | repository: mongo 5 | tag: 3.6.5-jessie 6 | pullPolicy: IfNotPresent 7 | 8 | service: 9 | type: ClusterIP 10 | port: 27017 11 | 12 | 13 | resources: {} 14 | 15 | nodeSelector: {} 16 | 17 | tolerations: [] 18 | 19 | affinity: {} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: ordering-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Ordering API installed. 2 | ----------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-backgroundtasks/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-backgroundtasks/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: ordering-backgroundtasks 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-backgroundtasks/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Ordering Background Tasks installed. 2 | ------------------------------------------ 3 | 4 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-backgroundtasks/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.orderingbackgroundtasks }} 5 | labels: 6 | app: {{ template "ordering-backgroundtasks.name" . }} 7 | chart: {{ template "ordering-backgroundtasks.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "ordering-backgroundtasks.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-signalrhub/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-signalrhub/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: ordering-signalrhub 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-signalrhub/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Ordering SignalR Hub installed 2 | ------------------------------------ 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-signalrhub.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/ordering-signalrhub/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.orderingsignalrhub }} 5 | labels: 6 | app: {{ template "ordering-signalrhub.name" . }} 7 | chart: {{ template "ordering-signalrhub.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "ordering-signalrhub.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/payment-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/payment-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: payment-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/payment-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Payment API installed. 2 | ---------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "payment-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | 10 | -------------------------------------------------------------------------------- /deploy/k8s/helm/payment-api/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- $name := include "payment-api.fullname" . -}} 2 | 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: "cfg-{{ $name }}" 7 | labels: 8 | app: {{ template "payment-api.name" . }} 9 | chart: {{ template "payment-api.chart" .}} 10 | release: {{ .Release.Name }} 11 | heritage: {{ .Release.Service }} 12 | data: 13 | all__EventBusConnection: {{ .Values.inf.eventbus.constr }} 14 | all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" 15 | all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" -------------------------------------------------------------------------------- /deploy/k8s/helm/payment-api/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.payment }} 5 | labels: 6 | app: {{ template "payment-api.name" . }} 7 | chart: {{ template "payment-api.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "payment-api.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: rabbitmq 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop rabbitmq installed 2 | ------------------------- 3 | 4 | rabbitmq is not directly exposed outside cluster. If need to access it from outside use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "rabbitmq.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/templates/_names.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{- define "mongo-name" -}} 3 | {{- if .Values.inf.mongo.host -}} 4 | {{- .Values.inf.mongo.host -}} 5 | {{- else -}} 6 | {{- printf "%s" "rabbitmq" -}} 7 | {{- end -}} 8 | {{- end -}} 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.inf.eventbus.svc }} 5 | labels: 6 | app: {{ template "rabbitmq.name" . }} 7 | chart: {{ template "rabbitmq.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "rabbitmq.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/rabbitmq/values.yaml: -------------------------------------------------------------------------------- 1 | replicaCount: 1 2 | 3 | image: 4 | repository: rabbitmq 5 | tag: 3-management 6 | pullPolicy: IfNotPresent 7 | 8 | service: 9 | type: ClusterIP 10 | port: 5672 11 | 12 | 13 | resources: {} 14 | 15 | nodeSelector: {} 16 | 17 | tolerations: [] 18 | 19 | affinity: {} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: sql-data 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop SQL Server Installed 2 | -------------------------- 3 | 4 | SQL server is not exposed outside the cluster. If need to access it from outside, use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "sql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/templates/_names.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{- define "sql-name" -}} 3 | {{- if .Values.inf.sql.host -}} 4 | {{- .Values.inf.sql.host -}} 5 | {{- else -}} 6 | {{- printf "%s" "sql-data" -}} 7 | {{- end -}} 8 | {{- end -}} -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "sql-name" . }} 5 | labels: 6 | app: {{ template "sql-data.name" . }} 7 | chart: {{ template "sql-data.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "sql-data.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/sql-data/values.yaml: -------------------------------------------------------------------------------- 1 | replicaCount: 1 2 | 3 | image: 4 | repository: mcr.microsoft.com/mssql/server 5 | tag: 2019-latest 6 | pullPolicy: IfNotPresent 7 | 8 | service: 9 | type: ClusterIP 10 | port: 1433 11 | 12 | 13 | resources: {} 14 | 15 | nodeSelector: {} 16 | 17 | tolerations: [] 18 | 19 | affinity: {} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/tls-support/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/tls-support/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: tt-ssl 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/tls-support/templates/issuer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert-manager.io/v1alpha2 2 | kind: Issuer 3 | metadata: 4 | name: {{ .Values.issuerName }} 5 | namespace: default 6 | environment: {{ .Values.environment }} 7 | app: {{ .Values.applicationName }} 8 | spec: 9 | acme: 10 | server: {{ .Values.server }} 11 | email: not@used.com 12 | privateKeySecretRef: 13 | name: {{ .Values.issuerSecretName }} 14 | solvers: 15 | - http01: 16 | ingress: 17 | class: {{ .Values.ingressClass }} -------------------------------------------------------------------------------- /deploy/k8s/helm/tls-support/values-prod.yaml: -------------------------------------------------------------------------------- 1 | applicationName: eshop 2 | issuerName: letsencrypt-prod 3 | certName: eshop-cert-prod 4 | environment: prod 5 | server: https://acme-v02.api.letsencrypt.org/directory 6 | certSecretName: eshop-letsencrypt-prod 7 | issuerSecretName: letsencrypt-prod 8 | ingressClass: addon-http-application-routing -------------------------------------------------------------------------------- /deploy/k8s/helm/tls-support/values-staging.yaml: -------------------------------------------------------------------------------- 1 | applicationName: eshop 2 | issuerName: letsencrypt-staging 3 | certName: eshop-cert-staging 4 | environment: staging 5 | server: https://acme-staging-v02.api.letsencrypt.org/directory 6 | certSecretName: eshop-letsencrypt-staging 7 | issuerSecretName: letsencrypt-staging 8 | ingressClass: addon-http-application-routing -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-api/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-api/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webhooks-api 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-api/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Ordering API installed. 2 | ----------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-api/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.webhooks }} 5 | labels: 6 | app: {{ template "webhooks-api.name" . }} 7 | chart: {{ template "webhooks-api.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webhooks-api.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-web/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-web/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webhooks-web 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-web/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Ordering API installed. 2 | ----------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-web.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webhooks-web/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.webhooksweb }} 5 | labels: 6 | app: {{ template "webhooks-web.name" . }} 7 | chart: {{ template "webhooks-web.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webhooks-web.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webmvc/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webmvc/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webmvc 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webmvc/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop WebMVC installed. 2 | ----------------------- 3 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webmvc/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.mvc }} 5 | labels: 6 | app: {{ template "webmvc.name" . }} 7 | chart: {{ template "webmvc.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webmvc.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webshoppingagg/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webshoppingagg/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webshoppingagg 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webshoppingagg/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop Web Shopping Aggregator installed. 2 | ---------------------------------------- 3 | 4 | This API is not directly exposed outside cluster. If need to access it use: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | echo "Visit http://127.0.0.1:8080 to use your application" 8 | kubectl port-forward $POD_NAME 8080:80 9 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webshoppingagg/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.webshoppingagg }} 5 | labels: 6 | app: {{ template "webshoppingagg.name" . }} 7 | chart: {{ template "webshoppingagg.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webshoppingagg.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webspa/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webspa/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webspa 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webspa/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop WebSPA installed 2 | ---------------------- -------------------------------------------------------------------------------- /deploy/k8s/helm/webspa/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.spa }} 5 | labels: 6 | app: {{ template "webspa.name" . }} 7 | chart: {{ template "webspa.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webspa.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webstatus/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webstatus/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | appVersion: "1.0" 3 | description: A Helm chart for Kubernetes 4 | name: webstatus 5 | version: 0.1.0 6 | -------------------------------------------------------------------------------- /deploy/k8s/helm/webstatus/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eShop WebStatus installed. 2 | -------------------------- -------------------------------------------------------------------------------- /deploy/k8s/helm/webstatus/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Values.app.svc.status }} 5 | labels: 6 | app: {{ template "webstatus.name" . }} 7 | chart: {{ template "webstatus.chart" . }} 8 | release: {{ .Release.Name }} 9 | heritage: {{ .Release.Service }} 10 | spec: 11 | type: {{ .Values.service.type }} 12 | ports: 13 | - port: {{ .Values.service.port }} 14 | targetPort: http 15 | protocol: TCP 16 | name: http 17 | selector: 18 | app: {{ template "webstatus.name" . }} 19 | release: {{ .Release.Name }} 20 | -------------------------------------------------------------------------------- /deploy/k8s/nginx-ingress/local-cm.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: ingress-nginx 6 | app.kubernetes.io/part-of: ingress-nginx 7 | name: ingress-nginx-controller 8 | namespace: ingress-nginx 9 | data: 10 | proxy-buffer-size: "128k" 11 | proxy-buffers: "4 256k" -------------------------------------------------------------------------------- /deploy/k8s/nginx-ingress/local-dockerk8s/identityapi-cm-fix.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | mvc_e: http://10.0.75.1/webmvc 3 | -------------------------------------------------------------------------------- /deploy/k8s/nginx-ingress/local-dockerk8s/mvc-cm-fix.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | urls__IdentityUrl: http://10.0.75.1/identity 3 | urls__mvc: http://10.0.75.1/webmvc 4 | -------------------------------------------------------------------------------- /deploy/k8s/nginx-ingress/local-svc.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: ingress-nginx 5 | namespace: ingress-nginx 6 | labels: 7 | app.kubernetes.io/name: ingress-nginx 8 | app.kubernetes.io/part-of: ingress-nginx 9 | spec: 10 | externalTrafficPolicy: Local 11 | type: LoadBalancer 12 | selector: 13 | app.kubernetes.io/name: ingress-nginx 14 | app.kubernetes.io/part-of: ingress-nginx 15 | ports: 16 | - name: http 17 | port: 80 18 | targetPort: http 19 | - name: https 20 | port: 443 21 | targetPort: https -------------------------------------------------------------------------------- /deploy/k8s/nginx-ingress/service-nodeport.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: ingress-nginx 5 | namespace: ingress-nginx 6 | labels: 7 | app.kubernetes.io/name: ingress-nginx 8 | app.kubernetes.io/part-of: ingress-nginx 9 | spec: 10 | type: NodePort 11 | ports: 12 | - name: http 13 | port: 80 14 | targetPort: 80 15 | protocol: TCP 16 | - name: https 17 | port: 443 18 | targetPort: 443 19 | protocol: TCP 20 | selector: 21 | app.kubernetes.io/name: ingress-nginx 22 | app.kubernetes.io/part-of: ingress-nginx 23 | -------------------------------------------------------------------------------- /deploy/k8s/nodeports/rabbitmq-admin.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: rabbitmq-admin 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: rabbitmq 9 | ports: 10 | - port: 15672 11 | nodePort: 31672 12 | name: rabbitmq-port 13 | -------------------------------------------------------------------------------- /deploy/k8s/nodeports/sql-service.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: sql-service 5 | spec: 6 | type: NodePort 7 | selector: 8 | app: sql-data 9 | ports: 10 | - port: 1433 11 | nodePort: 31433 12 | name: sql-port 13 | -------------------------------------------------------------------------------- /deploy/windows/set-dockernat-networkategory-to-private.ps1: -------------------------------------------------------------------------------- 1 |  #Requires -RunAsAdministrator 2 | Get-NetConnectionProfile | Where-Object { $_.InterfaceAlias -match "(DockerNAT)" } | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } 3 | -------------------------------------------------------------------------------- /github-actions.md: -------------------------------------------------------------------------------- 1 | # eShopOnContainers - GitHub Actions 2 | 3 | To configure the github actions it is necessary to add the following secrets to the github repository: 4 | 5 | - `USERNAME` : Container registry user. 6 | - `PASSWORD` : Container registry password. 7 | - `REGISTRY_ENDPOINT` : Container registry name (eshop in the official repo https://hub.docker.com/u/eshop). 8 | - `REGISTRY_HOST` : docker.io for Docker Hub. 9 | -------------------------------------------------------------------------------- /img/DevOps-Cover-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/DevOps-Cover-small.png -------------------------------------------------------------------------------- /img/Microservices-cover-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/Microservices-cover-small.png -------------------------------------------------------------------------------- /img/architecture-book-cover-large-we.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/architecture-book-cover-large-we.png -------------------------------------------------------------------------------- /img/devops-book-cover-large-we.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/devops-book-cover-large-we.png -------------------------------------------------------------------------------- /img/eShopOnContainers-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/eShopOnContainers-architecture.png -------------------------------------------------------------------------------- /img/eshop-spa-app-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/eshop-spa-app-home.png -------------------------------------------------------------------------------- /img/eshop-webmvc-app-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/eshop-webmvc-app-screenshot.png -------------------------------------------------------------------------------- /img/eshop_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/eshop_logo.png -------------------------------------------------------------------------------- /img/xamarin-enterprise-patterns-ebook-cover-large-we.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/xamarin-enterprise-patterns-ebook-cover-large-we.png -------------------------------------------------------------------------------- /img/xamarin-enterprise-patterns-ebook-cover-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/img/xamarin-enterprise-patterns-ebook-cover-small.png -------------------------------------------------------------------------------- /src/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose*.yml 8 | *.md 9 | hosts 10 | LICENSE 11 | *.testsettings 12 | **/bin/ 13 | **/obj/ 14 | **/node_modules/ 15 | **/bower_components/ 16 | **/wwwroot/lib/ 17 | global.json 18 | **/appsettings.localhost.json 19 | Web/WebSPA/wwwroot/ 20 | packages/ 21 | test-results/ 22 | TestResults/ 23 | Mobile/ -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers; 2 | 3 | [Route("")] 4 | public class HomeController : Controller 5 | { 6 | [HttpGet] 7 | public IActionResult Index() 8 | { 9 | return new RedirectResult("~/swagger"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class AddBasketItemRequest 4 | { 5 | public int CatalogItemId { get; set; } 6 | 7 | public string BasketId { get; set; } 8 | 9 | public int Quantity { get; set; } 10 | 11 | public AddBasketItemRequest() 12 | { 13 | Quantity = 1; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketData.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class BasketData 4 | { 5 | public string BuyerId { get; set; } 6 | 7 | public List Items { get; set; } = new(); 8 | 9 | public BasketData() 10 | { 11 | } 12 | 13 | public BasketData(string buyerId) 14 | { 15 | BuyerId = buyerId; 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketDataItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class BasketDataItem 4 | { 5 | public string Id { get; set; } 6 | 7 | public int ProductId { get; set; } 8 | 9 | public string ProductName { get; set; } 10 | 11 | public decimal UnitPrice { get; set; } 12 | 13 | public decimal OldUnitPrice { get; set; } 14 | 15 | public int Quantity { get; set; } 16 | 17 | public string PictureUrl { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/CatalogItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class CatalogItem 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public decimal Price { get; set; } 10 | 11 | public string PictureUri { get; set; } 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderItemData.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class OrderItemData 4 | { 5 | public int ProductId { get; set; } 6 | 7 | public string ProductName { get; set; } 8 | 9 | public decimal UnitPrice { get; set; } 10 | 11 | public decimal Discount { get; set; } 12 | 13 | public int Units { get; set; } 14 | 15 | public string PictureUrl { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class UpdateBasketItemData 4 | { 5 | public string BasketItemId { get; set; } 6 | 7 | public int NewQty { get; set; } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class UpdateBasketItemsRequest 4 | { 5 | public string BasketId { get; set; } 6 | 7 | public ICollection Updates { get; set; } 8 | 9 | public UpdateBasketItemsRequest() 10 | { 11 | Updates = new List(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class UpdateBasketRequest 4 | { 5 | public string BuyerId { get; set; } 6 | 7 | public IEnumerable Items { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; 2 | 3 | public class UpdateBasketRequestItemData 4 | { 5 | public string Id { get; set; } // Basket id 6 | 7 | public int ProductId { get; set; } // Catalog item id 8 | 9 | public int Quantity { get; set; } // Quantity 10 | } 11 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Services/IBasketService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; 2 | 3 | public interface IBasketService 4 | { 5 | Task GetByIdAsync(string id); 6 | 7 | Task UpdateAsync(BasketData currentBasket); 8 | } 9 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Services/ICatalogService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; 2 | 3 | public interface ICatalogService 4 | { 5 | Task GetCatalogItemAsync(int id); 6 | 7 | Task> GetCatalogItemsAsync(IEnumerable ids); 8 | } 9 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Services/IOrderApiClient.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; 2 | 3 | public interface IOrderApiClient 4 | { 5 | Task GetOrderDraftFromBasketAsync(BasketData basket); 6 | } 7 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/Services/IOrderingService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; 2 | 3 | public interface IOrderingService 4 | { 5 | Task GetOrderDraftAsync(BasketData basketData); 6 | } 7 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Debug" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Debug" 12 | } 13 | } 14 | }, 15 | "Serilog": { 16 | "SeqServerUrl": null, 17 | "LogstashgUrl": null, 18 | "MinimumLevel": { 19 | "Default": "Information" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/appsettings.localhost.json: -------------------------------------------------------------------------------- 1 | { 2 | "urls": { 3 | "basket": "http://localhost:55103", 4 | "catalog": "http://localhost:55101", 5 | "orders": "http://localhost:55102", 6 | "identity": "http://localhost:55105", 7 | "grpcBasket": "http://localhost:5580", 8 | "grpcCatalog": "http://localhost:81", 9 | "grpcOrdering": "http://localhost:5581" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ApiGateways/Web.Bff.Shopping/aggregator/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ocelot: 2 | configPath: /app/configuration -------------------------------------------------------------------------------- /src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/BuildingBlocks/Devspaces.Support/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using Microsoft.AspNetCore.Http; 2 | global using Microsoft.Extensions.DependencyInjection; 3 | global using System.Collections.Generic; 4 | global using System.Net.Http; 5 | global using System.Threading.Tasks; 6 | global using System.Threading; 7 | -------------------------------------------------------------------------------- /src/BuildingBlocks/Devspaces.Support/HttpClientBuilderDevspacesExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Devspaces.Support; 2 | 3 | public static class HttpClientBuilderDevspacesExtensions 4 | { 5 | public static IHttpClientBuilder AddDevspacesSupport(this IHttpClientBuilder builder) 6 | { 7 | builder.AddHttpMessageHandler(); 8 | return builder; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/BuildingBlocks/Devspaces.Support/ServiceCollectionDevspacesExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Devspaces.Support; 2 | 3 | public static class ServiceCollectionDevspacesExtensions 4 | { 5 | public static IServiceCollection AddDevspaces(this IServiceCollection services) 6 | { 7 | services.AddTransient(); 8 | return services; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | $(NoWarn);CS0618 4 | 5 | -------------------------------------------------------------------------------- /src/DockerfileSolutionRestore.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/DockerfileSolutionRestore.txt -------------------------------------------------------------------------------- /src/Mobile/README.md: -------------------------------------------------------------------------------- 1 | # eShopOnContainers 2 | The content of this folder has been moved to the repository - [eshop-mobile-client](https://github.com/dotnet-architecture/eshop-mobile-client) 3 | -------------------------------------------------------------------------------- /src/NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Auth/Client/popup.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/BasketSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API; 2 | 3 | public class BasketSettings 4 | { 5 | public string ConnectionString { get; set; } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers; 2 | 3 | public class HomeController : Controller 4 | { 5 | // GET: // 6 | public IActionResult Index() 7 | { 8 | return new RedirectResult("~/swagger"); 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/CustomExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API; 2 | 3 | public static class CustomExtensionMethods 4 | { 5 | public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration) 6 | { 7 | var hcBuilder = services.AddHealthChecks(); 8 | 9 | hcBuilder.AddCheck("self", () => HealthCheckResult.Healthy()); 10 | 11 | hcBuilder 12 | .AddRedis( 13 | configuration["ConnectionString"], 14 | name: "redis-check", 15 | tags: new string[] { "redis" }); 16 | 17 | return services; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Dockerfile.develop: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:7.0 2 | ARG BUILD_CONFIGURATION=Debug 3 | ENV ASPNETCORE_ENVIRONMENT=Development 4 | ENV DOTNET_USE_POLLING_FILE_WATCHER=true 5 | EXPOSE 80 6 | 7 | WORKDIR /src 8 | 9 | COPY ["Services/Basket/Basket.API/Basket.API.csproj", "Services/Basket/Basket.API/"] 10 | COPY ["NuGet.config", "NuGet.config"] 11 | 12 | RUN dotnet restore Services/Basket/Basket.API/Basket.API.csproj -nowarn:msb3202,nu1503 13 | COPY . . 14 | WORKDIR /src/Services/Basket/Basket.API 15 | RUN dotnet build -c $BUILD_CONFIGURATION 16 | 17 | ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.ActionResults; 2 | 3 | public class InternalServerErrorObjectResult : ObjectResult 4 | { 5 | public InternalServerErrorObjectResult(object error) 6 | : base(error) 7 | { 8 | StatusCode = StatusCodes.Status500InternalServerError; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.Filters; 2 | 3 | public class JsonErrorResponse 4 | { 5 | public string[] Messages { get; set; } 6 | 7 | public object DeveloperMessage { get; set; } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.Middlewares; 2 | 3 | public class FailingOptions 4 | { 5 | public string ConfigPath = "/Failing"; 6 | public List EndpointPaths { get; set; } = new List(); 7 | 8 | public List NotFilteredPaths { get; set; } = new List(); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingStartupFilter.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.Middlewares; 2 | 3 | public class FailingStartupFilter : IStartupFilter 4 | { 5 | private readonly Action _options; 6 | public FailingStartupFilter(Action optionsAction) 7 | { 8 | _options = optionsAction; 9 | } 10 | 11 | public Action Configure(Action next) 12 | { 13 | return app => 14 | { 15 | app.UseFailingMiddleware(_options); 16 | next(app); 17 | }; 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingWebHostBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.API.Infrastructure.Middlewares; 2 | 3 | public static class WebHostBuildertExtensions 4 | { 5 | public static IWebHostBuilder UseFailing(this IWebHostBuilder builder, Action options) 6 | { 7 | builder.ConfigureServices(services => 8 | { 9 | services.AddSingleton(new FailingStartupFilter(options)); 10 | }); 11 | return builder; 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Model/CustomerBasket.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Model; 2 | 3 | public class CustomerBasket 4 | { 5 | public string BuyerId { get; set; } 6 | 7 | public List Items { get; set; } = new(); 8 | 9 | public CustomerBasket() 10 | { 11 | 12 | } 13 | 14 | public CustomerBasket(string customerId) 15 | { 16 | BuyerId = customerId; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Model/IBasketRepository.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Model; 2 | 3 | public interface IBasketRepository 4 | { 5 | Task GetBasketAsync(string customerId); 6 | IEnumerable GetUsers(); 7 | Task UpdateBasketAsync(CustomerBasket basket); 8 | Task DeleteBasketAsync(string id); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Basket Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Services/IIdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Services; 2 | 3 | public interface IIdentityService 4 | { 5 | string GetUserIdentity(); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/Services/IdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API.Services; 2 | 3 | public class IdentityService : IIdentityService 4 | { 5 | private IHttpContextAccessor _context; 6 | 7 | public IdentityService(IHttpContextAccessor context) 8 | { 9 | _context = context ?? throw new ArgumentNullException(nameof(context)); 10 | } 11 | 12 | public string GetUserIdentity() 13 | { 14 | return _context.HttpContext.User.FindFirst("sub").Value; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/TestHttpResponseTrailersFeature.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Basket.API; 2 | 3 | internal class TestHttpResponseTrailersFeature : IHttpResponseTrailersFeature 4 | { 5 | public IHeaderDictionary Trailers { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "MinimumLevel": { 4 | "Default": "Debug", 5 | "Override": { 6 | "Microsoft": "Warning", 7 | "Microsoft.eShopOnContainers": "Debug", 8 | "System": "Warning" 9 | } 10 | } 11 | }, 12 | "IdentityUrlExternal": "http://localhost:5105", 13 | "IdentityUrl": "http://localhost:5105", 14 | "ConnectionString": "127.0.0.1", 15 | "AzureServiceBusEnabled": false, 16 | "EventBusConnection": "localhost" 17 | } -------------------------------------------------------------------------------- /src/Services/Basket/Basket.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ingress: 2 | enabled: true 3 | tls: [] -------------------------------------------------------------------------------- /src/Services/Basket/Basket.FunctionalTests/Base/HttpClientExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Basket.FunctionalTests.Base; 2 | 3 | static class HttpClientExtensions 4 | { 5 | public static HttpClient CreateIdempotentClient(this TestServer server) 6 | { 7 | var client = server.CreateClient(); 8 | 9 | client.DefaultRequestHeaders.Add("x-requestid", Guid.NewGuid().ToString()); 10 | 11 | return client; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Basket/Basket.FunctionalTests/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "IdentityUrl": "http://localhost:5105", 11 | "IdentityUrlExternal": "http://localhost:5105", 12 | "ConnectionString": "127.0.0.1", 13 | "isTest": "true", 14 | "EventBusConnection": "localhost", 15 | "SubscriptionClientName": "Basket", 16 | "SuppressCheckForUnhandledSecurityMetadata": true 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/CatalogSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API; 2 | 3 | public class CatalogSettings 4 | { 5 | public string PicBaseUrl { get; set; } 6 | 7 | public string EventBusConnection { get; set; } 8 | 9 | public bool UseCustomizationData { get; set; } 10 | 11 | public bool AzureStorageEnabled { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 2 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers; 3 | 4 | public class HomeController : Controller 5 | { 6 | // GET: // 7 | public IActionResult Index() 8 | { 9 | return new RedirectResult("~/swagger"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model; 2 | 3 | public static class CatalogItemExtensions 4 | { 5 | public static void FillProductUrl(this CatalogItem item, string picBaseUrl, bool azureStorageEnabled) 6 | { 7 | if (item != null) 8 | { 9 | item.PictureUri = azureStorageEnabled 10 | ? picBaseUrl + item.PictureFileName 11 | : picBaseUrl.Replace("[0]", item.Id.ToString()); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.ActionResults; 2 | 3 | public class InternalServerErrorObjectResult : ObjectResult 4 | { 5 | public InternalServerErrorObjectResult(object error) 6 | : base(error) 7 | { 8 | StatusCode = StatusCodes.Status500InternalServerError; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170316120022_RefactoringEventBusNamespaces.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Catalog.API.Infrastructure.Migrations 4 | { 5 | public partial class RefactoringEventBusNamespaces : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | 10 | } 11 | 12 | protected override void Down(MigrationBuilder migrationBuilder) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Infrastructure/Exceptions/CatalogDomainException.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.Exceptions; 2 | 3 | /// 4 | /// Exception type for app exceptions 5 | /// 6 | public class CatalogDomainException : Exception 7 | { 8 | public CatalogDomainException() 9 | { } 10 | 11 | public CatalogDomainException(string message) 12 | : base(message) 13 | { } 14 | 15 | public CatalogDomainException(string message, Exception innerException) 16 | : base(message, innerException) 17 | { } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Model/CatalogBrand.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model; 2 | 3 | public class CatalogBrand 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Brand { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Model/CatalogType.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model; 2 | 3 | public class CatalogType 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Type { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/1.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/10.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/11.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/12.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/13.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/14.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/2.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/3.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/4.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/5.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/6.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/7.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/8.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Pics/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Pics/9.png -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Catalog Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogBrands.csv: -------------------------------------------------------------------------------- 1 | CatalogBrand 2 | .NET 3 | Other 4 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogItems-MVC.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Setup/CatalogItems-MVC.zip -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogItems-SPA.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Setup/CatalogItems-SPA.zip -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/CatalogTypes.csv: -------------------------------------------------------------------------------- 1 | CatalogType 2 | Mug 3 | T-Shirt 4 | Pin -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/Setup/README.md: -------------------------------------------------------------------------------- 1 | # Catalog set up 2 | 3 | The catalog images have been updated to the new SPA looks. 4 | 5 | If you want to use the classical images: 6 | 7 | 1. Drop the `Microsoft.eShopOnContainers.Services.CatalogDb` database from the `sqldata` container. 8 | 2. Rename `CatalogItems-MVC.zip` as `CatalogItems.zip` 9 | 3. Rebuild the `catalog-api` service with `docker-compose build catalog-api` 10 | 4. Restart the application as usual 11 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/ViewModel/PaginatedItemsViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; 2 | 3 | public class PaginatedItemsViewModel where TEntity : class 4 | { 5 | public int PageIndex { get; private set; } 6 | 7 | public int PageSize { get; private set; } 8 | 9 | public long Count { get; private set; } 10 | 11 | public IEnumerable Data { get; private set; } 12 | 13 | public PaginatedItemsViewModel(int pageIndex, int pageSize, long count, IEnumerable data) 14 | { 15 | PageIndex = pageIndex; 16 | PageSize = pageSize; 17 | Count = count; 18 | Data = data; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", 3 | "PicBaseUrl": "http://localhost:5101/api/v1/catalog/items/[0]/pic/", 4 | "Serilog": { 5 | "MinimumLevel": { 6 | "Default": "Debug", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Debug", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "EventBusConnection": "localhost" 15 | } -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/eshop.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.API/eshop.pfx -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | ingress: 2 | enabled: true 3 | tls: [] -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.FunctionalTests/Setup/CatalogBrands.csv: -------------------------------------------------------------------------------- 1 | CatalogBrand 2 | Azure 3 | .NET 4 | Visual Studio 5 | SQL Server 6 | Other 7 | CatalogBrandTestOne 8 | CatalogBrandTestTwo -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.FunctionalTests/Setup/CatalogItems.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Catalog/Catalog.FunctionalTests/Setup/CatalogItems.zip -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.FunctionalTests/Setup/CatalogTypes.csv: -------------------------------------------------------------------------------- 1 | CatalogType 2 | Mug 3 | T-Shirt 4 | Sheet 5 | USB Memory Stick 6 | CatalogTypeTestOne 7 | CatalogTypeTestTwo -------------------------------------------------------------------------------- /src/Services/Catalog/Catalog.FunctionalTests/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", 3 | "ExternalCatalogBaseUrl": "http://localhost:5101", 4 | "IdentityUrl": "http://localhost:5105", 5 | "isTest": "true", 6 | "EventBusConnection": "localhost", 7 | "PicBaseUrl": "http://localhost:5101/api/v1/catalog/items/[0]/pic/", 8 | "SubscriptionClientName": "Catalog" 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/AppSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API 2 | { 3 | public class AppSettings 4 | { 5 | public string MvcClient { get; set; } 6 | 7 | public bool UseCustomizationData { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Devspaces/IdentityDevspacesBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces 2 | { 3 | static class IdentityDevspacesBuilderExtensions 4 | { 5 | public static IIdentityServerBuilder AddDevspacesIfNeeded(this IIdentityServerBuilder builder, bool useDevspaces) 6 | { 7 | if (useDevspaces) 8 | { 9 | builder.AddRedirectUriValidator(); 10 | } 11 | return builder; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record ForgotPasswordViewModel 4 | { 5 | [Required] 6 | [EmailAddress] 7 | public string Email { get; init; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record LoggedOutViewModel 4 | { 5 | public string PostLogoutRedirectUri { get; init; } 6 | public string ClientName { get; init; } 7 | public string SignOutIframeUrl { get; init; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record LoginViewModel 4 | { 5 | [Required] 6 | [EmailAddress] 7 | public string Email { get; set; } 8 | 9 | [Required] 10 | [DataType(DataType.Password)] 11 | public string Password { get; set; } 12 | 13 | [Display(Name = "Remember me?")] 14 | public bool RememberMe { get; set; } 15 | public string ReturnUrl { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record LogoutViewModel 4 | { 5 | public string LogoutId { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/RedirectViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public class RedirectViewModel 4 | { 5 | public string RedirectUrl { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record SendCodeViewModel 4 | { 5 | public string SelectedProvider { get; init; } 6 | 7 | public ICollection Providers { get; init; } 8 | 9 | public string ReturnUrl { get; init; } 10 | 11 | public bool RememberMe { get; init; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels 2 | { 3 | public record VerifyCodeViewModel 4 | { 5 | [Required] 6 | public string Provider { get; init; } 7 | 8 | [Required] 9 | public string Code { get; init; } 10 | 11 | public string ReturnUrl { get; init; } 12 | 13 | [Display(Name = "Remember this browser?")] 14 | public bool RememberBrowser { get; init; } 15 | 16 | [Display(Name = "Remember me?")] 17 | public bool RememberMe { get; init; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ConsentViewModels/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ConsentViewModels 4 | { 5 | public class ConsentInputModel 6 | { 7 | public string Button { get; set; } 8 | public IEnumerable ScopesConsented { get; set; } 9 | public bool RememberConsent { get; set; } 10 | public string ReturnUrl { get; set; } 11 | public string Description { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ConsentViewModels/ConsentOptions.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ConsentViewModels 2 | { 3 | public class ConsentOptions 4 | { 5 | public static bool EnableOfflineAccess = true; 6 | public static string OfflineAccessDisplayName = "Offline Access"; 7 | public static string OfflineAccessDescription = "Access to your applications and resources, even when you are offline"; 8 | 9 | public static readonly string MustChooseOneErrorMessage = "You must pick at least one permission"; 10 | public static readonly string InvalidSelectionErrorMessage = "Invalid selection"; 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ConsentViewModels/ConsentViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ConsentViewModels 4 | { 5 | public class ConsentViewModel : ConsentInputModel 6 | { 7 | public string ClientName { get; set; } 8 | public string ClientUrl { get; set; } 9 | public string ClientLogoUrl { get; set; } 10 | public bool AllowRememberConsent { get; set; } 11 | 12 | public IEnumerable IdentityScopes { get; set; } 13 | public IEnumerable ApiScopes { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ConsentViewModels/ProcessConsentResult.cs: -------------------------------------------------------------------------------- 1 | using Duende.IdentityServer.Models; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ConsentViewModels 4 | { 5 | public class ProcessConsentResult 6 | { 7 | public bool IsRedirect => RedirectUri != null; 8 | public string RedirectUri { get; set; } 9 | public Client Client { get; set; } 10 | 11 | public bool ShowView => ViewModel != null; 12 | public ConsentViewModel ViewModel { get; set; } 13 | 14 | public bool HasValidationError => ValidationError != null; 15 | public string ValidationError { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ConsentViewModels/ScopeViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ConsentViewModels 2 | { 3 | public class ScopeViewModel 4 | { 5 | public string Value { get; set; } 6 | public string DisplayName { get; set; } 7 | public string Description { get; set; } 8 | public bool Emphasize { get; set; } 9 | public bool Required { get; set; } 10 | public bool Checked { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models 4 | { 5 | public record ErrorViewModel 6 | { 7 | public ErrorMessage Error { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public record AddPhoneNumberViewModel 4 | { 5 | [Required] 6 | [Phone] 7 | [Display(Name = "Phone number")] 8 | public string PhoneNumber { get; init; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public record ConfigureTwoFactorViewModel 4 | { 5 | public string SelectedProvider { get; init; } 6 | 7 | public ICollection Providers { get; init; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public record FactorViewModel 4 | { 5 | public string Purpose { get; init; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public record IndexViewModel 4 | { 5 | public bool HasPassword { get; init; } 6 | 7 | public IList Logins { get; init; } 8 | 9 | public string PhoneNumber { get; init; } 10 | 11 | public bool TwoFactor { get; init; } 12 | 13 | public bool BrowserRemembered { get; init; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels 2 | { 3 | public record VerifyPhoneNumberViewModel 4 | { 5 | [Required] 6 | public string Code { get; init; } 7 | 8 | [Required] 9 | [Phone] 10 | [Display(Name = "Phone number")] 11 | public string PhoneNumber { get; init; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Account/ExternalProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | namespace IdentityServerHost.Quickstart.UI; 5 | 6 | public class ExternalProvider 7 | { 8 | public string DisplayName { get; set; } 9 | public string AuthenticationScheme { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Account/LoginInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class LoginInputModel 8 | { 9 | [Required] 10 | public string Username { get; set; } 11 | [Required] 12 | public string Password { get; set; } 13 | public bool RememberLogin { get; set; } 14 | public string ReturnUrl { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Account/LogoutInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class LogoutInputModel 8 | { 9 | public string LogoutId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Account/LogoutViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class LogoutViewModel : LogoutInputModel 8 | { 9 | public bool ShowLogoutPrompt { get; set; } = true; 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Account/RedirectViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | 6 | namespace IdentityServerHost.Quickstart.UI; 7 | 8 | public class RedirectViewModel 9 | { 10 | public string RedirectUrl { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Consent/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class ConsentInputModel 8 | { 9 | public string Button { get; set; } 10 | public IEnumerable ScopesConsented { get; set; } 11 | public bool RememberConsent { get; set; } 12 | public string ReturnUrl { get; set; } 13 | public string Description { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Consent/ScopeViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class ScopeViewModel 8 | { 9 | public string Value { get; set; } 10 | public string DisplayName { get; set; } 11 | public string Description { get; set; } 12 | public bool Emphasize { get; set; } 13 | public bool Required { get; set; } 14 | public bool Checked { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Device/DeviceAuthorizationInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class DeviceAuthorizationInputModel : ConsentInputModel 8 | { 9 | public string UserCode { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Device/DeviceAuthorizationViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServerHost.Quickstart.UI; 6 | 7 | public class DeviceAuthorizationViewModel : ConsentViewModel 8 | { 9 | public string UserCode { get; set; } 10 | public bool ConfirmUserCode { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Quickstart/Home/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | namespace IdentityServerHost.Quickstart.UI; 5 | 6 | public class ErrorViewModel 7 | { 8 | public ErrorViewModel() 9 | { 10 | } 11 | 12 | public ErrorViewModel(string error) 13 | { 14 | Error = new ErrorMessage { Error = error }; 15 | } 16 | 17 | public ErrorMessage Error { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Services/ILoginService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Services 2 | { 3 | public interface ILoginService 4 | { 5 | Task ValidateCredentials(T user, string password); 6 | 7 | Task FindByUsername(string user); 8 | 9 | Task SignIn(T user); 10 | 11 | Task SignInAsync(T user, AuthenticationProperties properties, string authenticationMethod = null); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Services/IRedirectService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Services 2 | { 3 | public interface IRedirectService 4 | { 5 | string ExtractRedirectUriFromReturnUrl(string url); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Access Denied

5 |

You do not have access to that resource.

6 |
7 |
-------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @model LogoutViewModel 2 | 3 |
4 |
5 |

Logout

6 |

Would you like to logut of IdentityServer?

7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Device/Success.cshtml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

Success

5 |

You have successfully authorized the device

6 |
7 |
8 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Shared/Redirect.cshtml: -------------------------------------------------------------------------------- 1 | @model RedirectViewModel 2 | 3 |
4 |
5 |

You are now being returned to the application

6 |

Once complete, you may close this tab.

7 |
8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |
4 | Error 5 |
6 |
7 | } -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServerHost.Quickstart.UI 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/values.dev.yaml: -------------------------------------------------------------------------------- 1 | enableDevspaces: "true" 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Bold.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Montserrat-Regular.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Bold.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-ExtraLight.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Light.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Medium.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-Regular.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.eot -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.ttf -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/fonts/Oswald-SemiBold.woff2 -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/icon.jpg -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/icon.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/arrow-down.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/brand.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/cart.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/header.jpg -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/logout.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/main_banner.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_banner_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/main_banner_text.png -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/signout-redirect.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function () { 2 | var a = document.querySelector("a.PostLogoutRedirectUri"); 3 | if (a) { 4 | window.location = a.href; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /src/Services/Identity/Identity.API/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Services/Identity/Identity.API/wwwroot/js/site.min.js -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers; 2 | 3 | public class HomeController : Controller 4 | { 5 | // GET: // 6 | public IActionResult Index() 7 | { 8 | return new RedirectResult("~/swagger"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/DTOs/BasketItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.DTOs; 2 | 3 | public class BasketItem 4 | { 5 | public string Id { get; set; } 6 | public int ProductId { get; set; } 7 | public string ProductName { get; set; } 8 | public decimal UnitPrice { get; set; } 9 | public decimal OldUnitPrice { get; set; } 10 | public int Quantity { get; set; } 11 | public string PictureUrl { get; set; } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/DTOs/BasketItemExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.DTOs; 2 | 3 | public static class BasketItemExtensions 4 | { 5 | public static OrderDraftModel.OrderItem ToOrderItemDTO(this BasketItem item) 6 | { 7 | return new OrderDraftModel.OrderItem() 8 | { 9 | ProductId = item.ProductId, 10 | ProductName = item.ProductName, 11 | PictureUrl = item.PictureUrl, 12 | UnitPrice = item.UnitPrice, 13 | Units = item.Quantity 14 | }; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/DTOs/CancelOrderModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.DTOs; 2 | 3 | public class CancelOrderModel 4 | { 5 | public int OrderNumber { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/DTOs/CreateOrderDraftModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.DTOs; 2 | 3 | public class CreateOrderDraftModel 4 | { 5 | 6 | public string BuyerId { get; set; } 7 | 8 | public IEnumerable Items { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/DTOs/ShipOrderModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.DTOs; 2 | 3 | public class ShipOrderModel 4 | { 5 | public int OrderNumber { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/ActionResults/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults; 2 | 3 | public class InternalServerErrorObjectResult : ObjectResult 4 | { 5 | public InternalServerErrorObjectResult(object error) 6 | : base(error) 7 | { 8 | StatusCode = StatusCodes.Status500InternalServerError; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20170403082405_NoBuyerPropertyInOrder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Ordering.API.Migrations 4 | { 5 | public partial class NoBuyerPropertyInOrder : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | 10 | } 11 | 12 | protected override void Down(MigrationBuilder migrationBuilder) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20170405110939_NoPaymentMethodPropertyInOrder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Ordering.API.Migrations 4 | { 5 | public partial class NoPaymentMethodPropertyInOrder : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | 10 | } 11 | 12 | protected override void Down(MigrationBuilder migrationBuilder) 13 | { 14 | 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Migrations/20190808132242_Change_Relation_Of_Orders.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | namespace Ordering.API.Infrastructure.Migrations 4 | { 5 | public partial class Change_Relation_Of_Orders : Migration 6 | { 7 | protected override void Up(MigrationBuilder migrationBuilder) 8 | { 9 | } 10 | 11 | protected override void Down(MigrationBuilder migrationBuilder) 12 | { 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Services/IIdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services; 2 | 3 | public interface IIdentityService 4 | { 5 | string GetUserIdentity(); 6 | 7 | string GetUserName(); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Infrastructure/Services/IdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services; 2 | 3 | public class IdentityService : IIdentityService 4 | { 5 | private IHttpContextAccessor _context; 6 | 7 | public IdentityService(IHttpContextAccessor context) 8 | { 9 | _context = context ?? throw new ArgumentNullException(nameof(context)); 10 | } 11 | 12 | public string GetUserIdentity() 13 | { 14 | return _context.HttpContext.User.FindFirst("sub").Value; 15 | } 16 | 17 | public string GetUserName() 18 | { 19 | return _context.HttpContext.User.Identity.Name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/OrderingSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.API; 2 | 3 | public class OrderingSettings 4 | { 5 | public bool UseCustomizationData { get; set; } 6 | 7 | public string ConnectionString { get; set; } 8 | 9 | public string EventBusConnection { get; set; } 10 | 11 | public int GracePeriodTime { get; set; } 12 | 13 | public int CheckUpdateTime { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/README.md: -------------------------------------------------------------------------------- 1 | # Containerized eShop - Orders Service 2 | Sample reference containerized application, cross-platform and microservices architecture. 3 | Powered by Microsoft 4 | 5 | Check procedures on how to get it started at the Wiki: 6 | https://github.com/dotnet/eShopOnContainers/wiki 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Setup/CardTypes.csv: -------------------------------------------------------------------------------- 1 | CardType 2 | Amex 3 | Visa 4 | MasterCard 5 | Capital One -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/Setup/OrderStatus.csv: -------------------------------------------------------------------------------- 1 | OrderStatus 2 | Submitted 3 | AwaitingValidation 4 | StockConfirmed 5 | Paid 6 | Shipped 7 | Cancelled -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.API/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/BackgroundTaskSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Ordering.BackgroundTasks 2 | { 3 | public class BackgroundTaskSettings 4 | { 5 | public string ConnectionString { get; set; } 6 | 7 | public string EventBusConnection { get; set; } 8 | 9 | public int GracePeriodTime { get; set; } 10 | 11 | public int CheckUpdateTime { get; set; } 12 | 13 | public string SubscriptionClientName { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Ordering.BackgroundTasks": { 4 | "commandName": "Project", 5 | "environmentVariables": { 6 | "DOTNET_ENVIRONMENT": "Development" 7 | } 8 | }, 9 | "Docker": { 10 | "commandName": "Docker" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.BackgroundTasks/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/Buyer.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; 2 | 3 | public class Buyer 4 | : Entity 5 | { 6 | public string IdentityGuid { get; set; } 7 | 8 | public string Name { get; set; } 9 | 10 | public ICollection PaymentMethods { get; } = new List(); 11 | 12 | public ICollection Orders { get; } = new List(); 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/BuyerAggregate/PaymentMethod.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; 2 | 3 | public class PaymentMethod 4 | : Entity 5 | { 6 | public string Alias { get; set; } 7 | public string CardNumber { get; set; } 8 | public string SecurityNumber { get; set; } 9 | public string CardHolderName { get; set; } 10 | public DateTime Expiration { get; set; } 11 | 12 | public int CardTypeId { get; set; } 13 | public CardType CardType { get; set; } 14 | 15 | public int BuyerId { get; set; } 16 | 17 | public Buyer Buyer { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; 2 | 3 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 4 | 5 | public class Address 6 | { 7 | public String Street { get; set; } 8 | public String City { get; set; } 9 | public String State { get; set; } 10 | public String Country { get; set; } 11 | public String ZipCode { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/OrderItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 2 | 3 | public class OrderItem 4 | : Entity 5 | { 6 | public string ProductName { get; set; } 7 | public string PictureUrl { get; set; } 8 | public decimal UnitPrice { get; set; } 9 | public decimal Discount { get; set; } 10 | public int Units { get; set; } 11 | 12 | public int ProductId { get; set; } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Exceptions/OrderingDomainException.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; 2 | 3 | /// 4 | /// Exception type for domain exceptions 5 | /// 6 | public class OrderingDomainException : Exception 7 | { 8 | public OrderingDomainException() 9 | { } 10 | 11 | public OrderingDomainException(string message) 12 | : base(message) 13 | { } 14 | 15 | public OrderingDomainException(string message, Exception innerException) 16 | : base(message, innerException) 17 | { } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; 2 | global using MediatR; 3 | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; 4 | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; 5 | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; 6 | global using System.Collections.Generic; 7 | global using System.Linq; 8 | global using System.Reflection; 9 | global using System.Threading.Tasks; 10 | global using System.Threading; 11 | global using System; -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | Microsoft.eShopOnContainers.Services.Ordering.Domain 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.FunctionalTests/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CheckUpdateTime": "30000", 3 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Persist Security Info=False;Encrypt=False", 4 | "EventBusConnection": "localhost", 5 | "ExternalCatalogBaseUrl": "http://localhost:5101", 6 | "GracePeriodTime": "1", 7 | "IdentityUrl": "http://localhost:5105", 8 | "IdentityUrlExternal": "http://localhost:5105", 9 | "isTest": "true", 10 | "SubscriptionClientName": "Ordering", 11 | "SuppressCheckForUnhandledSecurityMetadata": true 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Infrastructure/EntityConfigurations/ClientRequestEntityTypeConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.EntityConfigurations; 2 | 3 | class ClientRequestEntityTypeConfiguration 4 | : IEntityTypeConfiguration 5 | { 6 | public void Configure(EntityTypeBuilder requestConfiguration) 7 | { 8 | requestConfiguration.ToTable("requests", OrderingContext.DEFAULT_SCHEMA); 9 | requestConfiguration.HasKey(cr => cr.Id); 10 | requestConfiguration.Property(cr => cr.Name).IsRequired(); 11 | requestConfiguration.Property(cr => cr.Time).IsRequired(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.Infrastructure/Idempotency/ClientRequest.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; 2 | 3 | public class ClientRequest 4 | { 5 | public Guid Id { get; set; } 6 | public string Name { get; set; } 7 | public DateTime Time { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/NotificationHub.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Services.Ordering.SignalrHub; 2 | 3 | [Authorize] 4 | public class NotificationsHub : Hub 5 | { 6 | 7 | public override async Task OnConnectedAsync() 8 | { 9 | await Groups.AddToGroupAsync(Context.ConnectionId, Context.User.Identity.Name); 10 | await base.OnConnectedAsync(); 11 | } 12 | 13 | public override async Task OnDisconnectedAsync(Exception ex) 14 | { 15 | await Groups.RemoveFromGroupAsync(Context.ConnectionId, Context.User.Identity.Name); 16 | await base.OnDisconnectedAsync(ex); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Services/Ordering/Ordering.SignalrHub/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IdentityUrl": "http://localhost:5105", 3 | "Serilog": { 4 | "SeqServerUrl": null, 5 | "LogstashgUrl": null, 6 | "MinimumLevel": { 7 | "Default": "Information", 8 | "Override": { 9 | "Microsoft": "Warning", 10 | "Microsoft.eShopOnContainers": "Information", 11 | "System": "Warning" 12 | } 13 | } 14 | }, 15 | "AzureServiceBusEnabled": false, 16 | "SubscriptionClientName": "Ordering.signalrhub", 17 | "EventBusRetryCount": 5, 18 | "EventBusConnection": "localhost" 19 | } -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/Dockerfile.develop: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:6.0 2 | ARG BUILD_CONFIGURATION=Debug 3 | ENV ASPNETCORE_ENVIRONMENT=Development 4 | ENV DOTNET_USE_POLLING_FILE_WATCHER=true 5 | EXPOSE 80 6 | 7 | WORKDIR /src 8 | COPY ["Services/Payment/Payment.API/Payment.API.csproj", "Services/Payment/Payment.API/"] 9 | COPY ["NuGet.config", "NuGet.config"] 10 | 11 | RUN dotnet restore Services/Payment/Payment.API/Payment.API.csproj 12 | COPY . . 13 | WORKDIR /src/Services/Payment/Payment.API 14 | RUN dotnet build --no-restore -c $BUILD_CONFIGURATION 15 | 16 | ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/PaymentSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.Payment.API; 2 | 3 | public class PaymentSettings 4 | { 5 | public bool PaymentSucceeded { get; set; } 6 | public string EventBusConnection { get; set; } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Payment/Payment.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "PaymentSucceeded": true, 15 | "AzureServiceBusEnabled": false, 16 | "SubscriptionClientName": "Payment", 17 | "ApplicationInsights": { 18 | "InstrumentationKey": "" 19 | }, 20 | "EventBusRetryCount": 5 21 | } 22 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Controllers; 2 | 3 | public class HomeController : Controller 4 | { 5 | // GET: // 6 | public IActionResult Index() 7 | { 8 | return new RedirectResult("~/swagger"); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Exceptions/WebhooksDomainException.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Exceptions; 2 | 3 | public class WebhooksDomainException : Exception 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Infrastructure/ActionResult/InternalServerErrorObjectResult.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Infrastructure.ActionResult; 2 | 3 | class InternalServerErrorObjectResult : ObjectResult 4 | { 5 | public InternalServerErrorObjectResult(object error) : base(error) 6 | { 7 | StatusCode = StatusCodes.Status500InternalServerError; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Model/WebhookData.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Model; 2 | 3 | public class WebhookData 4 | { 5 | public DateTime When { get; } 6 | 7 | public string Payload { get; } 8 | 9 | public string Type { get; } 10 | 11 | public WebhookData(WebhookType hookType, object data) 12 | { 13 | When = DateTime.UtcNow; 14 | Type = hookType.ToString(); 15 | Payload = JsonSerializer.Serialize(data); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Model/WebhookSubscription.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Model; 2 | 3 | public class WebhookSubscription 4 | { 5 | public int Id { get; set; } 6 | 7 | public WebhookType Type { get; set; } 8 | public DateTime Date { get; set; } 9 | public string DestUrl { get; set; } 10 | public string Token { get; set; } 11 | public string UserId { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Model/WebhookType.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Model; 2 | 3 | public enum WebhookType 4 | { 5 | CatalogItemPriceChange = 1, 6 | OrderShipped = 2, 7 | OrderPaid = 3 8 | } 9 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/IGrantUrlTesterService.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public interface IGrantUrlTesterService 4 | { 5 | Task TestGrantUrl(string urlHook, string url, string token); 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/IIdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public interface IIdentityService 4 | { 5 | string GetUserIdentity(); 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/IWebhooksRetriever.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public interface IWebhooksRetriever 4 | { 5 | 6 | Task> GetSubscriptionsOfType(WebhookType type); 7 | } 8 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/IWebhooksSender.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public interface IWebhooksSender 4 | { 5 | Task SendAll(IEnumerable receivers, WebhookData data); 6 | } 7 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/IdentityService.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public class IdentityService : IIdentityService 4 | { 5 | private readonly IHttpContextAccessor _context; 6 | 7 | public IdentityService(IHttpContextAccessor context) 8 | { 9 | _context = context ?? throw new ArgumentNullException(nameof(context)); 10 | } 11 | 12 | public string GetUserIdentity() 13 | { 14 | return _context.HttpContext.User.FindFirst("sub").Value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/Services/WebhooksRetriever.cs: -------------------------------------------------------------------------------- 1 | namespace Webhooks.API.Services; 2 | 3 | public class WebhooksRetriever : IWebhooksRetriever 4 | { 5 | private readonly WebhooksContext _db; 6 | public WebhooksRetriever(WebhooksContext db) 7 | { 8 | _db = db; 9 | } 10 | public async Task> GetSubscriptionsOfType(WebhookType type) 11 | { 12 | var data = await _db.Subscriptions.Where(s => s.Type == type).ToListAsync(); 13 | return data; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | }, 9 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;TrustServerCertificate=true" 10 | } 11 | -------------------------------------------------------------------------------- /src/Services/Webhooks/Webhooks.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*", 8 | "SubscriptionClientName": "Webhooks", 9 | "EventBusRetryCount": 5 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Extensions/HttpClientExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace FunctionalTests.Extensions; 2 | 3 | static class HttpClientExtensions 4 | { 5 | public static HttpClient CreateIdempotentClient(this TestServer server) 6 | { 7 | var client = server.CreateClient(); 8 | client.DefaultRequestHeaders.Add("x-requestid", Guid.NewGuid().ToString()); 9 | return client; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Services/Basket/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "IdentityUrl": "http://localhost:5105", 11 | "IdentityUrlExternal": "http://localhost:5105", 12 | "ConnectionString": "127.0.0.1", 13 | "isTest": "true", 14 | "EventBusConnection": "localhost", 15 | "SubscriptionClientName": "Basket" 16 | } 17 | -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Services/Catalog/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", 3 | "ExternalCatalogBaseUrl": "http://localhost:5101", 4 | "IdentityUrl": "http://localhost:5105", 5 | "isTest": "true", 6 | "EventBusConnection": "localhost", 7 | "PicBaseUrl": "http://localhost:5101/api/v1/catalog/items/[0]/pic/", 8 | "SubscriptionClientName": "Catalog" 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Services/Ordering/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;", 3 | "ExternalCatalogBaseUrl": "http://localhost:5101", 4 | "IdentityUrl": "http://localhost:5105", 5 | "isTest": "true", 6 | "EventBusConnection": "localhost", 7 | "CheckUpdateTime": "30000", 8 | "GracePeriodTime": "1", 9 | "SubscriptionClientName": "Ordering", 10 | "IdentityUrlExternal": "http://localhost:5105" 11 | } 12 | -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Setup/CatalogBrands.csv: -------------------------------------------------------------------------------- 1 | CatalogBrand 2 | Azure 3 | .NET 4 | Visual Studio 5 | SQL Server 6 | Other 7 | CatalogBrandTestOne 8 | CatalogBrandTestTwo -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Setup/CatalogItems.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Tests/Services/Application.FunctionalTests/Setup/CatalogItems.zip -------------------------------------------------------------------------------- /src/Tests/Services/Application.FunctionalTests/Setup/CatalogTypes.csv: -------------------------------------------------------------------------------- 1 | CatalogType 2 | Mug 3 | T-Shirt 4 | Sheet 5 | USB Memory Stick 6 | CatalogTypeTestOne 7 | CatalogTypeTestTwo -------------------------------------------------------------------------------- /src/Web/WebMVC/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git 3 | .gitignore 4 | .vs 5 | .vscode 6 | **/*.*proj.user 7 | **/azds.yaml 8 | **/bin 9 | **/charts 10 | **/Dockerfile 11 | **/Dockerfile.develop 12 | **/obj 13 | **/secrets.dev.yaml 14 | **/values.dev.yaml -------------------------------------------------------------------------------- /src/Web/WebMVC/Controllers/ErrorController.cs: -------------------------------------------------------------------------------- 1 | namespace WebMVC.Controllers; 2 | 3 | public class ErrorController : Controller 4 | { 5 | public IActionResult Error() => View(); 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Dockerfile.develop: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:7.0 2 | ARG BUILD_CONFIGURATION=Debug 3 | ENV ASPNETCORE_ENVIRONMENT=Development 4 | ENV DOTNET_USE_POLLING_FILE_WATCHER=true 5 | EXPOSE 80 6 | 7 | WORKDIR /src 8 | COPY ["Web/WebMVC/WebMVC.csproj", "Web/WebMVC/"] 9 | COPY ["BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "BuildingBlocks/Devspaces.Support/"] 10 | COPY ["NuGet.config", "NuGet.config"] 11 | 12 | RUN dotnet restore "Web/WebMVC/WebMVC.csproj" 13 | COPY . . 14 | WORKDIR "/src/Web/WebMVC" 15 | RUN dotnet build "WebMVC.csproj" -c $BUILD_CONFIGURATION 16 | 17 | ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] -------------------------------------------------------------------------------- /src/Web/WebMVC/Extensions/SessionExtensions.cs: -------------------------------------------------------------------------------- 1 | public static class SessionExtensions 2 | { 3 | public static void SetObject(this ISession session, string key, object value) => 4 | session.SetString(key,JsonSerializer.Serialize(value)); 5 | 6 | public static T GetObject(this ISession session, string key) 7 | { 8 | var value = session.GetString(key); 9 | 10 | return value == null ? default(T) :JsonSerializer.Deserialize(value, new JsonSerializerOptions 11 | { 12 | PropertyNameCaseInsensitive = true 13 | }); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/IBasketService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.Services; 2 | 3 | using Microsoft.eShopOnContainers.WebMVC.ViewModels; 4 | 5 | public interface IBasketService 6 | { 7 | Task GetBasket(ApplicationUser user); 8 | Task AddItemToBasket(ApplicationUser user, int productId); 9 | Task UpdateBasket(Basket basket); 10 | Task Checkout(BasketDTO basket); 11 | Task SetQuantities(ApplicationUser user, Dictionary quantities); 12 | Task GetOrderDraft(string basketId); 13 | } 14 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/ICatalogService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.Services; 2 | 3 | public interface ICatalogService 4 | { 5 | Task GetCatalogItems(int page, int take, int? brand, int? type); 6 | Task> GetBrands(); 7 | Task> GetTypes(); 8 | } 9 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/IIdentityParser.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.Services; 2 | 3 | public interface IIdentityParser 4 | { 5 | T Parse(IPrincipal principal); 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/IOrderingService.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.Services; 2 | using Microsoft.eShopOnContainers.WebMVC.ViewModels; 3 | 4 | public interface IOrderingService 5 | { 6 | Task> GetMyOrders(ApplicationUser user); 7 | Task GetOrder(ApplicationUser user, string orderId); 8 | Task CancelOrder(string orderId); 9 | Task ShipOrder(string orderId); 10 | Order MapUserInfoIntoOrder(ApplicationUser user, Order order); 11 | BasketDTO MapOrderToBasket(Order order); 12 | void OverrideUserInfoIntoOrder(Order original, Order destination); 13 | Task CreateOrder(Order order); 14 | } 15 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs: -------------------------------------------------------------------------------- 1 | namespace WebMVC.Services.ModelDTOs; 2 | 3 | public record LocationDTO 4 | { 5 | public double Longitude { get; init; } 6 | public double Latitude { get; init; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs: -------------------------------------------------------------------------------- 1 | namespace WebMVC.Services.ModelDTOs; 2 | 3 | public record OrderDTO 4 | { 5 | [Required] 6 | public string OrderNumber { get; init; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs: -------------------------------------------------------------------------------- 1 | namespace WebMVC.Services.ModelDTOs; 2 | 3 | public record OrderProcessAction 4 | { 5 | public string Code { get; } 6 | public string Name { get; } 7 | 8 | public static OrderProcessAction Ship = new OrderProcessAction(nameof(Ship).ToLowerInvariant(), "Ship"); 9 | 10 | protected OrderProcessAction() 11 | { 12 | } 13 | 14 | public OrderProcessAction(string code, string name) 15 | { 16 | Code = code; 17 | Name = name; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Setup/images.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/Setup/images.zip -------------------------------------------------------------------------------- /src/Web/WebMVC/Setup/override.css: -------------------------------------------------------------------------------- 1 | .esh-catalog-button { 2 | background-color: #83D01B; /* to override the style of this button ie. to make it red, use background-color: #FF001b; */ 3 | } 4 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/Basket.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record Basket 4 | { 5 | // Use property initializer syntax. 6 | // While this is often more useful for read only 7 | // auto implemented properties, it can simplify logic 8 | // for read/write properties. 9 | public List Items { get; init; } = new List(); 10 | public string BuyerId { get; init; } 11 | 12 | public decimal Total() 13 | { 14 | return Math.Round(Items.Sum(x => x.UnitPrice * x.Quantity), 2); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/BasketItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record BasketItem 4 | { 5 | public string Id { get; init; } 6 | public int ProductId { get; init; } 7 | public string ProductName { get; init; } 8 | public decimal UnitPrice { get; init; } 9 | public decimal OldUnitPrice { get; init; } 10 | public int Quantity { get; init; } 11 | public string PictureUrl { get; init; } 12 | } 13 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/Campaign.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record Campaign 4 | { 5 | public int PageIndex { get; init; } 6 | public int PageSize { get; init; } 7 | public int Count { get; init; } 8 | public List Data { get; init; } 9 | } 10 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/CampaignItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record CampaignItem 4 | { 5 | public int Id { get; init; } 6 | 7 | public string Name { get; init; } 8 | 9 | public string Description { get; init; } 10 | 11 | public DateTime From { get; init; } 12 | 13 | public DateTime To { get; init; } 14 | 15 | public string PictureUri { get; init; } 16 | public string DetailsUri { get; init; } 17 | } 18 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/CartViewModels/IndexViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CartViewModels; 2 | 3 | public class CartComponentViewModel 4 | { 5 | public int ItemsCount { get; set; } 6 | public string Disabled => (ItemsCount == 0) ? "is-disabled" : ""; 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/Catalog.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record Catalog 4 | { 5 | public int PageIndex { get; init; } 6 | public int PageSize { get; init; } 7 | public int Count { get; init; } 8 | public List Data { get; init; } 9 | } 10 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/CatalogItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record CatalogItem 4 | { 5 | public int Id { get; init; } 6 | public string Name { get; init; } 7 | public string Description { get; init; } 8 | public decimal Price { get; init; } 9 | public string PictureUri { get; init; } 10 | public int CatalogBrandId { get; init; } 11 | public string CatalogBrand { get; init; } 12 | public int CatalogTypeId { get; init; } 13 | public string CatalogType { get; init; } 14 | } 15 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/CatalogViewModels/IndexViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels; 2 | 3 | public class IndexViewModel 4 | { 5 | public IEnumerable CatalogItems { get; set; } 6 | public IEnumerable Brands { get; set; } 7 | public IEnumerable Types { get; set; } 8 | public int? BrandFilterApplied { get; set; } 9 | public int? TypesFilterApplied { get; set; } 10 | public PaginationInfo PaginationInfo { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/Header.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record Header 4 | { 5 | public string Controller { get; init; } 6 | public string Text { get; init; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/OrderItem.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels; 2 | 3 | public record OrderItem 4 | { 5 | public int ProductId { get; init; } 6 | 7 | public string ProductName { get; init; } 8 | 9 | public decimal UnitPrice { get; init; } 10 | 11 | public decimal Discount { get; init; } 12 | 13 | public int Units { get; init; } 14 | 15 | public string PictureUrl { get; init; } 16 | } 17 | -------------------------------------------------------------------------------- /src/Web/WebMVC/ViewModels/Pagination/PaginationInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination; 2 | 3 | public class PaginationInfo 4 | { 5 | public int TotalItems { get; set; } 6 | public int ItemsPerPage { get; set; } 7 | public int ActualPage { get; set; } 8 | public int TotalPages { get; set; } 9 | public string Previous { get; set; } 10 | public string Next { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Views/Catalog/_product.cshtml: -------------------------------------------------------------------------------- 1 | @model CatalogItem 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 |
10 | @Model.Name 11 |
12 |
13 | @Model.Price.ToString("N2") 14 |
15 | 16 |
17 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Views/Shared/_Header.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @model IEnumerable 3 | 4 |
5 |
6 | @foreach (var header in @Model) 7 | { 8 | @header.Text 9 | } 10 |
11 |
12 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.eShopOnContainers.WebMVC 2 | @using Microsoft.eShopOnContainers.WebMVC.ViewModels 3 | @using Microsoft.AspNetCore.Identity 4 | 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | -------------------------------------------------------------------------------- /src/Web/WebMVC/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Web/WebMVC/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "MinimumLevel": { 4 | "Default": "Debug", 5 | "Override": { 6 | "Microsoft.AspNetCore.HttpLogging": "Information" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Web/WebMVC/values.dev.yaml: -------------------------------------------------------------------------------- 1 | inf: 2 | k8s: 3 | dns: $(spacePrefix)identity-api$(hostSuffix) -------------------------------------------------------------------------------- /src/Web/WebMVC/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/app.component.css: -------------------------------------------------------------------------------- 1 | .esh-app-footer { 2 | background-color: #000000; 3 | border-top: 1px solid #EEEEEE; 4 | margin-top: 2.5rem; 5 | padding-bottom: 2.5rem; 6 | padding-top: 2.5rem; 7 | width: 100%; 8 | } 9 | 10 | .esh-app-footer-brand { 11 | height: 50px; 12 | width: 230px; 13 | } 14 | 15 | .esh-app-header { 16 | margin: 15px; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/app.component.min.css: -------------------------------------------------------------------------------- 1 | .esh-app-footer{background-color:#000;border-top:1px solid #eee;margin-top:2.5rem;padding-bottom:2.5rem;padding-top:2.5rem;width:100%;}.esh-app-footer-brand{height:50px;width:230px;}.esh-app-header{margin:15px;} -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/app.component.scss: -------------------------------------------------------------------------------- 1 | @import './variables'; 2 | 3 | .esh-app { 4 | &-footer { 5 | $margin: 2.5rem; 6 | $padding: 2.5rem; 7 | 8 | background-color: $color-background-darker; 9 | border-top: $border-light solid $color-foreground-bright; 10 | margin-top: $margin; 11 | padding-bottom: $padding; 12 | padding-top: $padding; 13 | width: 100%; 14 | 15 | $height: 50px; 16 | 17 | &-brand { 18 | height: $height; 19 | width: 230px; 20 | } 21 | 22 | } 23 | 24 | &-header{ 25 | margin:15px; 26 | } 27 | } -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/override.css: -------------------------------------------------------------------------------- 1 | .esh-catalog-button { 2 | background-color: #83D01B; /* to override the style of this button ie. to make it red, use background-color: #FF001b; */ 3 | } 4 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/shared/components/header/header.css: -------------------------------------------------------------------------------- 1 | .esh-header { 2 | background-color: #00A69C; 3 | height: 4rem; 4 | } 5 | 6 | .esh-header-back { 7 | color: rgba(255, 255, 255, 0.5); 8 | line-height: 4rem; 9 | text-decoration: none; 10 | text-transform: uppercase; 11 | transition: color 0.35s; 12 | } 13 | 14 | .esh-header-back:hover { 15 | color: #FFFFFF; 16 | transition: color 0.35s; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/shared/components/header/header.min.css: -------------------------------------------------------------------------------- 1 | .esh-header{background-color:#00a69c;height:4rem;}.esh-header-back{color:rgba(255,255,255,.5);line-height:4rem;text-decoration:none;text-transform:uppercase;transition:color .35s;}.esh-header-back:hover{color:#fff;transition:color .35s;} -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/shared/components/header/header.scss: -------------------------------------------------------------------------------- 1 | @import '../../../variables'; 2 | 3 | .esh-header { 4 | $header-height: 4rem; 5 | 6 | background-color: $color-brand; 7 | height: $header-height; 8 | 9 | &-back { 10 | color: rgba($color-foreground-brighter, .5); 11 | line-height: $header-height; 12 | text-decoration: none; 13 | text-transform: uppercase; 14 | transition: color $animation-speed-default; 15 | 16 | &:hover { 17 | color: $color-foreground-brighter; 18 | transition: color $animation-speed-default; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/shared/components/pager/pager.css: -------------------------------------------------------------------------------- 1 | .esh-pager-wrapper { 2 | padding-top: 1rem; 3 | text-align: center; 4 | } 5 | 6 | .esh-pager-item { 7 | margin: 0 5vw; 8 | } 9 | 10 | .esh-pager-item.is-disabled { 11 | opacity: 0; 12 | pointer-events: none; 13 | } 14 | 15 | .esh-pager-item--navigable { 16 | cursor: pointer; 17 | display: inline-block; 18 | } 19 | 20 | .esh-pager-item--navigable:hover { 21 | color: #83D01B; 22 | } 23 | 24 | @media screen and (max-width: 1280px) { 25 | .esh-pager-item { 26 | font-size: 0.85rem; 27 | } 28 | } 29 | 30 | @media screen and (max-width: 1024px) { 31 | .esh-pager-item { 32 | margin: 0 2.5vw; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/css/shared/components/pager/pager.min.css: -------------------------------------------------------------------------------- 1 | .esh-pager-wrapper{padding-top:1rem;text-align:center;}.esh-pager-item{margin:0 5vw;}.esh-pager-item.is-disabled{opacity:0;pointer-events:none;}.esh-pager-item--navigable{cursor:pointer;display:inline-block;}.esh-pager-item--navigable:hover{color:#83d01b;}@media screen and (max-width:1280px){.esh-pager-item{font-size:.85rem;}}@media screen and (max-width:1024px){.esh-pager-item{margin:0 2.5vw;}} -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.eot -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.woff -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Bold.woff2 -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.eot -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.woff -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/fonts/Montserrat-Regular.woff2 -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/arrow-down.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/brand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/brand.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/brand_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/brand_dark.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/cart-inoperative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/cart-inoperative.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/cart.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/logout.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/main_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/main_banner.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/main_banner_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/main_banner_text.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/main_footer_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/main_footer_text.png -------------------------------------------------------------------------------- /src/Web/WebMVC/wwwroot/images/my_orders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebMVC/wwwroot/images/my_orders.png -------------------------------------------------------------------------------- /src/Web/WebStatus/Views/Home/Config.cshtml: -------------------------------------------------------------------------------- 1 | @model Dictionary 2 | 3 | @{ 4 | ViewData["Title"] = "WebStatus Configuration"; 5 | } 6 | 7 |

Configuration Values

8 | 9 | 10 | @foreach (var item in Model) 11 | { 12 | 13 | 14 | 15 | 16 | } 17 |
@item.Key@item.Value
18 | -------------------------------------------------------------------------------- /src/Web/WebStatus/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "MinimumLevel": { 4 | "Default": "Debug" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebStatus/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Serilog": { 3 | "SeqServerUrl": null, 4 | "LogstashgUrl": null, 5 | "MinimumLevel": { 6 | "Default": "Information", 7 | "Override": { 8 | "Microsoft": "Warning", 9 | "Microsoft.eShopOnContainers": "Information", 10 | "System": "Warning" 11 | } 12 | } 13 | }, 14 | "Webhooks": [ 15 | { 16 | "Name": "", 17 | "Uri": "", 18 | "Payload": "", 19 | "RestoredPayload": "" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/Web/WebStatus/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "cdnjs", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.4.1", 7 | "destination": "wwwroot/lib/jquery/" 8 | }, 9 | { 10 | "provider": "unpkg", 11 | "library": "bootstrap@4.1.3", 12 | "files": [ 13 | "dist/css/bootstrap.css", 14 | "dist/css/bootstrap.css.map", 15 | "dist/css/bootstrap.min.css", 16 | "dist/css/bootstrap.min.css.map", 17 | "dist/js/bootstrap.js", 18 | "dist/js/bootstrap.min.js" 19 | ], 20 | "destination": "wwwroot/lib/bootstrap/" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src/Web/WebStatus/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}@media screen and (max-width:767px){.carousel-caption{display:none}} -------------------------------------------------------------------------------- /src/Web/WebStatus/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebStatus/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Web/WebhookClient/.dockerignore: -------------------------------------------------------------------------------- 1 | !wwwroot -------------------------------------------------------------------------------- /src/Web/WebhookClient/.gitignore: -------------------------------------------------------------------------------- 1 | !wwwroot/lib -------------------------------------------------------------------------------- /src/Web/WebhookClient/HeaderNames.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient; 2 | 3 | static class HeaderNames 4 | { 5 | public const string WebHookCheckHeader = "X-eshop-whtoken"; 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Models/WebHookReceived.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Models; 2 | 3 | public class WebHookReceived 4 | { 5 | public DateTime When { get; set; } 6 | 7 | public string Data { get; set; } 8 | 9 | public string Token { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Models/WebhookData.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Models; 2 | 3 | public class WebhookData 4 | { 5 | public DateTime When { get; set; } 6 | 7 | public string Payload { get; set; } 8 | 9 | public string Type { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Models/WebhookResponse.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Models; 2 | 3 | public class WebhookResponse 4 | { 5 | public DateTime Date { get; set; } 6 | public string DestUrl { get; set; } 7 | public string Token { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Models/WebhookSubscriptionRequest.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Models; 2 | 3 | public class WebhookSubscriptionRequest 4 | { 5 | public string Url { get; set; } 6 | public string Token { get; set; } 7 | public string Event { get; set; } 8 | public string GrantUrl { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace WebhookClient.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | public class ErrorModel : PageModel 9 | { 10 | public string RequestId { get; set; } 11 | 12 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 13 | 14 | public void OnGet() 15 | { 16 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

@ViewData["Title"]

7 | 8 |

Use this page to detail your site's privacy policy.

9 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.RazorPages; 2 | 3 | namespace WebhookClient.Pages 4 | { 5 | public class PrivacyModel : PageModel 6 | { 7 | public void OnGet() 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Web/WebhookClient/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebhookClient 2 | @namespace WebhookClient.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Program.cs: -------------------------------------------------------------------------------- 1 | CreateWebHostBuilder(args).Build().Run(); 2 | 3 | 4 | IWebHostBuilder CreateWebHostBuilder(string[] args) => 5 | WebHost.CreateDefaultBuilder(args) 6 | .UseStartup(); 7 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Services/IHooksRepository.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Services; 2 | 3 | public interface IHooksRepository 4 | { 5 | Task> GetAll(); 6 | Task AddNew(WebHookReceived hook); 7 | } 8 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Services/IWebhooksClient.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Services; 2 | 3 | public interface IWebhooksClient 4 | { 5 | Task> LoadWebhooks(); 6 | } 7 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Services/InMemoryHooksRepository.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient.Services; 2 | 3 | public class InMemoryHooksRepository : IHooksRepository 4 | { 5 | private readonly List _data; 6 | 7 | public InMemoryHooksRepository() => _data = new List(); 8 | 9 | public Task AddNew(WebHookReceived hook) 10 | { 11 | _data.Add(hook); 12 | return Task.CompletedTask; 13 | } 14 | 15 | public Task> GetAll() 16 | { 17 | return Task.FromResult(_data.AsEnumerable()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace WebhookClient; 2 | 3 | public class Settings 4 | { 5 | public string Token { get; set; } 6 | public string IdentityUrl { get; set; } 7 | public string CallBackUrl { get; set; } 8 | public string WebhooksUrl { get; set; } 9 | public string SelfUrl { get; set; } 10 | 11 | public bool ValidateToken { get; set; } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | }, 8 | "Token": "6168DB8D-DC58-4094-AF24-483278923590" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebhookClient/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Web/WebhookClient/wwwroot/images/brand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebhookClient/wwwroot/images/brand.png -------------------------------------------------------------------------------- /src/Web/WebhookClient/wwwroot/images/main_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbogard/eShopOnContainers/eeb450d04a45ad68a9ae4ad37a367ee3a3c142d9/src/Web/WebhookClient/wwwroot/images/main_banner.png -------------------------------------------------------------------------------- /src/Web/WebhookClient/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /src/Web/WebhookClient/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /src/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /src/run-test-infrastructure.ps1: -------------------------------------------------------------------------------- 1 | docker-compose -f .\docker-compose-tests.yml -f .\docker-compose-tests.override.yml up sql-data-test nosql-data-test basket-data-test rabbitmq-test identity-api-test payment-api-test 2 | --------------------------------------------------------------------------------