├── .devcontainer ├── Dockerfile ├── devcontainer.json ├── docker-compose.yml └── library-scripts │ ├── azcli-debian.sh │ └── docker-debian.sh ├── .dockerignore ├── .github └── workflows │ ├── package-accounting-service.yaml │ ├── package-bootstrapper.yaml │ ├── package-corp-transfer-service.yaml │ ├── package-loyalty-service.yaml │ ├── package-make-line-service.yaml │ ├── package-order-service.yaml │ ├── package-receipt-generation-service.yaml │ ├── package-ui.yaml │ ├── package-virtual-customers.yaml │ ├── package-virtual-worker.yaml │ └── promote-manifests.yaml ├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── CODEOWNERS ├── LICENSE ├── README.md ├── RedDog.AccountingModel ├── AccountingContext.cs ├── CompiledModels │ ├── AccountingContextModel.cs │ ├── AccountingContextModelBuilder.cs │ ├── CustomerEntityType.cs │ ├── OrderEntityType.cs │ ├── OrderItemEntityType.cs │ └── StoreLocationEntityType.cs ├── Customer.cs ├── Order.cs ├── OrderItem.cs ├── RedDog.AccountingModel.csproj └── StoreLocation.cs ├── RedDog.AccountingService ├── Controllers │ ├── AccountingController.cs │ └── ProbesController.cs ├── Dockerfile ├── Models │ ├── OrderItemSummary.cs │ ├── OrderMetric.cs │ ├── OrderSummary.cs │ ├── OrdersTimeSeries.cs │ ├── SalesProfitMetric.cs │ ├── StoreTimeSegment.cs │ ├── TimeSeries.cs │ └── reqs.txt ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.AccountingService.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.Bootstrapper ├── Dockerfile ├── Migrations │ ├── 20210505072819_InitialCreate.Designer.cs │ ├── 20210505072819_InitialCreate.cs │ ├── 20211112094528_ImageUrl.Designer.cs │ ├── 20211112094528_ImageUrl.cs │ └── AccountingContextModelSnapshot.cs ├── Program.cs ├── README.md └── RedDog.Bootstrapper.csproj ├── RedDog.CorporateTransferService ├── .dockerignore ├── .eslintrc.js ├── .funcignore ├── Dockerfile ├── README.md ├── RabbitOrderCompletedFx │ ├── function.json │ └── index.js ├── RabbitOrdersFx │ ├── function.json │ └── index.js ├── host.json ├── package-lock.json ├── package.json └── proxies.json ├── RedDog.LoyaltyService ├── Controllers │ ├── LoyaltyController.cs │ └── ProbesController.cs ├── Dockerfile ├── Models │ ├── LoyaltySummary.cs │ ├── OrderItemSummary.cs │ └── OrderSummary.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.LoyaltyService.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.MakeLineService ├── Controllers │ ├── MakelineController.cs │ └── ProbesController.cs ├── Dockerfile ├── Models │ ├── OrderItemSummary.cs │ └── OrderSummary.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.MakeLineService.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.OrderService ├── Controllers │ ├── OrderController.cs │ ├── ProbesController.cs │ └── ProductController.cs ├── Dockerfile ├── Models │ ├── CustomerOrder.cs │ ├── CustomerOrderItem.cs │ ├── OrderItemSummary.cs │ ├── OrderSummary.cs │ └── Product.cs ├── ProductDefinitions │ ├── CoffeeShopProducts.json │ ├── DrugStoreProducts-categorized.json │ └── DrugStoreProducts.json ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.OrderService.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.ReceiptGenerationService ├── Controllers │ ├── ProbesController.cs │ └── ReceiptGenerationController.cs ├── Dockerfile ├── Models │ ├── OrderItemSummary.cs │ └── OrderSummary.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.ReceiptGenerationService.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.UI ├── .eslintrc ├── Dockerfile ├── README.md ├── package-lock.json ├── package.json ├── public │ ├── css │ │ └── base.css │ ├── img │ │ ├── GitHub-Mark-Light-64px.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-256x256.png │ │ ├── apple-icon.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── cngbb-wide-bt.png │ │ ├── cngbb-wide-bt.psd │ │ ├── cngbb-wide-wt.png │ │ ├── cngbb-wide-wt.psd │ │ ├── cngbb-wide.png │ │ ├── contoso-pharmacy-tl-logo.png │ │ ├── contoso.psd │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── hex-back-pat.png │ │ ├── max-lord.png │ │ ├── msft-20mm.png │ │ ├── msft-50mm.png │ │ ├── msft-cloud-native-600.png │ │ ├── mstile-150x150.png │ │ ├── mw-dapr.png │ │ ├── reddog-logo-128.png │ │ ├── reddog-logo-226.png │ │ ├── reddog-logo-round-64.png │ │ ├── reddog-logo-text.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ ├── index.html │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.vue │ ├── assets │ │ ├── css │ │ │ └── nucleo-icons.css │ │ ├── fonts │ │ │ ├── nucleo.eot │ │ │ ├── nucleo.ttf │ │ │ ├── nucleo.woff │ │ │ └── nucleo.woff2 │ │ ├── sass │ │ │ ├── black-dashboard.scss │ │ │ └── black-dashboard │ │ │ │ ├── bootstrap │ │ │ │ ├── _alert.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _breadcrumb.scss │ │ │ │ ├── _button-group.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _card.scss │ │ │ │ ├── _carousel.scss │ │ │ │ ├── _close.scss │ │ │ │ ├── _code.scss │ │ │ │ ├── _custom-forms.scss │ │ │ │ ├── _dropdown.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _functions.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _images.scss │ │ │ │ ├── _input-group.scss │ │ │ │ ├── _jumbotron.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _media.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _modal.scss │ │ │ │ ├── _nav.scss │ │ │ │ ├── _navbar.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _popover.scss │ │ │ │ ├── _print.scss │ │ │ │ ├── _progress.scss │ │ │ │ ├── _reboot.scss │ │ │ │ ├── _root.scss │ │ │ │ ├── _tables.scss │ │ │ │ ├── _tooltip.scss │ │ │ │ ├── _transitions.scss │ │ │ │ ├── _type.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _variables.scss │ │ │ │ ├── mixins │ │ │ │ │ ├── _alert.scss │ │ │ │ │ ├── _background-variant.scss │ │ │ │ │ ├── _badge.scss │ │ │ │ │ ├── _border-radius.scss │ │ │ │ │ ├── _box-shadow.scss │ │ │ │ │ ├── _breakpoints.scss │ │ │ │ │ ├── _buttons.scss │ │ │ │ │ ├── _caret.scss │ │ │ │ │ ├── _clearfix.scss │ │ │ │ │ ├── _float.scss │ │ │ │ │ ├── _forms.scss │ │ │ │ │ ├── _gradients.scss │ │ │ │ │ ├── _grid-framework.scss │ │ │ │ │ ├── _grid.scss │ │ │ │ │ ├── _hover.scss │ │ │ │ │ ├── _image.scss │ │ │ │ │ ├── _list-group.scss │ │ │ │ │ ├── _lists.scss │ │ │ │ │ ├── _nav-divider.scss │ │ │ │ │ ├── _pagination.scss │ │ │ │ │ ├── _reset-text.scss │ │ │ │ │ ├── _resize.scss │ │ │ │ │ ├── _screen-reader.scss │ │ │ │ │ ├── _size.scss │ │ │ │ │ ├── _table-row.scss │ │ │ │ │ ├── _text-emphasis.scss │ │ │ │ │ ├── _text-hide.scss │ │ │ │ │ ├── _text-truncate.scss │ │ │ │ │ ├── _transition.scss │ │ │ │ │ └── _visibility.scss │ │ │ │ └── utilities │ │ │ │ │ ├── _align.scss │ │ │ │ │ ├── _background.scss │ │ │ │ │ ├── _borders.scss │ │ │ │ │ ├── _clearfix.scss │ │ │ │ │ ├── _display.scss │ │ │ │ │ ├── _embed.scss │ │ │ │ │ ├── _flex.scss │ │ │ │ │ ├── _float.scss │ │ │ │ │ ├── _position.scss │ │ │ │ │ ├── _screenreaders.scss │ │ │ │ │ ├── _shadows.scss │ │ │ │ │ ├── _sizing.scss │ │ │ │ │ ├── _spacing.scss │ │ │ │ │ ├── _text.scss │ │ │ │ │ └── _visibility.scss │ │ │ │ ├── custom │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _card.scss │ │ │ │ ├── _checkboxes-radio.scss │ │ │ │ ├── _dropdown.scss │ │ │ │ ├── _fixed-plugin.scss │ │ │ │ ├── _footer.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _functions.scss │ │ │ │ ├── _images.scss │ │ │ │ ├── _input-group.scss │ │ │ │ ├── _misc.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _modal.scss │ │ │ │ ├── _navbar.scss │ │ │ │ ├── _rtl.scss │ │ │ │ ├── _sidebar-and-main-panel.scss │ │ │ │ ├── _tables.scss │ │ │ │ ├── _type.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _variables.scss │ │ │ │ ├── _white-content.scss │ │ │ │ ├── cards │ │ │ │ │ ├── _card-chart.scss │ │ │ │ │ ├── _card-map.scss │ │ │ │ │ ├── _card-plain.scss │ │ │ │ │ ├── _card-task.scss │ │ │ │ │ └── _card-user.scss │ │ │ │ ├── mixins │ │ │ │ │ ├── _alert.scss │ │ │ │ │ ├── _background-variant.scss │ │ │ │ │ ├── _badges.scss │ │ │ │ │ ├── _buttons.scss │ │ │ │ │ ├── _dropdown.scss │ │ │ │ │ ├── _forms.scss │ │ │ │ │ ├── _icon.scss │ │ │ │ │ ├── _inputs.scss │ │ │ │ │ ├── _modals.scss │ │ │ │ │ ├── _page-header.scss │ │ │ │ │ ├── _popovers.scss │ │ │ │ │ ├── _vendor-prefixes.scss │ │ │ │ │ ├── _wizard.scss │ │ │ │ │ └── opacity.scss │ │ │ │ ├── utilities │ │ │ │ │ ├── _backgrounds.scss │ │ │ │ │ ├── _floating.scss │ │ │ │ │ ├── _helper.scss │ │ │ │ │ ├── _position.scss │ │ │ │ │ ├── _shadows.scss │ │ │ │ │ ├── _sizing.scss │ │ │ │ │ ├── _spacing.scss │ │ │ │ │ ├── _text.scss │ │ │ │ │ └── _transform.scss │ │ │ │ └── vendor │ │ │ │ │ ├── _plugin-animate-bootstrap-notify.scss │ │ │ │ │ └── _plugin-perfect-scrollbar.scss │ │ │ │ └── plugins │ │ │ │ └── _plugin-perfect-scrollbar.scss │ │ └── scripts │ │ │ └── azure-maps-animations.min.js │ ├── components │ │ ├── BaseAlert.vue │ │ ├── BaseButton.vue │ │ ├── BaseCheckbox.vue │ │ ├── BaseDropdown.vue │ │ ├── BaseNav.vue │ │ ├── BaseRadio.vue │ │ ├── BaseTable.vue │ │ ├── Cards │ │ │ ├── Card.vue │ │ │ └── StatsCard.vue │ │ ├── Charts │ │ │ ├── BarChart.js │ │ │ ├── DoughnutChart.js │ │ │ ├── LineChart.js │ │ │ ├── config.js │ │ │ └── utils.js │ │ ├── CloseButton.vue │ │ ├── Inputs │ │ │ └── BaseInput.vue │ │ ├── Modal.vue │ │ ├── NavbarToggleButton.vue │ │ ├── NotificationPlugin │ │ │ ├── Notification.vue │ │ │ ├── Notifications.vue │ │ │ └── index.js │ │ ├── RedDog │ │ │ └── StreamChart.vue │ │ ├── SidebarPlugin │ │ │ ├── SideBar.vue │ │ │ ├── SidebarLink.vue │ │ │ └── index.js │ │ └── index.js │ ├── config.js │ ├── directives │ │ └── click-ouside.js │ ├── i18n.js │ ├── layout │ │ └── dashboard │ │ │ ├── Content.vue │ │ │ ├── ContentFooter.vue │ │ │ ├── DashboardLayout.vue │ │ │ ├── MobileMenu.vue │ │ │ └── TopNavbar.vue │ ├── locales │ │ └── en.json │ ├── main.js │ ├── models │ │ ├── fakeOrders.json │ │ └── realOrders.json │ ├── pages │ │ ├── Dashboard.vue │ │ ├── Kiosk │ │ │ └── OrderItem.vue │ │ ├── Maps.vue │ │ ├── NotFoundPage.vue │ │ ├── Profile.vue │ │ └── Profile │ │ │ ├── EditProfileForm.vue │ │ │ └── UserCard.vue │ ├── plugins │ │ ├── RTLPlugin.js │ │ ├── blackDashboard.js │ │ ├── globalComponents.js │ │ └── globalDirectives.js │ ├── registerServiceWorker.js │ └── router │ │ ├── index.js │ │ └── routes.js └── vue.config.js ├── RedDog.VirtualCustomers ├── Dockerfile ├── Models │ ├── CustomerOrder.cs │ ├── CustomerOrderItem.cs │ └── Product.cs ├── Program.cs ├── RedDog.VirtualCustomers.csproj ├── VirtualCustomers.cs └── appsettings.json ├── RedDog.VirtualWorker ├── Controllers │ ├── ProbesController.cs │ └── VirtualWorkerController.cs ├── Dockerfile ├── Models │ ├── OrderItemSummary.cs │ └── OrderSummary.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── RedDog.VirtualWorker.csproj ├── Startup.cs ├── appsettings.Development.json └── appsettings.json ├── RedDog.sln ├── SECURITY.md ├── assets ├── .keep ├── architecture.png ├── hybrid.png ├── paas-vnext-arch.png └── reddog_code.png ├── docs └── local-dev.md ├── manifests ├── branch │ ├── .flux.yaml │ ├── base │ │ ├── components │ │ │ ├── reddog.binding.receipt.yaml │ │ │ ├── reddog.binding.virtualworker.yaml │ │ │ ├── reddog.config.yaml │ │ │ ├── reddog.pubsub.yaml │ │ │ ├── reddog.secretstore.yaml │ │ │ ├── reddog.state.loyalty.yaml │ │ │ └── reddog.state.makeline.yaml │ │ ├── deployments │ │ │ ├── accounting-service.yaml │ │ │ ├── bootstrapper.yaml │ │ │ ├── corp-transfer-fx.yaml │ │ │ ├── loyalty-service.yaml │ │ │ ├── make-line-service.yaml │ │ │ ├── namespace.yaml │ │ │ ├── order-service.yaml │ │ │ ├── rbac.yaml │ │ │ ├── receipt-generation-service.yaml │ │ │ ├── services-for-ui.yaml │ │ │ ├── ui-service.yaml │ │ │ ├── ui.yaml │ │ │ ├── virtual-customers.yaml │ │ │ └── virtual-worker.yaml │ │ └── kustomization.yaml │ ├── dependencies │ │ ├── .flux.yaml │ │ ├── cert-manager │ │ │ └── cert-manager.yaml │ │ ├── dapr │ │ │ └── dapr.yaml │ │ ├── keda │ │ │ └── keda.yaml │ │ ├── nginx │ │ │ └── nginx.yaml │ │ ├── rabbitmq │ │ │ └── rabbitmq.yaml │ │ ├── redis │ │ │ └── redis.yaml │ │ ├── sql │ │ │ ├── pvc.yaml │ │ │ └── sql-server.yaml │ │ └── yaml │ │ │ ├── cluster-issuer.yaml │ │ │ └── namespaces.yaml │ └── redmond │ │ ├── kustomization.yaml │ │ ├── virtual-customers.patch.yaml │ │ └── virtual-worker.patch.yaml ├── corporate │ ├── components │ │ ├── reddog.config.yaml │ │ ├── reddog.pubsub.yaml │ │ ├── reddog.secretstore.yaml │ │ └── reddog.state.loyalty.yaml │ ├── deployments │ │ ├── accounting-service.yaml │ │ ├── bootstrapper.yaml │ │ ├── loyalty-service.yaml │ │ └── rbac.yaml │ └── kustomization.yaml └── local │ ├── branch │ ├── .keep │ ├── reddog.binding.receipt.yaml │ ├── reddog.binding.virtualworker.yaml │ ├── reddog.pubsub.yaml │ ├── reddog.secretstore.yaml │ ├── reddog.state.loyalty.yaml │ ├── reddog.state.makeline.yaml │ └── secrets.json │ └── corporate │ └── .keep └── rest-samples ├── accounting-service.rest ├── makeline-service.rest ├── order-service.rest └── ui.rest /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: 2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/dapr-dotnet 3 | { 4 | "name": "Dapr with C# (Community)", 5 | "dockerComposeFile": "docker-compose.yml", 6 | "service": "app", 7 | "workspaceFolder": "/workspace", 8 | 9 | // Use this environment variable if you need to bind mount your local source code into a new container. 10 | "remoteEnv": { 11 | "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" 12 | }, 13 | 14 | // Set *default* container specific settings.json values on container create. 15 | "settings": { 16 | "terminal.integrated.shell.linux": "/bin/bash" 17 | }, 18 | 19 | // Add the IDs of extensions you want installed when the container is created. 20 | "extensions": [ 21 | "ms-azuretools.vscode-dapr", 22 | "ms-azuretools.vscode-docker", 23 | "ms-dotnettools.csharp", 24 | "humao.rest-client" 25 | ], 26 | 27 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 28 | // "forwardPorts": [], 29 | 30 | // Ensure Dapr is running on opening the container 31 | "postCreateCommand": "dapr uninstall --all && dapr init && dotnet tool install --global dotnet-ef && dotnet dev-certs https", 32 | 33 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. 34 | "remoteUser": "vscode" 35 | } 36 | -------------------------------------------------------------------------------- /.devcontainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | services: 3 | app: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | variant: 3.1 9 | 10 | environment: 11 | #ASPNETCORE_Kestrel__Endpoints__Http__Url: http://*:5000 12 | DAPR_NETWORK: dapr-dev-container 13 | 14 | init: true 15 | volumes: 16 | # Forwards the local Docker socket to the container. 17 | - /var/run/docker.sock:/var/run/docker-host.sock 18 | # Update this to wherever you want VS Code to mount the folder of your project 19 | - ..:/workspace:cached 20 | 21 | # Overrides default command so things don't shut down after the process ends. 22 | entrypoint: /usr/local/share/docker-init.sh 23 | command: sleep infinity 24 | 25 | # Uncomment the next four lines if you will use a ptrace-based debuggers like C++, Go, and Rust. 26 | # cap_add: 27 | # - SYS_PTRACE 28 | # security_opt: 29 | # - seccomp:unconfined 30 | 31 | # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. 32 | # (Adding the "ports" property to this file will not forward from a Codespace.) 33 | db: 34 | image: "mcr.microsoft.com/mssql/server:2019-latest" 35 | environment: 36 | MSSQL_SA_PASSWORD: "pass@word1" 37 | ACCEPT_EULA: "Y" 38 | container_name: reddog-sql-server 39 | restart: on-failure 40 | networks: 41 | default: 42 | name: dapr-dev-container -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/compose* 19 | **/Dockerfile* 20 | **/node_modules 21 | **/npm-debug.log 22 | **/obj 23 | **/secrets.dev.yaml 24 | **/values.dev.yaml 25 | README.md 26 | -------------------------------------------------------------------------------- /.github/workflows/promote-manifests.yaml: -------------------------------------------------------------------------------- 1 | name: promote-manifests 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'master' 7 | paths: 8 | - 'manifests/**' 9 | 10 | workflow_dispatch: 11 | 12 | jobs: 13 | echo-success: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: echo 17 | run: | 18 | echo "It worked!" -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in 2 | # the repo. Unless a later match takes precedence, 3 | # @Azure/cloud-native-gbb will be requested for 4 | # review when someone opens a pull request. 5 | * @Azure/cloud-native-gbb 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE -------------------------------------------------------------------------------- /RedDog.AccountingModel/AccountingContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RedDog.AccountingModel 4 | { 5 | public class AccountingContext : DbContext 6 | { 7 | public AccountingContext(DbContextOptions options) : base(options) 8 | { 9 | } 10 | 11 | public DbSet Customers { get; set; } 12 | public DbSet Orders { get; set; } 13 | public DbSet OrderItems { get; set; } 14 | public DbSet Stores { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /RedDog.AccountingModel/CompiledModels/AccountingContextModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | using Microsoft.EntityFrameworkCore.Infrastructure; 3 | using Microsoft.EntityFrameworkCore.Metadata; 4 | 5 | #pragma warning disable 219, 612, 618 6 | #nullable disable 7 | 8 | namespace RedDog.AccountingModel 9 | { 10 | [DbContext(typeof(AccountingContext))] 11 | public partial class AccountingContextModel : RuntimeModel 12 | { 13 | static AccountingContextModel() 14 | { 15 | var model = new AccountingContextModel(); 16 | model.Initialize(); 17 | model.Customize(); 18 | _instance = model; 19 | } 20 | 21 | private static AccountingContextModel _instance; 22 | public static IModel Instance => _instance; 23 | 24 | partial void Initialize(); 25 | 26 | partial void Customize(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /RedDog.AccountingModel/CompiledModels/AccountingContextModelBuilder.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Microsoft.EntityFrameworkCore.Infrastructure; 4 | using Microsoft.EntityFrameworkCore.Metadata; 5 | 6 | #pragma warning disable 219, 612, 618 7 | #nullable disable 8 | 9 | namespace RedDog.AccountingModel 10 | { 11 | public partial class AccountingContextModel 12 | { 13 | partial void Initialize() 14 | { 15 | var customer = CustomerEntityType.Create(this); 16 | var order = OrderEntityType.Create(this); 17 | var orderItem = OrderItemEntityType.Create(this); 18 | var storeLocation = StoreLocationEntityType.Create(this); 19 | 20 | OrderEntityType.CreateForeignKey1(order, customer); 21 | OrderItemEntityType.CreateForeignKey1(orderItem, order); 22 | 23 | CustomerEntityType.CreateAnnotations(customer); 24 | OrderEntityType.CreateAnnotations(order); 25 | OrderItemEntityType.CreateAnnotations(orderItem); 26 | StoreLocationEntityType.CreateAnnotations(storeLocation); 27 | 28 | AddAnnotation("ProductVersion", "6.0.4"); 29 | AddAnnotation("Relational:MaxIdentifierLength", 128); 30 | AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /RedDog.AccountingModel/Customer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace RedDog.AccountingModel 5 | { 6 | [Table(nameof(Customer))] 7 | public class Customer 8 | { 9 | [Column(TypeName = "nvarchar(36)")] 10 | [Key] 11 | public string LoyaltyId { get; set; } 12 | 13 | [Column(TypeName = "nvarchar(50)")] 14 | [Required] 15 | public string FirstName { get; set; } 16 | 17 | [Column(TypeName = "nvarchar(50)")] 18 | [Required] 19 | public string LastName { get; set; } 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /RedDog.AccountingModel/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | 6 | namespace RedDog.AccountingModel 7 | { 8 | [Table(nameof(Order))] 9 | public class Order 10 | { 11 | public Order() 12 | { 13 | OrderItems = new List(); 14 | } 15 | 16 | [Key] 17 | public Guid OrderId { get; set; } 18 | 19 | [Column(TypeName = "nvarchar(50)")] 20 | [Required] 21 | public string StoreId { get; set; } 22 | 23 | [Required] 24 | public DateTime PlacedDate { get; set; } 25 | 26 | public DateTime? CompletedDate { get; set; } 27 | 28 | [Required] 29 | public Customer Customer { get; set; } 30 | 31 | [Required] 32 | public List OrderItems { get; set; } 33 | 34 | [Required] 35 | [Column(TypeName = "decimal(18,2)")] 36 | public decimal OrderTotal { get; set; } 37 | } 38 | } -------------------------------------------------------------------------------- /RedDog.AccountingModel/OrderItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace RedDog.AccountingModel 6 | { 7 | [Table(nameof(OrderItem))] 8 | public class OrderItem 9 | { 10 | [Key] 11 | public int OrderItemId { get; set; } 12 | 13 | public int ProductId { get; set; } 14 | 15 | [Column(TypeName = "nvarchar(50)")] 16 | [Required] 17 | public string ProductName { get; set; } 18 | 19 | public int Quantity { get; set; } 20 | 21 | [Column(TypeName = "decimal(18,2)")] 22 | public decimal UnitCost { get; set; } 23 | 24 | [Column(TypeName = "decimal(18,2)")] 25 | public decimal UnitPrice { get; set; } 26 | 27 | [Column(TypeName = "nvarchar(255)")] 28 | public string ImageUrl { get; set; } 29 | 30 | public Guid OrderId { get; set; } 31 | 32 | public Order Order { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /RedDog.AccountingModel/RedDog.AccountingModel.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | runtime; build; native; contentfiles; analyzers; buildtransitive 10 | all 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /RedDog.AccountingModel/StoreLocation.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace RedDog.AccountingModel 5 | { 6 | [Table(nameof(StoreLocation))] 7 | public class StoreLocation 8 | { 9 | [Column(TypeName = "nvarchar(54)")] 10 | [Key] 11 | public string StoreId { get; set; } 12 | 13 | [Column(TypeName = "nvarchar(255)")] 14 | public string Description { get; set; } 15 | 16 | [Column(TypeName = "nvarchar(100)")] 17 | [Required] 18 | public string City { get; set; } 19 | 20 | [Column(TypeName = "nvarchar(100)")] 21 | [Required] 22 | public string StateProvince { get; set; } 23 | 24 | [Column(TypeName = "nvarchar(30)")] 25 | [Required] 26 | public string PostalCode { get; set; } 27 | 28 | [Column(TypeName = "nvarchar(54)")] 29 | [Required] 30 | public string Country { get; set; } 31 | 32 | [Column(TypeName = "decimal(12,6)")] 33 | [Required] 34 | public decimal Latitude { get; set; } 35 | 36 | [Column(TypeName = "decimal(12,6)")] 37 | [Required] 38 | public decimal Longitude { get; set; } 39 | } 40 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.AccountingService" 11 | RUN dotnet build "RedDog.AccountingService.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.AccountingService.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.AccountingService.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.AccountingService.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | 22 | [JsonPropertyName("imageUrl")] 23 | public string ImageUrl { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/OrderMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace RedDog.AccountingService.Models 5 | { 6 | public class OrderMetric 7 | { 8 | [JsonPropertyName("storeId")] 9 | public string StoreId { get; set; } 10 | 11 | [JsonPropertyName("orderDate")] 12 | public DateTime OrderDate { get; set; } 13 | 14 | [JsonPropertyName("orderHour")] 15 | public int OrderHour { get; set; } 16 | 17 | [JsonPropertyName("orderCount")] 18 | public int OrderCount { get; set; } 19 | 20 | [JsonPropertyName("avgFulfillmentSec")] 21 | public int AvgFulfillmentTimeSec { get; set; } 22 | 23 | [JsonPropertyName("orderItemCount")] 24 | public int OrderItemCount { get; set; } 25 | 26 | [JsonPropertyName("totalCost")] 27 | public decimal TotalCost { get; set; } 28 | 29 | [JsonPropertyName("totalPrice")] 30 | public decimal TotalPrice { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.AccountingService.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | public string StoreId { get; set; } 20 | 21 | [JsonPropertyName("firstName")] 22 | public string FirstName { get; set; } 23 | 24 | [JsonPropertyName("lastName")] 25 | public string LastName { get; set; } 26 | 27 | [JsonPropertyName("loyaltyId")] 28 | public string LoyaltyId { get; set; } 29 | 30 | [JsonPropertyName("orderItems")] 31 | public List OrderItems { get; set; } 32 | 33 | [JsonPropertyName("orderTotal")] 34 | public decimal OrderTotal { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/OrdersTimeSeries.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.AccountingService.Models 6 | { 7 | public class OrdersTimeSeries 8 | { 9 | [JsonPropertyName("storeId")] 10 | public string StoreId { get; set; } 11 | 12 | [JsonPropertyName("values")] 13 | public List> Values {get; set;} 14 | 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/SalesProfitMetric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace RedDog.AccountingService.Models 5 | { 6 | public class SalesProfitMetric 7 | { 8 | 9 | [JsonPropertyName("storeId")] 10 | public string StoreId { get; set; } 11 | 12 | [JsonPropertyName("orderYear")] 13 | public int OrderYear { get; set; } 14 | 15 | [JsonPropertyName("orderMonth")] 16 | public int OrderMonth { get; set; } 17 | 18 | [JsonPropertyName("orderDay")] 19 | public int OrderDay { get; set; } 20 | 21 | [JsonPropertyName("orderHour")] 22 | public int OrderHour { get; set; } 23 | 24 | [JsonPropertyName("totalOrders")] 25 | public int TotalOrders { get; set; } 26 | 27 | [JsonPropertyName("totalOrderItems")] 28 | public int TotalOrderItems { get; set; } 29 | 30 | [JsonPropertyName("totalSales")] 31 | public decimal TotalSales { get; set; } 32 | 33 | [JsonPropertyName("totalProfit")] 34 | public decimal TotalProfit { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/StoreTimeSegment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.AccountingService.Models 6 | { 7 | public class StoreTimeSegment 8 | { 9 | [JsonPropertyName("storeId")] 10 | public string StoreId { get; set; } 11 | 12 | [JsonPropertyName("year")] 13 | public int Year {get;set;} 14 | 15 | [JsonPropertyName("month")] 16 | public int Month {get;set;} 17 | 18 | [JsonPropertyName("day")] 19 | public int Day {get;set;} 20 | 21 | } 22 | 23 | public class StoreTimeSegmentHour: StoreTimeSegment 24 | { 25 | [JsonPropertyName("hour")] 26 | public int Hour {get;set;} 27 | } 28 | 29 | public class StoreTimeSegmentMinute : StoreTimeSegmentHour 30 | { 31 | [JsonPropertyName("minute")] 32 | public int Minute {get;set;} 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Models/TimeSeries.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace RedDog.AccountingService.Models 5 | { 6 | public class TimeSeries 7 | { 8 | [JsonPropertyName("pointInTime")] 9 | public DateTime PointInTime { get; set; } 10 | 11 | [JsonPropertyName("value")] 12 | public T Value { get; set; } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /RedDog.AccountingService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:56198", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "launchUrl": "swagger", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "RedDog.AccountingService": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": "true", 23 | "launchBrowser": true, 24 | "launchUrl": "swagger", 25 | "applicationUrl": "http://localhost:5000", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /RedDog.AccountingService/RedDog.AccountingService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | runtime; build; native; contentfiles; analyzers; buildtransitive 12 | all 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /RedDog.AccountingService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RedDog.AccountingService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /RedDog.Bootstrapper/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base 2 | WORKDIR /app 3 | 4 | # Creates a non-root user with an explicit UID and adds permission to access the /app folder 5 | # For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers 6 | RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app 7 | USER appuser 8 | 9 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 10 | WORKDIR /src 11 | COPY . . 12 | WORKDIR "/src/RedDog.Bootstrapper" 13 | RUN dotnet build "RedDog.Bootstrapper.csproj" -c Release -o /app/build 14 | 15 | FROM build AS publish 16 | RUN dotnet publish "RedDog.Bootstrapper.csproj" -c Release -o /app/publish 17 | 18 | FROM base AS final 19 | WORKDIR /app 20 | COPY --from=publish /app/publish . 21 | ENTRYPOINT ["dotnet", "RedDog.Bootstrapper.dll"] 22 | -------------------------------------------------------------------------------- /RedDog.Bootstrapper/README.md: -------------------------------------------------------------------------------- 1 | create user reddog with password = [PASSWORD]; 2 | go 3 | 4 | grant create table to reddog; 5 | go 6 | 7 | grant control on schema::dbo to reddog; 8 | go 9 | 10 | 11 | Running migrations 12 | DAPR_GRPC_PORT=5801 dotnet ef migrations add InitialCreate -------------------------------------------------------------------------------- /RedDog.Bootstrapper/RedDog.Bootstrapper.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | runtime; build; native; contentfiles; analyzers; buildtransitive 11 | all 12 | 13 | 14 | 15 | 16 | Exe 17 | net6.0 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/.dockerignore: -------------------------------------------------------------------------------- 1 | local.settings.json -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'browser': true, 4 | 'commonjs': true, 5 | 'es2021': true 6 | }, 7 | 'extends': 'eslint:recommended', 8 | 'parserOptions': { 9 | 'ecmaVersion': 12 10 | }, 11 | 'rules': { 12 | 'indent': [ 13 | 'warn' 14 | ], 15 | 'quotes': [ 16 | 'error', 17 | 'single' 18 | ], 19 | 'semi': [ 20 | 'error', 21 | 'always' 22 | ], 23 | 'no-undef': [ 24 | 'off' 25 | ] 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/.funcignore: -------------------------------------------------------------------------------- 1 | *.js.map 2 | *.ts 3 | .git* 4 | .vscode 5 | local.settings.json 6 | test 7 | tsconfig.json -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/Dockerfile: -------------------------------------------------------------------------------- 1 | # To enable ssh & remote debugging on app service change the base image to the one below 2 | # FROM mcr.microsoft.com/azure-functions/node:3.0-appservice 3 | FROM mcr.microsoft.com/azure-functions/node:3.0 4 | 5 | # Label for GHCR 6 | LABEL org.opencontainers.image.source='https://github.com/cloudnativegbb/paas-vnext' 7 | LABEL org.opencontainers.image.url='https://github.com/cloudnativegbb/paas-vnext' 8 | 9 | ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ 10 | AzureFunctionsJobHost__Logging__Console__IsEnabled=true 11 | 12 | COPY . /home/site/wwwroot 13 | 14 | RUN cd /home/site/wwwroot && \ 15 | npm install 16 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/RabbitOrderCompletedFx/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "name": "ordersQueueItem", 5 | "type": "RabbitMQTrigger", 6 | "direction": "in", 7 | "queueName": "corp-transfer-ordercompleted", 8 | "connectionStringSetting": "rabbitMQConnectionAppSetting", 9 | "port": 5672 10 | }, 11 | { 12 | "name": "outputSbQueue", 13 | "type": "serviceBus", 14 | "queueName": "ordercompleted", 15 | "connection": "MyServiceBusConnection", 16 | "direction": "out" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/RabbitOrderCompletedFx/index.js: -------------------------------------------------------------------------------- 1 | module.exports = async function (context, ordersQueueItem) { 2 | 3 | // get order context from Rabbit 4 | context.log(`Debug: ${JSON.stringify(ordersQueueItem)}`); 5 | const obj = ordersQueueItem; 6 | const objData = obj? obj.data: {}; 7 | const orderId = objData? objData.orderId: ''; 8 | const orderCompletedDate = objData? objData.orderCompletedDate: ''; 9 | 10 | context.log(`OrderId: ${orderId} completed on ${orderCompletedDate}`); 11 | 12 | // output order to Azure service bus 13 | context.bindings.outputSbQueue = obj; 14 | context.log(`Order completion written to Azure Service Bus`); 15 | context.done(); 16 | }; 17 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/RabbitOrdersFx/function.json: -------------------------------------------------------------------------------- 1 | { 2 | "bindings": [ 3 | { 4 | "name": "ordersQueueItem", 5 | "type": "RabbitMQTrigger", 6 | "direction": "in", 7 | "queueName": "corp-transfer-orders", 8 | "connectionStringSetting": "rabbitMQConnectionAppSetting", 9 | "port": 5672 10 | }, 11 | { 12 | "name": "outputSbQueue", 13 | "type": "serviceBus", 14 | "queueName": "orders", 15 | "connection": "MyServiceBusConnection", 16 | "direction": "out" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/RabbitOrdersFx/index.js: -------------------------------------------------------------------------------- 1 | module.exports = async function (context, ordersQueueItem) { 2 | 3 | // get order context from Rabbit 4 | context.log(`Debug: ${JSON.stringify(ordersQueueItem)}`); 5 | const obj = ordersQueueItem; 6 | const objData = obj? obj.data: {}; 7 | const orderId = objData? objData.orderId: ''; 8 | 9 | context.log(`OrderId: ${orderId}`); 10 | 11 | // output order to Azure service bus 12 | context.bindings.outputSbQueue = obj; 13 | context.log(`Order written to Azure Service Bus`); 14 | context.done(); 15 | }; 16 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "extensionBundle": { 4 | "id": "Microsoft.Azure.Functions.ExtensionBundle", 5 | "version": "[1.*, 2.0.0)" 6 | }, 7 | "logging": { 8 | "applicationInsights": { 9 | "samplingSettings": { 10 | "isEnabled": true, 11 | "excludedTypes": "Request" 12 | } 13 | } 14 | }, 15 | "extensions": { 16 | "serviceBus": { 17 | "prefetchCount": 100, 18 | "messageHandlerOptions": { 19 | "autoComplete": true, 20 | "maxConcurrentCalls": 32, 21 | "maxAutoRenewDuration": "00:05:00" 22 | }, 23 | "sessionHandlerOptions": { 24 | "autoComplete": false, 25 | "messageWaitTimeout": "00:00:30", 26 | "maxAutoRenewDuration": "00:55:00", 27 | "maxConcurrentSessions": 16 28 | } 29 | }, 30 | "rabbitMQ": { 31 | "prefetchCount": 100, 32 | "queueName": "fx-queue-orders", 33 | "connectionString": "amqp://user:H7MupfitOG@20.75.144.14:5672", 34 | "port": 5672 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extensions-test", 3 | "version": "1.0.0", 4 | "description": "Azure Functions related to Rabbit MQ Trigger", 5 | "scripts": { 6 | "start": "func start", 7 | "test": "echo \"No tests yet...\"", 8 | "lint": "eslint . --ext .js" 9 | }, 10 | "author": "Brian Redmond", 11 | "dependencies": { 12 | "eslint": "^7.22.0", 13 | "eslint-plugin-import": "^2.22.1" 14 | }, 15 | "devDependencies": {} 16 | } 17 | -------------------------------------------------------------------------------- /RedDog.CorporateTransferService/proxies.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/proxies", 3 | "proxies": {} 4 | } 5 | -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Controllers/ProbesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace RedDog.LoyaltyService.Controllers 8 | { 9 | [ApiController] 10 | [Route("[controller]")] 11 | public class ProbesController : ControllerBase 12 | { 13 | private string DaprHttpPort = Environment.GetEnvironmentVariable("DAPR_HTTP_PORT") ?? "3500"; 14 | private ILogger _logger; 15 | private HttpClient _httpClient; 16 | 17 | public ProbesController(ILogger logger, IHttpClientFactory httpClientFactory) 18 | { 19 | _logger = logger; 20 | _httpClient = httpClientFactory.CreateClient(); 21 | } 22 | 23 | [HttpGet("ready")] 24 | public async Task IsReady() 25 | { 26 | return await Task.FromResult(Ok()); 27 | } 28 | 29 | [HttpGet("healthz")] 30 | public async Task IsHealthy() 31 | { 32 | // Ensure dapr sidecar is running and healthy. If not, fail the health check and have the pod restarted. 33 | // This should prevent the case where the application container is running before dapr is installed in 34 | // the case of a gitops deploy. 35 | var response = await _httpClient.GetAsync($"http://localhost:{DaprHttpPort}/v1.0/healthz"); 36 | return new StatusCodeResult((int)response.StatusCode); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.LoyaltyService" 11 | RUN dotnet build "RedDog.LoyaltyService.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.LoyaltyService.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.LoyaltyService.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Models/LoyaltySummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.LoyaltyService.Models 4 | { 5 | public class LoyaltySummary 6 | { 7 | [JsonPropertyName("loyaltyId")] 8 | public string LoyaltyId { get; set; } 9 | [JsonPropertyName("firstName")] 10 | public string FirstName { get; set; } 11 | [JsonPropertyName("lastName")] 12 | public string LastName { get; set; } 13 | [JsonPropertyName("pointsEarned")] 14 | public int PointsEarned { get; set; } 15 | [JsonPropertyName("pointTotal")] 16 | public int PointTotal { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.LoyaltyService.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.LoyaltyService.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | public string StoreId { get; set; } 20 | 21 | [JsonPropertyName("firstName")] 22 | public string FirstName { get; set; } 23 | 24 | [JsonPropertyName("lastName")] 25 | public string LastName { get; set; } 26 | 27 | [JsonPropertyName("loyaltyId")] 28 | public string LoyaltyId { get; set; } 29 | 30 | [JsonPropertyName("orderItems")] 31 | public List OrderItems { get; set; } 32 | 33 | [JsonPropertyName("orderTotal")] 34 | public decimal OrderTotal { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "Vigilantes.DaprWorkshop.LoyaltyService": { 5 | "commandName": "Project", 6 | "applicationUrl": "http://127.0.0.1:5400", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/RedDog.LoyaltyService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /RedDog.LoyaltyService/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Serilog; 7 | 8 | namespace RedDog.LoyaltyService 9 | { 10 | public class Startup 11 | { 12 | public Startup(IConfiguration configuration) 13 | { 14 | Configuration = configuration; 15 | } 16 | 17 | public IConfiguration Configuration { get; } 18 | 19 | public void ConfigureServices(IServiceCollection services) 20 | { 21 | services.AddHttpClient(); 22 | services.AddControllers().AddDapr(); 23 | } 24 | 25 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 26 | { 27 | if (env.IsDevelopment()) 28 | { 29 | app.UseDeveloperExceptionPage(); 30 | } 31 | 32 | app.UseSerilogRequestLogging(); 33 | app.UseRouting(); 34 | app.UseCloudEvents(); 35 | app.UseAuthorization(); 36 | app.UseEndpoints(endpoints => 37 | { 38 | endpoints.MapSubscribeHandler(); 39 | endpoints.MapControllers(); 40 | }); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /RedDog.LoyaltyService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.LoyaltyService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.MakeLineService/Controllers/ProbesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace RedDog.MakeLineService.Controllers 8 | { 9 | [ApiController] 10 | [Route("[controller]")] 11 | public class ProbesController : ControllerBase 12 | { 13 | private string DaprHttpPort = Environment.GetEnvironmentVariable("DAPR_HTTP_PORT") ?? "3500"; 14 | private ILogger _logger; 15 | private HttpClient _httpClient; 16 | 17 | public ProbesController(ILogger logger, IHttpClientFactory httpClientFactory) 18 | { 19 | _logger = logger; 20 | _httpClient = httpClientFactory.CreateClient(); 21 | } 22 | 23 | [HttpGet("ready")] 24 | public async Task IsReady() 25 | { 26 | return await Task.FromResult(Ok()); 27 | } 28 | 29 | [HttpGet("healthz")] 30 | public async Task IsHealthy() 31 | { 32 | // Ensure dapr sidecar is running and healthy. If not, fail the health check and have the pod restarted. 33 | // This should prevent the case where the application container is running before dapr is installed in 34 | // the case of a gitops deploy. 35 | var response = await _httpClient.GetAsync($"http://localhost:{DaprHttpPort}/v1.0/healthz"); 36 | return new StatusCodeResult((int)response.StatusCode); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /RedDog.MakeLineService/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.MakeLineService" 11 | RUN dotnet build "RedDog.MakeLineService.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.MakeLineService.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.MakeLineService.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.MakeLineService/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.MakeLineService.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | 22 | [JsonPropertyName("imageUrl")] 23 | public string ImageUrl { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /RedDog.MakeLineService/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.MakeLineService.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | 20 | public string StoreId { get; set; } 21 | 22 | [JsonPropertyName("firstName")] 23 | public string FirstName { get; set; } 24 | 25 | [JsonPropertyName("lastName")] 26 | public string LastName { get; set; } 27 | 28 | [JsonPropertyName("loyaltyId")] 29 | public string LoyaltyId { get; set; } 30 | 31 | [JsonPropertyName("orderItems")] 32 | public List OrderItems { get; set; } 33 | 34 | [JsonPropertyName("orderTotal")] 35 | public decimal OrderTotal { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /RedDog.MakeLineService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "Vigilantes.DaprWorkshop.MakeLineService": { 5 | "commandName": "Project", 6 | "applicationUrl": "http://127.0.0.1:5200", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RedDog.MakeLineService/RedDog.MakeLineService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /RedDog.MakeLineService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.MakeLineService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Controllers/ProbesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace RedDog.OrderService.Controllers 8 | { 9 | [ApiController] 10 | [Route("[controller]")] 11 | public class ProbesController : ControllerBase 12 | { 13 | private static bool isReady; 14 | private string DaprHttpPort = Environment.GetEnvironmentVariable("DAPR_HTTP_PORT") ?? "3500"; 15 | private ILogger _logger; 16 | private HttpClient _httpClient; 17 | 18 | public ProbesController(ILogger logger, IHttpClientFactory httpClientFactory) 19 | { 20 | _logger = logger; 21 | _httpClient = httpClientFactory.CreateClient(); 22 | } 23 | 24 | [HttpGet("ready")] 25 | public async Task IsReady() 26 | { 27 | return await Task.FromResult(Ok()); 28 | } 29 | 30 | [HttpGet("healthz")] 31 | public async Task IsHealthy() 32 | { 33 | // Ensure dapr sidecar is running and healthy. If not, fail the health check and have the pod restarted. 34 | // This should prevent the case where the application container is running before dapr is installed in 35 | // the case of a gitops deploy. 36 | var response = await _httpClient.GetAsync($"http://localhost:{DaprHttpPort}/v1.0/healthz"); 37 | return new StatusCodeResult((int)response.StatusCode); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Controllers/ProductController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | using RedDog.OrderService.Models; 7 | 8 | namespace RedDog.OrderService.Controllers 9 | { 10 | [ApiController] 11 | [EnableCors] 12 | [Route("[controller]")] 13 | public class ProductController : ControllerBase 14 | { 15 | private readonly ILogger _logger; 16 | public ProductController(ILogger logger) 17 | { 18 | _logger = logger; 19 | } 20 | 21 | [HttpGet] 22 | public async Task> Get() 23 | { 24 | return await Product.GetAllAsync(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.OrderService" 11 | RUN dotnet build "RedDog.OrderService.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.OrderService.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.OrderService.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.OrderService/Models/CustomerOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.OrderService.Models 6 | { 7 | public class CustomerOrder 8 | { 9 | [JsonPropertyName("storeId")] 10 | public string StoreId { get; set; } 11 | 12 | [JsonPropertyName("firstName")] 13 | public string FirstName { get; set; } 14 | 15 | [JsonPropertyName("lastName")] 16 | public string LastName { get; set; } 17 | 18 | [JsonPropertyName("loyaltyId")] 19 | public string LoyaltyId { get; set; } 20 | 21 | [JsonPropertyName("orderItems")] 22 | public List OrderItems { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Models/CustomerOrderItem.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.OrderService.Models 4 | { 5 | public class CustomerOrderItem 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("quantity")] 11 | public int Quantity { get; set; } 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.OrderService.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | 22 | [JsonPropertyName("imageUrl")] 23 | public string ImageUrl { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.OrderService.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | public string StoreId { get; set; } 20 | 21 | [JsonPropertyName("firstName")] 22 | public string FirstName { get; set; } 23 | 24 | [JsonPropertyName("lastName")] 25 | public string LastName { get; set; } 26 | 27 | [JsonPropertyName("loyaltyId")] 28 | public string LoyaltyId { get; set; } 29 | 30 | [JsonPropertyName("orderItems")] 31 | public List OrderItems { get; set; } 32 | 33 | [JsonPropertyName("orderTotal")] 34 | public decimal OrderTotal { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.OrderService/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text.Json; 5 | using System.Text.Json.Serialization; 6 | using System.Threading.Tasks; 7 | 8 | namespace RedDog.OrderService.Models 9 | { 10 | public class Product 11 | { 12 | private static string _productDefinitionFilename = Environment.GetEnvironmentVariable("PRODUCT_DEFINITION_FILENAME") ?? "DrugStoreProducts-categorized.json"; 13 | private static List _products; 14 | 15 | [JsonPropertyName("productId")] 16 | public int ProductId { get; set; } 17 | 18 | [JsonPropertyName("productName")] 19 | public string ProductName { get; set; } 20 | 21 | [JsonPropertyName("description")] 22 | public string Description { get; set; } 23 | 24 | [JsonPropertyName("unitCost")] 25 | public decimal UnitCost { get; set; } 26 | 27 | [JsonPropertyName("unitPrice")] 28 | public decimal UnitPrice { get; set; } 29 | 30 | [JsonPropertyName("imageUrl")] 31 | public string ImageUrl { get; set; } 32 | 33 | [JsonPropertyName("categoryId")] 34 | public string CategoryId { get; set; } 35 | 36 | public static async Task> GetAllAsync() 37 | { 38 | if(_products == null) 39 | { 40 | using FileStream jsonStream = File.OpenRead($"ProductDefinitions/{_productDefinitionFilename}"); 41 | _products = await JsonSerializer.DeserializeAsync>(jsonStream); 42 | } 43 | 44 | return _products; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /RedDog.OrderService/ProductDefinitions/CoffeeShopProducts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "productId": 1, 4 | "productName": "Americano", 5 | "description": "Americano", 6 | "unitCost": 1.99, 7 | "unitPrice": 2.99, 8 | "imageUrl": "https://daprworkshop.blob.core.windows.net/images/americano.jpg" 9 | }, 10 | { 11 | "productId": 2, 12 | "productName": "Caramel Macchiato", 13 | "description": "Caramel Macchiato", 14 | "unitCost": 2.99, 15 | "unitPrice": 4.99, 16 | "imageUrl": "https://daprworkshop.blob.core.windows.net/images/macchiato.jpg" 17 | }, 18 | { 19 | "productId": 3, 20 | "productName": "Latte", 21 | "description": "Latte", 22 | "unitCost": 2.49, 23 | "unitPrice": 3.99, 24 | "imageUrl": "https://daprworkshop.blob.core.windows.net/images/latte.jpg" 25 | } 26 | ] -------------------------------------------------------------------------------- /RedDog.OrderService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "Vigilantes.DaprWorkshop.OrderService": { 5 | "commandName": "Project", 6 | "applicationUrl": "https://127.0.0.1:5102;http://127.0.0.1:5100", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RedDog.OrderService/RedDog.OrderService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RedDog.OrderService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.OrderService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Controllers/ProbesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace RedDog.ReceiptGenerationService.Controllers 8 | { 9 | [ApiController] 10 | [Route("[controller]")] 11 | public class ProbesController : ControllerBase 12 | { 13 | private string DaprHttpPort = Environment.GetEnvironmentVariable("DAPR_HTTP_PORT") ?? "3500"; 14 | private ILogger _logger; 15 | private HttpClient _httpClient; 16 | 17 | public ProbesController(ILogger logger, IHttpClientFactory httpClientFactory) 18 | { 19 | _logger = logger; 20 | _httpClient = httpClientFactory.CreateClient(); 21 | } 22 | 23 | [HttpGet("ready")] 24 | public async Task IsReady() 25 | { 26 | return await Task.FromResult(Ok()); 27 | } 28 | 29 | [HttpGet("healthz")] 30 | public async Task IsHealthy() 31 | { 32 | // Ensure dapr sidecar is running and healthy. If not, fail the health check and have the pod restarted. 33 | // This should prevent the case where the application container is running before dapr is installed in 34 | // the case of a gitops deploy. 35 | var response = await _httpClient.GetAsync($"http://localhost:{DaprHttpPort}/v1.0/healthz"); 36 | return new StatusCodeResult((int)response.StatusCode); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.ReceiptGenerationService" 11 | RUN dotnet build "RedDog.ReceiptGenerationService.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.ReceiptGenerationService.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.ReceiptGenerationService.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.ReceiptGenerationService.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.ReceiptGenerationService.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | public string StoreId { get; set; } 20 | 21 | [JsonPropertyName("firstName")] 22 | public string FirstName { get; set; } 23 | 24 | [JsonPropertyName("lastName")] 25 | public string LastName { get; set; } 26 | 27 | [JsonPropertyName("loyaltyId")] 28 | public string LoyaltyId { get; set; } 29 | 30 | [JsonPropertyName("orderItems")] 31 | public List OrderItems { get; set; } 32 | 33 | [JsonPropertyName("orderTotal")] 34 | public decimal OrderTotal { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "Vigilantes.DaprWorkshop.ReceiptGenerationService": { 5 | "commandName": "Project", 6 | "applicationUrl": "http://127.0.0.1:5300", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/RedDog.ReceiptGenerationService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Serilog; 7 | 8 | namespace RedDog.ReceiptGenerationService 9 | { 10 | public class Startup 11 | { 12 | public Startup(IConfiguration configuration) 13 | { 14 | Configuration = configuration; 15 | } 16 | 17 | public IConfiguration Configuration { get; } 18 | 19 | public void ConfigureServices(IServiceCollection services) 20 | { 21 | services.AddHttpClient(); 22 | services.AddControllers().AddDapr(); 23 | } 24 | 25 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 26 | { 27 | if (env.IsDevelopment()) 28 | { 29 | app.UseDeveloperExceptionPage(); 30 | } 31 | 32 | app.UseSerilogRequestLogging(); 33 | app.UseRouting(); 34 | app.UseCloudEvents(); 35 | app.UseAuthorization(); 36 | app.UseEndpoints(endpoints => 37 | { 38 | endpoints.MapSubscribeHandler(); 39 | endpoints.MapControllers(); 40 | }); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.ReceiptGenerationService/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AllowedHosts": "*" 3 | } -------------------------------------------------------------------------------- /RedDog.UI/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": [ 4 | "plugin:vue/essential" 5 | ], 6 | "rules": { 7 | "vue/no-mutating-props": "warn", 8 | "vue/no-use-v-if-with-v-for": "warn", 9 | "vue/return-in-computed-property": "warn" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RedDog.UI/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.15.4-alpine 2 | 3 | LABEL org.opencontainers.image.source='https://github.com/cloudnativegbb/paas-vnext' 4 | LABEL org.opencontainers.image.url='https://github.com/cloudnativegbb/paas-vnext' 5 | 6 | WORKDIR /usr/src/app 7 | COPY . . 8 | WORKDIR "/usr/src/app/RedDog.UI" 9 | RUN npm ci 10 | RUN npm run build 11 | 12 | ENV NODE_ENV "production" 13 | ENV VUE_APP_IS_CORP true 14 | ENV VUE_APP_STORE_ID "Austin" 15 | ENV VUE_APP_SITE_TYPE "Pharmacia" 16 | ENV VUE_APP_SITE_TITLE "Contoso :: Pharmacy & Bodega" 17 | ENV VUE_APP_MAKELINE_BASE_URL "http://austin.makeline.brianredmond.io" 18 | ENV VUE_APP_ACCOUNTING_BASE_URL "http://austin.accounting.brianredmond.io" 19 | 20 | EXPOSE 8080 21 | 22 | CMD [ "npm", "run", "container" ] 23 | -------------------------------------------------------------------------------- /RedDog.UI/README.md: -------------------------------------------------------------------------------- 1 | ![Red Dog :: Contoso](./public/img/android-chrome-192x192.png) 2 | ## RedDog.UI :: RedDog single site location user interface 3 | 4 | > Prerequisites 5 | 6 | - [Node.js](https://nodejs.org/) 7 | - [NPM](https://npm.org) 8 | 9 | 10 | 11 | ### QUI 12 | > To run locally with env vars 13 | 14 | - add a .env file to the root with the following in it, changing said variables as needed: 15 | ```shell 16 | VUE_APP_IS_CORP=false 17 | NODE_ENV=development 18 | VUE_APP_STORE_ID="Austin" 19 | VUE_APP_SITE_TYPE="Pharmacy" 20 | VUE_APP_SITE_TITLE="Contoso :: BODEGA" 21 | VUE_APP_MAKELINE_BASE_URL="http://austin.makeline.brianredmond.io" 22 | VUE_APP_ACCOUNTING_BASE_URL="http://austin.accounting.brianredmond.io" 23 | ``` 24 | 25 | 26 | 27 | 28 | > Then run 29 | ```shell 30 | npm ci ## this will overwrite any and all node_modules 31 | npm run serve 32 | ``` 33 | 34 | 35 | ## Hand crafted by 36 | - [Lynn Orrell](https://github.com/lynn-orrell) 37 | - [Brian Redmond](https://github.com/chzbrgr71) 38 | - [Linda Nichols](https://github.com/lynnaloo) 39 | - [Steve Griffith](https://github.com/swgriffith) 40 | - [Ray Kao](https://github.com/raykao) 41 | - [Alice J Gibbons](https://github.com/alicejgibbons) 42 | - [Joey Schluchter](https://github.com/jschluchter) 43 | 44 | 45 | ![Cloud Native GBB](./public/img/cngbb-wide-wt.png) 46 | 47 | --- 48 | ##### Open Source Credit 49 | Template by [Creative Tim](https://www.creative-tim.com/product/vue-black-dashboard) -------------------------------------------------------------------------------- /RedDog.UI/public/css/base.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/css/base.css -------------------------------------------------------------------------------- /RedDog.UI/public/img/GitHub-Mark-Light-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/GitHub-Mark-Light-64px.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/android-chrome-192x192.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/android-chrome-256x256.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/apple-icon.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/apple-touch-icon.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /RedDog.UI/public/img/cngbb-wide-bt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/cngbb-wide-bt.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/cngbb-wide-bt.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/cngbb-wide-bt.psd -------------------------------------------------------------------------------- /RedDog.UI/public/img/cngbb-wide-wt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/cngbb-wide-wt.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/cngbb-wide-wt.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/cngbb-wide-wt.psd -------------------------------------------------------------------------------- /RedDog.UI/public/img/cngbb-wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/cngbb-wide.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/contoso-pharmacy-tl-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/contoso-pharmacy-tl-logo.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/contoso.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/contoso.psd -------------------------------------------------------------------------------- /RedDog.UI/public/img/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/favicon-16x16.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/favicon-32x32.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/favicon.ico -------------------------------------------------------------------------------- /RedDog.UI/public/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/favicon.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/hex-back-pat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/hex-back-pat.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/max-lord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/max-lord.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/msft-20mm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/msft-20mm.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/msft-50mm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/msft-50mm.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/msft-cloud-native-600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/msft-cloud-native-600.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/mstile-150x150.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/mw-dapr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/mw-dapr.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/reddog-logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/reddog-logo-128.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/reddog-logo-226.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/reddog-logo-226.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/reddog-logo-round-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/reddog-logo-round-64.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/reddog-logo-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/public/img/reddog-logo-text.png -------------------------------------------------------------------------------- /RedDog.UI/public/img/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "red-dog", 3 | "short_name": "red-dog-location-dashboard", 4 | "icons": [ 5 | { 6 | "src": "./android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "./index.html", 17 | "display": "standalone", 18 | "background_color": "#000000", 19 | "theme_color": "#4DBA87" 20 | } 21 | -------------------------------------------------------------------------------- /RedDog.UI/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reddog location dashboard UI", 3 | "short_name": "RedDog.UI", 4 | "icons": [ 5 | { 6 | "src": "./android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "./index.html", 17 | "display": "standalone", 18 | "background_color": "#000000", 19 | "theme_color": "#4DBA87" 20 | } 21 | -------------------------------------------------------------------------------- /RedDog.UI/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /RedDog.UI/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/fonts/nucleo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/src/assets/fonts/nucleo.eot -------------------------------------------------------------------------------- /RedDog.UI/src/assets/fonts/nucleo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/src/assets/fonts/nucleo.ttf -------------------------------------------------------------------------------- /RedDog.UI/src/assets/fonts/nucleo.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/src/assets/fonts/nucleo.woff -------------------------------------------------------------------------------- /RedDog.UI/src/assets/fonts/nucleo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/RedDog.UI/src/assets/fonts/nucleo.woff2 -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: ($close-font-size + $alert-padding-x * 2); 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | 17 | // Empty badges collapse automatically 18 | &:empty { 19 | display: none; 20 | } 21 | } 22 | 23 | // Quick fix for badges in buttons 24 | .btn .badge { 25 | position: relative; 26 | top: -1px; 27 | } 28 | 29 | // Pill badges 30 | // 31 | // Make them extra rounded with a modifier to replace v3's badges. 32 | 33 | .badge-pill { 34 | padding-right: $badge-pill-padding-x; 35 | padding-left: $badge-pill-padding-x; 36 | @include border-radius($badge-pill-border-radius); 37 | } 38 | 39 | // Colors 40 | // 41 | // Contextual variations (linked badges get darker on :hover). 42 | 43 | @each $color, $value in $theme-colors { 44 | .badge-#{$color} { 45 | @include badge-variant($value); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($breadcrumb-border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item { 14 | padding-left: $breadcrumb-item-padding; 15 | 16 | &::before { 17 | display: inline-block; // Suppress underlining of the separator in modern browsers 18 | padding-right: $breadcrumb-item-padding; 19 | color: $breadcrumb-divider-color; 20 | content: $breadcrumb-divider; 21 | } 22 | } 23 | 24 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 25 | // without `
    `s. The `::before` pseudo-element generates an element 26 | // *within* the .breadcrumb-item and thereby inherits the `text-decoration`. 27 | // 28 | // To trick IE into suppressing the underline, we give the pseudo-element an 29 | // underline and then immediately remove it. 30 | + .breadcrumb-item:hover::before { 31 | text-decoration: underline; 32 | } 33 | // stylelint-disable-next-line no-duplicate-selectors 34 | + .breadcrumb-item:hover::before { 35 | text-decoration: none; 36 | } 37 | 38 | &.active { 39 | color: $breadcrumb-active-color; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_close.scss: -------------------------------------------------------------------------------- 1 | .close { 2 | float: right; 3 | font-size: $close-font-size; 4 | font-weight: $close-font-weight; 5 | line-height: 1; 6 | color: $close-color; 7 | text-shadow: $close-text-shadow; 8 | opacity: .5; 9 | 10 | &:not(:disabled):not(.disabled) { 11 | 12 | @include hover-focus { 13 | color: $close-color; 14 | text-decoration: none; 15 | opacity: .75; 16 | } 17 | 18 | // Opinionated: add "hand" cursor to non-disabled .close elements 19 | cursor: pointer; 20 | } 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | 28 | // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type 29 | button.close { 30 | padding: 0; 31 | background-color: transparent; 32 | border: 0; 33 | -webkit-appearance: none; 34 | } 35 | // stylelint-enable 36 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_code.scss: -------------------------------------------------------------------------------- 1 | // Inline code 2 | code { 3 | font-size: $code-font-size; 4 | color: $code-color; 5 | word-break: break-word; 6 | 7 | // Streamline the style when inside anchors to avoid broken underline and more 8 | a > & { 9 | color: inherit; 10 | } 11 | } 12 | 13 | // User input typically entered via keyboard 14 | kbd { 15 | padding: $kbd-padding-y $kbd-padding-x; 16 | font-size: $kbd-font-size; 17 | color: $kbd-color; 18 | background-color: $kbd-bg; 19 | @include border-radius($border-radius-sm); 20 | @include box-shadow($kbd-box-shadow); 21 | 22 | kbd { 23 | padding: 0; 24 | font-size: 100%; 25 | font-weight: $nested-kbd-font-weight; 26 | @include box-shadow(none); 27 | } 28 | } 29 | 30 | // Blocks of code 31 | pre { 32 | display: block; 33 | font-size: $code-font-size; 34 | color: $pre-color; 35 | 36 | // Account for some code outputs that place code tags in pre tags 37 | code { 38 | font-size: inherit; 39 | color: inherit; 40 | word-break: normal; 41 | } 42 | } 43 | 44 | // Enable scrollable blocks of code 45 | .pre-scrollable { 46 | max-height: $pre-scrollable-max-height; 47 | overflow-y: scroll; 48 | } 49 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_grid.scss: -------------------------------------------------------------------------------- 1 | // Container widths 2 | // 3 | // Set the container width, and override it for fixed navbars in media queries. 4 | 5 | @if $enable-grid-classes { 6 | .container { 7 | @include make-container(); 8 | @include make-container-max-widths(); 9 | } 10 | } 11 | 12 | // Fluid container 13 | // 14 | // Utilizes the mixin meant for fixed width containers, but with 100% width for 15 | // fluid, full width layouts. 16 | 17 | @if $enable-grid-classes { 18 | .container-fluid { 19 | @include make-container(); 20 | } 21 | } 22 | 23 | // Row 24 | // 25 | // Rows contain and clear the floats of your columns. 26 | 27 | @if $enable-grid-classes { 28 | .row { 29 | @include make-row(); 30 | } 31 | 32 | // Remove the negative margin from default .row, then the horizontal padding 33 | // from all immediate children columns (to prevent runaway style inheritance). 34 | .no-gutters { 35 | margin-right: 0; 36 | margin-left: 0; 37 | 38 | > .col, 39 | > [class*="col-"] { 40 | padding-right: 0; 41 | padding-left: 0; 42 | } 43 | } 44 | } 45 | 46 | // Columns 47 | // 48 | // Common styles for small and large grid columns 49 | 50 | @if $enable-grid-classes { 51 | @include make-grid-columns(); 52 | } 53 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_images.scss: -------------------------------------------------------------------------------- 1 | // Responsive images (ensure images don't scale beyond their parents) 2 | // 3 | // This is purposefully opt-in via an explicit class rather than being the default for all ``s. 4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2, 5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) 6 | // which weren't expecting the images within themselves to be involuntarily resized. 7 | // See also https://github.com/twbs/bootstrap/issues/18178 8 | .img-fluid { 9 | @include img-fluid; 10 | } 11 | 12 | 13 | // Image thumbnails 14 | .img-thumbnail { 15 | padding: $thumbnail-padding; 16 | background-color: $thumbnail-bg; 17 | border: $thumbnail-border-width solid $thumbnail-border-color; 18 | @include border-radius($thumbnail-border-radius); 19 | @include box-shadow($thumbnail-box-shadow); 20 | 21 | // Keep them at most 100% wide 22 | @include img-fluid; 23 | } 24 | 25 | // 26 | // Figures 27 | // 28 | 29 | .figure { 30 | // Ensures the caption's text aligns with the image. 31 | display: inline-block; 32 | } 33 | 34 | .figure-img { 35 | margin-bottom: ($spacer / 2); 36 | line-height: 1; 37 | } 38 | 39 | .figure-caption { 40 | font-size: $figure-caption-font-size; 41 | color: $figure-caption-color; 42 | } 43 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | background-color: $jumbotron-bg; 5 | @include border-radius($border-radius-lg); 6 | 7 | @include media-breakpoint-up(sm) { 8 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 9 | } 10 | } 11 | 12 | .jumbotron-fluid { 13 | padding-right: 0; 14 | padding-left: 0; 15 | @include border-radius(0); 16 | } 17 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Toggles 2 | // 3 | // Used in conjunction with global variables to enable certain theme features. 4 | 5 | // Utilities 6 | @import "mixins/breakpoints"; 7 | @import "mixins/hover"; 8 | @import "mixins/image"; 9 | @import "mixins/badge"; 10 | @import "mixins/resize"; 11 | @import "mixins/screen-reader"; 12 | @import "mixins/size"; 13 | @import "mixins/reset-text"; 14 | @import "mixins/text-emphasis"; 15 | @import "mixins/text-hide"; 16 | @import "mixins/text-truncate"; 17 | @import "mixins/visibility"; 18 | 19 | // // Components 20 | @import "mixins/alert"; 21 | @import "mixins/buttons"; 22 | @import "mixins/caret"; 23 | @import "mixins/pagination"; 24 | @import "mixins/lists"; 25 | @import "mixins/list-group"; 26 | @import "mixins/nav-divider"; 27 | @import "mixins/forms"; 28 | @import "mixins/table-row"; 29 | 30 | // // Skins 31 | @import "mixins/background-variant"; 32 | @import "mixins/border-radius"; 33 | @import "mixins/box-shadow"; 34 | @import "mixins/gradients"; 35 | @import "mixins/transition"; 36 | 37 | // // Layout 38 | @import "mixins/clearfix"; 39 | @import "mixins/grid-framework"; 40 | @import "mixins/grid"; 41 | @import "mixins/float"; 42 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_progress.scss: -------------------------------------------------------------------------------- 1 | @keyframes progress-bar-stripes { 2 | from { background-position: $progress-height 0; } 3 | to { background-position: 0 0; } 4 | } 5 | 6 | .progress { 7 | display: flex; 8 | height: $progress-height; 9 | overflow: hidden; // force rounded corners by cropping it 10 | font-size: $progress-font-size; 11 | background-color: $progress-bg; 12 | @include border-radius($progress-border-radius); 13 | @include box-shadow($progress-box-shadow); 14 | } 15 | 16 | .progress-bar { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | color: $progress-bar-color; 21 | text-align: center; 22 | white-space: nowrap; 23 | background-color: $progress-bar-bg; 24 | @include transition($progress-bar-transition); 25 | } 26 | 27 | .progress-bar-striped { 28 | @include gradient-striped(); 29 | background-size: $progress-height $progress-height; 30 | } 31 | 32 | .progress-bar-animated { 33 | animation: progress-bar-stripes $progress-bar-animation-timing; 34 | } 35 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_root.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | // Custom variable values only support SassScript inside `#{}`. 3 | @each $color, $value in $colors { 4 | --#{$color}: #{$value}; 5 | } 6 | 7 | @each $color, $value in $theme-colors { 8 | --#{$color}: #{$value}; 9 | } 10 | 11 | @each $bp, $value in $grid-breakpoints { 12 | --breakpoint-#{$bp}: #{$value}; 13 | } 14 | 15 | // Use `inspect` for lists so that quoted items keep the quotes. 16 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 17 | --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 18 | --font-family-monospace: #{inspect($font-family-monospace)}; 19 | } 20 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_transitions.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable selector-no-qualifying-type 2 | 3 | .fade { 4 | @include transition($transition-fade); 5 | 6 | &:not(.show) { 7 | opacity: 0; 8 | } 9 | } 10 | 11 | .collapse { 12 | &:not(.show) { 13 | display: none; 14 | } 15 | } 16 | 17 | .collapsing { 18 | position: relative; 19 | height: 0; 20 | overflow: hidden; 21 | @include transition($transition-collapse); 22 | } 23 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/position"; 10 | @import "utilities/screenreaders"; 11 | @import "utilities/shadows"; 12 | @import "utilities/sizing"; 13 | @import "utilities/spacing"; 14 | @import "utilities/text"; 15 | @import "utilities/visibility"; 16 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | } 16 | 17 | @mixin bg-gradient-variant($parent, $color) { 18 | #{$parent} { 19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | &[href] { 6 | @include hover-focus { 7 | color: color-yiq($bg); 8 | text-decoration: none; 9 | background-color: darken($bg, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | @mixin border-radius($radius: $border-radius) { 4 | @if $enable-rounded { 5 | border-radius: $radius; 6 | } 7 | } 8 | 9 | @mixin border-top-radius($radius) { 10 | @if $enable-rounded { 11 | border-top-left-radius: $radius; 12 | border-top-right-radius: $radius; 13 | } 14 | } 15 | 16 | @mixin border-right-radius($radius) { 17 | @if $enable-rounded { 18 | border-top-right-radius: $radius; 19 | border-bottom-right-radius: $radius; 20 | } 21 | } 22 | 23 | @mixin border-bottom-radius($radius) { 24 | @if $enable-rounded { 25 | border-bottom-right-radius: $radius; 26 | border-bottom-left-radius: $radius; 27 | } 28 | } 29 | 30 | @mixin border-left-radius($radius) { 31 | @if $enable-rounded { 32 | border-top-left-radius: $radius; 33 | border-bottom-left-radius: $radius; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | box-shadow: $shadow; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left { 4 | float: left !important; 5 | } 6 | @mixin float-right { 7 | float: right !important; 8 | } 9 | @mixin float-none { 10 | float: none !important; 11 | } 12 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_hover.scss: -------------------------------------------------------------------------------- 1 | // Hover mixin and `$enable-hover-media-query` are deprecated. 2 | // 3 | // Originally added during our alphas and maintained during betas, this mixin was 4 | // designed to prevent `:hover` stickiness on iOS-an issue where hover styles 5 | // would persist after initial touch. 6 | // 7 | // For backward compatibility, we've kept these mixins and updated them to 8 | // always return their regular pseudo-classes instead of a shimmed media query. 9 | // 10 | // Issue: https://github.com/twbs/bootstrap/issues/25195 11 | 12 | @mixin hover { 13 | &:hover { @content; } 14 | } 15 | 16 | @mixin hover-focus { 17 | &:hover, 18 | &:focus { 19 | @content; 20 | } 21 | } 22 | 23 | @mixin plain-hover-focus { 24 | &, 25 | &:hover, 26 | &:focus { 27 | @content; 28 | } 29 | } 30 | 31 | @mixin hover-focus-active { 32 | &:hover, 33 | &:focus, 34 | &:active { 35 | @content; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | 10 | @mixin img-fluid { 11 | // Part 1: Set a maximum relative to the parent 12 | max-width: 100%; 13 | // Part 2: Override the height to auto, otherwise images will be stretched 14 | // when setting a width and height attribute on the img element. 15 | height: auto; 16 | } 17 | 18 | 19 | // Retina image 20 | // 21 | // Short retina mixin for setting background-image and -size. 22 | 23 | // stylelint-disable indentation, media-query-list-comma-newline-after 24 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 25 | background-image: url($file-1x); 26 | 27 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, 28 | // but doesn't convert dppx=>dpi. 29 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. 30 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution 31 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx 32 | only screen and (min-resolution: 2dppx) { // Standardized 33 | background-image: url($file-2x); 34 | background-size: $width-1x $height-1x; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | &.list-group-item-action { 9 | @include hover-focus { 10 | color: $color; 11 | background-color: darken($background, 5%); 12 | } 13 | 14 | &.active { 15 | color: $white; 16 | background-color: $color; 17 | border-color: $color; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) { 6 | height: 0; 7 | margin: $margin-y 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | } 11 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | font-size: $font-size; 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // 3 | // See: https://a11yproject.com/posts/how-to-hide-content/ 4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 5 | 6 | @mixin sr-only { 7 | position: absolute; 8 | width: 1px; 9 | height: 1px; 10 | padding: 0; 11 | overflow: hidden; 12 | clip: rect(0, 0, 0, 0); 13 | white-space: nowrap; 14 | border: 0; 15 | } 16 | 17 | // Use in conjunction with .sr-only to only display content when it's focused. 18 | // 19 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 20 | // 21 | // Credit: HTML5 Boilerplate 22 | 23 | @mixin sr-only-focusable { 24 | &:active, 25 | &:focus { 26 | position: static; 27 | width: auto; 28 | height: auto; 29 | overflow: visible; 30 | clip: auto; 31 | white-space: normal; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | } 7 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table-#{$state} { 7 | &, 8 | > th, 9 | > td { 10 | background-color: $background; 11 | } 12 | } 13 | 14 | // Hover states for `.table-hover` 15 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 16 | .table-hover { 17 | $hover-background: darken($background, 5%); 18 | 19 | .table-#{$state} { 20 | @include hover { 21 | background-color: $hover-background; 22 | 23 | > td, 24 | > th { 25 | background-color: $hover-background; 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | a#{$parent} { 10 | @include hover-focus { 11 | color: darken($color, 10%) !important; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide($ignore-warning: false) { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | 10 | @if ($ignore-warning != true) { 11 | @warn "The `text-hide()` mixin has been deprecated as of v4.1.0. It will be removed entirely in v5."; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | @mixin transition($transition...) { 2 | @if $enable-transitions { 3 | @if length($transition) == 0 { 4 | transition: $transition-base; 5 | } @else { 6 | transition: $transition; 7 | } 8 | } 9 | 10 | @media screen and (prefers-reduced-motion: reduce) { 11 | transition: none; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | } 8 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_display.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // 4 | // Utilities for common `display` values 5 | // 6 | 7 | @each $breakpoint in map-keys($grid-breakpoints) { 8 | @include media-breakpoint-up($breakpoint) { 9 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 10 | 11 | .d#{$infix}-none { display: none !important; } 12 | .d#{$infix}-inline { display: inline !important; } 13 | .d#{$infix}-inline-block { display: inline-block !important; } 14 | .d#{$infix}-block { display: block !important; } 15 | .d#{$infix}-table { display: table !important; } 16 | .d#{$infix}-table-row { display: table-row !important; } 17 | .d#{$infix}-table-cell { display: table-cell !important; } 18 | .d#{$infix}-flex { display: flex !important; } 19 | .d#{$infix}-inline-flex { display: inline-flex !important; } 20 | } 21 | } 22 | 23 | 24 | // 25 | // Utilities for toggling `display` in print 26 | // 27 | 28 | @media print { 29 | .d-print-none { display: none !important; } 30 | .d-print-inline { display: inline !important; } 31 | .d-print-inline-block { display: inline-block !important; } 32 | .d-print-block { display: block !important; } 33 | .d-print-table { display: table !important; } 34 | .d-print-table-row { display: table-row !important; } 35 | .d-print-table-cell { display: table-cell !important; } 36 | .d-print-flex { display: flex !important; } 37 | .d-print-inline-flex { display: inline-flex !important; } 38 | } 39 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_embed.scss: -------------------------------------------------------------------------------- 1 | // Credit: Nicolas Gallagher and SUIT CSS. 2 | 3 | .embed-responsive { 4 | position: relative; 5 | display: block; 6 | width: 100%; 7 | padding: 0; 8 | overflow: hidden; 9 | 10 | &::before { 11 | display: block; 12 | content: ""; 13 | } 14 | 15 | .embed-responsive-item, 16 | iframe, 17 | embed, 18 | object, 19 | video { 20 | position: absolute; 21 | top: 0; 22 | bottom: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | border: 0; 27 | } 28 | } 29 | 30 | .embed-responsive-21by9 { 31 | &::before { 32 | padding-top: percentage(9 / 21); 33 | } 34 | } 35 | 36 | .embed-responsive-16by9 { 37 | &::before { 38 | padding-top: percentage(9 / 16); 39 | } 40 | } 41 | 42 | .embed-responsive-4by3 { 43 | &::before { 44 | padding-top: percentage(3 / 4); 45 | } 46 | } 47 | 48 | .embed-responsive-1by1 { 49 | &::before { 50 | padding-top: percentage(1 / 1); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | @each $breakpoint in map-keys($grid-breakpoints) { 2 | @include media-breakpoint-up($breakpoint) { 3 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 4 | 5 | .float#{$infix}-left { @include float-left; } 6 | .float#{$infix}-right { @include float-right; } 7 | .float#{$infix}-none { @include float-none; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | 5 | // Sass list not in variables since it's not intended for customization. 6 | // stylelint-disable-next-line scss/dollar-variable-default 7 | $positions: static, relative, absolute, fixed, sticky; 8 | 9 | @each $position in $positions { 10 | .position-#{$position} { position: $position !important; } 11 | } 12 | 13 | // Shorthand 14 | 15 | .fixed-top { 16 | position: fixed; 17 | top: 0; 18 | right: 0; 19 | left: 0; 20 | z-index: $zindex-fixed; 21 | } 22 | 23 | .fixed-bottom { 24 | position: fixed; 25 | right: 0; 26 | bottom: 0; 27 | left: 0; 28 | z-index: $zindex-fixed; 29 | } 30 | 31 | .sticky-top { 32 | @supports (position: sticky) { 33 | position: sticky; 34 | top: 0; 35 | z-index: $zindex-sticky; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .shadow-sm { box-shadow: $box-shadow-sm !important; } 4 | .shadow { box-shadow: $box-shadow !important; } 5 | .shadow-lg { box-shadow: $box-shadow-lg !important; } 6 | .shadow-none { box-shadow: none !important; } 7 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_spacing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Margin and Padding 4 | 5 | @each $breakpoint in map-keys($grid-breakpoints) { 6 | @include media-breakpoint-up($breakpoint) { 7 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 8 | 9 | @each $prop, $abbrev in (margin: m, padding: p) { 10 | @each $size, $length in $spacers { 11 | 12 | .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } 13 | .#{$abbrev}t#{$infix}-#{$size}, 14 | .#{$abbrev}y#{$infix}-#{$size} { 15 | #{$prop}-top: $length !important; 16 | } 17 | .#{$abbrev}r#{$infix}-#{$size}, 18 | .#{$abbrev}x#{$infix}-#{$size} { 19 | #{$prop}-right: $length !important; 20 | } 21 | .#{$abbrev}b#{$infix}-#{$size}, 22 | .#{$abbrev}y#{$infix}-#{$size} { 23 | #{$prop}-bottom: $length !important; 24 | } 25 | .#{$abbrev}l#{$infix}-#{$size}, 26 | .#{$abbrev}x#{$infix}-#{$size} { 27 | #{$prop}-left: $length !important; 28 | } 29 | } 30 | } 31 | 32 | // Some special margin utils 33 | .m#{$infix}-auto { margin: auto !important; } 34 | .mt#{$infix}-auto, 35 | .my#{$infix}-auto { 36 | margin-top: auto !important; 37 | } 38 | .mr#{$infix}-auto, 39 | .mx#{$infix}-auto { 40 | margin-right: auto !important; 41 | } 42 | .mb#{$infix}-auto, 43 | .my#{$infix}-auto { 44 | margin-bottom: auto !important; 45 | } 46 | .ml#{$infix}-auto, 47 | .mx#{$infix}-auto { 48 | margin-left: auto !important; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/bootstrap/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Visibility utilities 3 | // 4 | 5 | .visible { 6 | @include invisible(visible); 7 | } 8 | 9 | .invisible { 10 | @include invisible(hidden); 11 | } 12 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/_functions.scss: -------------------------------------------------------------------------------- 1 | // Retrieve color Sass maps 2 | 3 | @function section-color($key: "primary") { 4 | @return map-get($section-colors, $key); 5 | } 6 | 7 | // Lines colors 8 | 9 | @function shapes-primary-color($key: "step-1-gradient-bg") { 10 | @return map-get($shapes-primary-colors, $key); 11 | } 12 | 13 | @function shapes-default-color($key: "step-1-gradient-bg") { 14 | @return map-get($shapes-default-colors, $key); 15 | } 16 | 17 | @function lines-light-color($key: "step-1-gradient-bg") { 18 | @return map-get($shapes-light-colors, $key); 19 | } 20 | 21 | @function shapes-dark-color($key: "step-1-gradient-bg") { 22 | @return map-get($shapes-dark-colors, $key); 23 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/_images.scss: -------------------------------------------------------------------------------- 1 | img{ 2 | max-width: 100%; 3 | // border-radius: $border-radius-sm; 4 | } 5 | .img-raised{ 6 | box-shadow: $box-shadow-raised; 7 | } 8 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/alert.scss"; 2 | @import "mixins/badges.scss"; 3 | @import "mixins/background-variant.scss"; 4 | @import "mixins/buttons.scss"; 5 | @import "mixins/forms.scss"; 6 | @import "mixins/icon.scss"; 7 | @import "mixins/modals.scss"; 8 | @import "mixins/popovers.scss"; 9 | @import "mixins/page-header.scss"; 10 | @import "mixins/vendor-prefixes.scss"; 11 | @import "mixins/opacity.scss"; 12 | @import "mixins/modals.scss"; 13 | @import "mixins/inputs.scss"; 14 | @import "mixins/dropdown.scss"; 15 | @import "mixins/wizard.scss"; 16 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/backgrounds.scss"; 2 | @import "utilities/floating.scss"; 3 | @import "utilities/helper.scss"; 4 | @import "utilities/position.scss"; 5 | @import "utilities/sizing.scss"; 6 | @import "utilities/spacing.scss"; 7 | @import "utilities/shadows.scss"; 8 | @import "utilities/text.scss"; 9 | @import "utilities/transform.scss"; 10 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/cards/_card-chart.scss: -------------------------------------------------------------------------------- 1 | .card-chart { 2 | overflow: hidden; 3 | .card-header{ 4 | .card-title{ 5 | i{ 6 | font-size: 16px; 7 | margin-right: 5px; 8 | margin-bottom: 3px; 9 | } 10 | } 11 | .card-category{ 12 | margin-bottom: 5px; 13 | } 14 | } 15 | .card-body{ 16 | padding-left: 5px; 17 | padding-right: 5px; 18 | .tab-space{ 19 | padding: 0; 20 | } 21 | } 22 | .table{ 23 | margin-bottom: 0; 24 | 25 | td{ 26 | border-top: none; 27 | border-bottom: 1px solid rgba($white,0.1); 28 | } 29 | } 30 | 31 | .card-progress { 32 | margin-top: 30px; 33 | padding: 0 10px; 34 | } 35 | 36 | .chart-area { 37 | height: 220px; 38 | width: 100%; 39 | } 40 | .card-footer { 41 | margin-top: 15px; 42 | 43 | .stats{ 44 | color: $dark-gray; 45 | } 46 | } 47 | 48 | .dropdown{ 49 | position: absolute; 50 | right: 20px; 51 | top: 20px; 52 | 53 | .btn{ 54 | margin: 0; 55 | } 56 | } 57 | 58 | &.card-chart-pie{ 59 | .chart-area{ 60 | padding: 10px 0 25px; 61 | height: auto; 62 | } 63 | 64 | .card-title{ 65 | margin-bottom: 10px; 66 | i{ 67 | font-size: 1rem; 68 | } 69 | } 70 | 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/cards/_card-map.scss: -------------------------------------------------------------------------------- 1 | .map { 2 | width:100%; 3 | min-width:290px; 4 | height: 1200px; 5 | min-height: calc(100% - 20px); 6 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/cards/_card-plain.scss: -------------------------------------------------------------------------------- 1 | .card-plain { 2 | background: transparent; 3 | box-shadow: none; 4 | 5 | .card-header, 6 | .card-footer { 7 | margin-left: 0; 8 | margin-right: 0; 9 | background-color: transparent; 10 | } 11 | 12 | &:not(.card-subcategories).card-body { 13 | padding-left: 0; 14 | padding-right: 0; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/cards/_card-task.scss: -------------------------------------------------------------------------------- 1 | .card-tasks { 2 | height: 473px; 3 | 4 | .table-full-width { 5 | max-height: 410px; 6 | position: relative; 7 | } 8 | 9 | .card-header { 10 | .title { 11 | margin-right: 20px; 12 | font-weight: $font-weight-normal; 13 | } 14 | 15 | .dropdown { 16 | float: right; 17 | color: darken($white, 20%); 18 | } 19 | } 20 | 21 | .card-body { 22 | i { 23 | color: $dark-gray; 24 | font-size: 1.4em; 25 | &:hover { 26 | color: $white; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: color-yiq($background); 3 | // @include gradient-bg($background); 4 | background-color: lighten($background, 5%); 5 | border-color: $border; 6 | 7 | hr { 8 | border-top-color: darken($border, 5%); 9 | } 10 | 11 | .alert-link { 12 | color: darken($color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | @mixin bg-variant($parent, $color) { 3 | #{$parent} { 4 | background-color: $color !important; 5 | } 6 | a#{$parent}, 7 | button#{$parent} { 8 | @include hover-focus { 9 | background-color: darken($color, 10%) !important; 10 | } 11 | } 12 | } 13 | 14 | @mixin bg-gradient-variant($parent, $color) { 15 | #{$parent} { 16 | background: linear-gradient(87deg, $color 0, adjust-hue($color, 25%) 100%) !important; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_badges.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | &[href] { 6 | @include hover-focus { 7 | color: color-yiq($bg); 8 | text-decoration: none; 9 | background-color: darken($bg, 3%); 10 | } 11 | } 12 | .tagsinput-remove-link{ 13 | color: $white; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_dropdown.scss: -------------------------------------------------------------------------------- 1 | @mixin dropdown-colors($brand-color, $dropdown-header-color, $dropdown-color, $background-color ) { 2 | background-color: $brand-color; 3 | 4 | &:before{ 5 | color: $brand-color; 6 | } 7 | 8 | .dropdown-header:not([href]):not([tabindex]){ 9 | color: $dropdown-header-color; 10 | } 11 | 12 | .dropdown-item{ 13 | color: $dropdown-color; 14 | 15 | &:hover, 16 | &:focus{ 17 | background-color: $background-color; 18 | } 19 | } 20 | 21 | .dropdown-divider{ 22 | background-color: $background-color; 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_icon.scss: -------------------------------------------------------------------------------- 1 | @mixin icon-shape-variant($color) { 2 | color: saturate(darken($color, 10%), 10); 3 | background-color: transparentize(lighten($color, 10%), .5); 4 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_modals.scss: -------------------------------------------------------------------------------- 1 | @mixin modal-colors($bg-color, $color) { 2 | .modal-content{ 3 | background-color: $bg-color; 4 | color: $color; 5 | } 6 | 7 | .modal-body p{ 8 | color: rgba($white, 0.8); 9 | } 10 | 11 | //inputs 12 | @include input-coloured-bg($opacity-5, $white, $white, $transparent-bg, $opacity-1, $opacity-2); 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_page-header.scss: -------------------------------------------------------------------------------- 1 | @mixin linear-gradient($color1, $color2){ 2 | background: $color1; /* For browsers that do not support gradients */ 3 | background: -webkit-linear-gradient(90deg, $color1 , $color2); /* For Safari 5.1 to 6.0 */ 4 | background: -o-linear-gradient(90deg, $color1, $color2); /* For Opera 11.1 to 12.0 */ 5 | background: -moz-linear-gradient(90deg, $color1, $color2); /* For Firefox 3.6 to 15 */ 6 | background: linear-gradient(0deg, $color1 , $color2); /* Standard syntax */ 7 | } 8 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_popovers.scss: -------------------------------------------------------------------------------- 1 | @mixin popover-variant($background) { 2 | background-color: $background; 3 | 4 | .popover-header { 5 | background-color: $background; 6 | color: color-yiq($background); 7 | opacity: .6; 8 | } 9 | 10 | .popover-body { 11 | color: color-yiq($background); 12 | } 13 | 14 | .popover-header{ 15 | border-color: rgba(color-yiq($background), .2); 16 | } 17 | 18 | &.bs-popover-top { 19 | .arrow::after { 20 | border-top-color: $background; 21 | } 22 | } 23 | 24 | &.bs-popover-right { 25 | .arrow::after { 26 | border-right-color: $background; 27 | } 28 | } 29 | 30 | &.bs-popover-bottom { 31 | .arrow::after { 32 | border-bottom-color: $background; 33 | } 34 | } 35 | 36 | &.bs-popover-left { 37 | .arrow::after { 38 | border-left-color: $background; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/_wizard.scss: -------------------------------------------------------------------------------- 1 | @mixin set-wizard-color($color) { 2 | .progress-with-circle .progress-bar{ 3 | background: $color; 4 | } 5 | 6 | .nav-pills .nav-item .nav-link{ 7 | color: $color; 8 | 9 | &.checked, &.active{ 10 | background: $color; 11 | color: white; 12 | } 13 | &:hover{ 14 | background: $white; 15 | } 16 | } 17 | 18 | .nav-pills .nav-item .nav-link.active, 19 | .nav-pills .nav-item .nav-link.checked:focus, 20 | .nav-pills .nav-item .nav-link.checked:hover, 21 | .nav-pills .nav-item .nav-link.active:focus, 22 | .nav-pills .nav-item .nav-link.active:hover{ 23 | background: $color; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/mixins/opacity.scss: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | @mixin opacity($opacity) { 4 | opacity: $opacity; 5 | // IE8 filter 6 | $opacity-ie: ($opacity * 100); 7 | filter: #{alpha(opacity=$opacity-ie)}; 8 | } 9 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_backgrounds.scss: -------------------------------------------------------------------------------- 1 | @each $color, $value in $colors { 2 | @include bg-variant(".bg-#{$color}", $value); 3 | } 4 | 5 | @each $color, $value in $theme-colors { 6 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 7 | } 8 | 9 | @each $color, $value in $colors { 10 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 11 | } 12 | 13 | 14 | // Sections 15 | 16 | section { 17 | //background-color: section-color("primary"); 18 | } 19 | 20 | @each $color, $value in $section-colors { 21 | @include bg-variant(".section-#{$color}", $value); 22 | } 23 | 24 | @each $color, $value in $theme-colors { 25 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 26 | } 27 | 28 | 29 | // Shape (svg) fill colors 30 | @each $color, $value in $theme-colors { 31 | .fill-#{$color} { 32 | fill: $value; 33 | } 34 | 35 | .stroke-#{$color} { 36 | stroke: $value; 37 | } 38 | } 39 | 40 | .fill-opacity-8 { 41 | fill-opacity: .8; 42 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_floating.scss: -------------------------------------------------------------------------------- 1 | .floating { 2 | animation: floating 3s ease infinite; 3 | will-change: transform; 4 | 5 | &:hover { 6 | animation-play-state: paused; 7 | } 8 | } 9 | 10 | .floating-lg { 11 | animation: floating-lg 3s ease infinite; 12 | } 13 | 14 | .floating-sm { 15 | animation: floating-sm 3s ease infinite; 16 | } 17 | 18 | // Keyframes 19 | 20 | @keyframes floating-lg { 21 | 0% { 22 | transform: translateY(0px) 23 | } 24 | 50% { 25 | transform: translateY(15px) 26 | } 27 | 100% { 28 | transform: translateY(0px) 29 | } 30 | } 31 | 32 | @keyframes floating { 33 | 0% { 34 | transform: translateY(0px) 35 | } 36 | 50% { 37 | transform: translateY(10px) 38 | } 39 | 100% { 40 | transform: translateY(0px) 41 | } 42 | } 43 | 44 | @keyframes floating-sm { 45 | 0% { 46 | transform: translateY(0px) 47 | } 48 | 50% { 49 | transform: translateY(5px) 50 | } 51 | 100% { 52 | transform: translateY(0px) 53 | } 54 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_helper.scss: -------------------------------------------------------------------------------- 1 | // Image 2 | 3 | .img-center { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | 9 | // Clearfix 10 | 11 | .floatfix { 12 | &:before, 13 | &:after { 14 | content: ''; 15 | display: table; 16 | } 17 | &:after { 18 | clear: both; 19 | } 20 | } 21 | 22 | // Overflows 23 | 24 | .overflow-visible { 25 | overflow: visible !important; 26 | } 27 | .overflow-hidden { 28 | overflow: hidden !important; 29 | } 30 | 31 | // Opacity classes 32 | 33 | .opacity-1 { 34 | opacity: .1 !important; 35 | } 36 | .opacity-2 { 37 | opacity: .2 !important; 38 | } 39 | .opacity-3 { 40 | opacity: .3 !important; 41 | } 42 | .opacity-4 { 43 | opacity: .4 !important; 44 | } 45 | .opacity-5 { 46 | opacity: .5 !important; 47 | } 48 | .opacity-6 { 49 | opacity: .6 !important; 50 | } 51 | .opacity-7 { 52 | opacity: .7 !important; 53 | } 54 | .opacity-8 { 55 | opacity: .8 !important; 56 | } 57 | .opacity-8 { 58 | opacity: .9 !important; 59 | } 60 | .opacity-10 { 61 | opacity: 1 !important; 62 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | @each $size, $value in $spacers { 2 | .top-#{$size} { 3 | top: $value; 4 | } 5 | .right-#{$size} { 6 | right: $value; 7 | } 8 | .bottom-#{$size} { 9 | bottom: $value; 10 | } 11 | .left-#{$size} { 12 | left: $value; 13 | } 14 | } 15 | 16 | .center { 17 | left: 50%; 18 | transform: translateX(-50%); 19 | } -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_shadows.scss: -------------------------------------------------------------------------------- 1 | [class*="shadow"] { 2 | @if $enable-transitions { 3 | transition: $transition-base; 4 | } 5 | } 6 | 7 | .shadow-sm--hover:hover { box-shadow: $box-shadow-sm !important; } 8 | .shadow--hover:hover { box-shadow: $box-shadow !important; } 9 | .shadow-lg--hover:hover { box-shadow: $box-shadow-lg !important; } 10 | .shadow-none--hover:hover { box-shadow: none !important; } 11 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // Height values in vh 2 | 3 | .h-100vh { 4 | height: 100vh !important; 5 | } 6 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_text.scss: -------------------------------------------------------------------------------- 1 | // Weight and italics 2 | 3 | .font-weight-300 { font-weight: 300 !important; } 4 | .font-weight-400 { font-weight: 400 !important; } 5 | .font-weight-500 { font-weight: 500 !important; } 6 | .font-weight-600 { font-weight: 600 !important; } 7 | .font-weight-700 { font-weight: 700 !important; } 8 | .font-weight-800 { font-weight: 800 !important; } 9 | .font-weight-900 { font-weight: 900 !important; } 10 | 11 | 12 | // Text decorations 13 | 14 | .text-underline { text-decoration: underline; } 15 | .text-through { text-decoration: line-through; } 16 | 17 | 18 | // Line heights 19 | 20 | .lh-100 { line-height: 1; } 21 | .lh-110 { line-height: 1.1; } 22 | .lh-120 { line-height: 1.2; } 23 | .lh-130 { line-height: 1.3; } 24 | .lh-140 { line-height: 1.4; } 25 | .lh-150 { line-height: 1.5; } 26 | .lh-160 { line-height: 1.6; } 27 | .lh-170 { line-height: 1.7; } 28 | .lh-180 { line-height: 1.8; } 29 | 30 | //Contextual colors 31 | 32 | .text-muted { color: $text-muted !important; } 33 | 34 | 35 | 36 | // Letter spacings 37 | 38 | .ls-1 { letter-spacing: .0625rem; } 39 | .ls-15 { letter-spacing: .09375rem; } 40 | .ls-2 { letter-spacing: 0.125rem; } 41 | -------------------------------------------------------------------------------- /RedDog.UI/src/assets/sass/black-dashboard/custom/utilities/_transform.scss: -------------------------------------------------------------------------------- 1 | @include media-breakpoint-up(lg) { 2 | .transform-perspective-right { 3 | transform: scale(1) perspective(1040px) rotateY(-11deg) rotateX(2deg) rotate(2deg); 4 | } 5 | .transform-perspective-left{ 6 | transform: scale(1) perspective(2000px) rotateY(11deg) rotateX(2deg) rotate(-2deg) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/BaseAlert.vue: -------------------------------------------------------------------------------- 1 | 18 | 55 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/BaseRadio.vue: -------------------------------------------------------------------------------- 1 | 15 | 64 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/Cards/StatsCard.vue: -------------------------------------------------------------------------------- 1 | 20 | 30 | 32 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/Charts/DoughnutChart.js: -------------------------------------------------------------------------------- 1 | // import { Doughnut, mixins } from 'vue-chartjs'; 2 | // // import { Doughnut } from '../BaseCharts' 3 | 4 | // export default { 5 | // name: 'doughnut-chart', 6 | // extends: Doughnut, 7 | // mixins: [mixins.reactiveProp], 8 | // mounted () { 9 | 10 | // this.renderChart( 11 | // this.chartData, 12 | // this.extraOptions 13 | // ); 14 | // // this.renderChart({ 15 | // // labels: ['Good', 'CouldBe'], 16 | // // datasets: [ 17 | // // { 18 | // // borderWidth:0, 19 | // // // innerRadius:32, 20 | // // // outerRadius:10, 21 | // // radius:3, 22 | // // // borderRadius:10, 23 | // // backgroundColor: [ 24 | // // 'transparent', 25 | // // '#FFF' 26 | // // ], 27 | // // data: [20, 80] 28 | // // } 29 | // // ] 30 | // // }, {responsive: true, maintainAspectRatio: true, cutoutPercentage:80, borderRadius:20}) 31 | // } 32 | // } 33 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/Charts/utils.js: -------------------------------------------------------------------------------- 1 | export function hexToRGB(hex, alpha) { 2 | const r = parseInt(hex.slice(1, 3), 16), 3 | g = parseInt(hex.slice(3, 5), 16), 4 | b = parseInt(hex.slice(5, 7), 16); 5 | 6 | if (alpha) { 7 | return `rgba(${r},${g},${b}, ${alpha})`; 8 | } else { 9 | return `rgb(${r},${g},${b})`; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/CloseButton.vue: -------------------------------------------------------------------------------- 1 | 13 | 33 | 35 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/NavbarToggleButton.vue: -------------------------------------------------------------------------------- 1 | 11 | 26 | 28 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/RedDog/StreamChart.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/SidebarPlugin/SidebarLink.vue: -------------------------------------------------------------------------------- 1 | 15 | 63 | 65 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/SidebarPlugin/index.js: -------------------------------------------------------------------------------- 1 | import Sidebar from "./SideBar.vue"; 2 | import SidebarLink from "./SidebarLink"; 3 | 4 | const SidebarStore = { 5 | showSidebar: false, 6 | sidebarLinks: [], 7 | displaySidebar(value) { 8 | this.showSidebar = value; 9 | } 10 | }; 11 | 12 | const SidebarPlugin = { 13 | install(Vue) { 14 | let app = new Vue({ 15 | data: { 16 | sidebarStore: SidebarStore 17 | } 18 | }); 19 | 20 | Vue.prototype.$sidebar = app.sidebarStore; 21 | Vue.component("side-bar", Sidebar); 22 | Vue.component("sidebar-link", SidebarLink); 23 | } 24 | }; 25 | 26 | export default SidebarPlugin; 27 | -------------------------------------------------------------------------------- /RedDog.UI/src/components/index.js: -------------------------------------------------------------------------------- 1 | import BaseInput from "./Inputs/BaseInput.vue"; 2 | 3 | import BaseCheckbox from "./BaseCheckbox.vue"; 4 | import BaseRadio from "./BaseRadio.vue"; 5 | import BaseDropdown from "./BaseDropdown.vue"; 6 | import BaseTable from "./BaseTable.vue"; 7 | import BaseButton from "./BaseButton"; 8 | import BaseAlert from "./BaseAlert"; 9 | import BaseNav from "./BaseNav"; 10 | import Modal from "./Modal"; 11 | import CloseButton from "./CloseButton"; 12 | 13 | import Card from "./Cards/Card.vue"; 14 | import StatsCard from "./Cards/StatsCard.vue"; 15 | 16 | import SidebarPlugin from "./SidebarPlugin/index"; 17 | 18 | export { 19 | BaseInput, 20 | Card, 21 | Modal, 22 | CloseButton, 23 | StatsCard, 24 | BaseTable, 25 | BaseCheckbox, 26 | BaseRadio, 27 | BaseDropdown, 28 | BaseButton, 29 | BaseAlert, 30 | SidebarPlugin, 31 | BaseNav 32 | }; 33 | -------------------------------------------------------------------------------- /RedDog.UI/src/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | colors: { 3 | default: "#344675", 4 | primary: "#42b883", 5 | info: "#1d8cf8", 6 | danger: "#fd5d93", 7 | teal: "#00d6b4", 8 | purple: "#6f42c1", 9 | warning: "#ff8d72", 10 | primaryGradient: ['rgba(76, 211, 150, 0.1)', 'rgba(53, 183, 125, 0)', 'rgba(119,52,169,0)'], 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RedDog.UI/src/directives/click-ouside.js: -------------------------------------------------------------------------------- 1 | export default { 2 | bind: function (el, binding, vnode) { 3 | el.clickOutsideEvent = function (event) { 4 | // here I check that click was outside the el and his childrens 5 | if (!(el == event.target || el.contains(event.target))) { 6 | // and if it did, call method provided in attribute value 7 | vnode.context[binding.expression](event); 8 | } 9 | }; 10 | document.body.addEventListener('click', el.clickOutsideEvent) 11 | }, 12 | unbind: function (el) { 13 | document.body.removeEventListener('click', el.clickOutsideEvent) 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /RedDog.UI/src/i18n.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueI18n from 'vue-i18n' 3 | 4 | Vue.use(VueI18n) 5 | 6 | function loadLocaleMessages () { 7 | const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i) 8 | const messages = {} 9 | locales.keys().forEach(key => { 10 | const matched = key.match(/([a-z0-9]+)\./i) 11 | if (matched && matched.length > 1) { 12 | const locale = matched[1] 13 | messages[locale] = locales(key) 14 | } 15 | }) 16 | return messages 17 | } 18 | 19 | export default new VueI18n({ 20 | locale: process.env.VUE_APP_I18N_LOCALE || 'en', 21 | fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', 22 | messages: loadLocaleMessages() 23 | }) 24 | -------------------------------------------------------------------------------- /RedDog.UI/src/layout/dashboard/Content.vue: -------------------------------------------------------------------------------- 1 | 9 | 17 | -------------------------------------------------------------------------------- /RedDog.UI/src/layout/dashboard/ContentFooter.vue: -------------------------------------------------------------------------------- 1 | 22 | 31 | 33 | -------------------------------------------------------------------------------- /RedDog.UI/src/layout/dashboard/DashboardLayout.vue: -------------------------------------------------------------------------------- 1 | 17 | 19 | 54 | 56 | -------------------------------------------------------------------------------- /RedDog.UI/src/layout/dashboard/MobileMenu.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | 11 | -------------------------------------------------------------------------------- /RedDog.UI/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import VueRouter from "vue-router"; 3 | import RouterPrefetch from 'vue-router-prefetch' 4 | import App from "./App"; 5 | import router from "./router/index"; 6 | 7 | import BlackDashboard from "./plugins/blackDashboard"; 8 | import i18n from "./i18n" 9 | import './registerServiceWorker' 10 | Vue.use(BlackDashboard); 11 | Vue.use(VueRouter); 12 | Vue.use(RouterPrefetch); 13 | 14 | /* eslint-disable no-new */ 15 | new Vue({ 16 | router, 17 | i18n, 18 | render: h => h(App) 19 | }).$mount("#app"); 20 | -------------------------------------------------------------------------------- /RedDog.UI/src/models/realOrders.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "storeId": "Redmond", 4 | "orderDate": "2021-05-11T00:00:00", 5 | "orderHour": 15, 6 | "orderCount": 96, 7 | "avgFulfillmentSec": 4973, 8 | "orderItemCount": 248, 9 | "totalCost": 1793.31, 10 | "totalPrice": 2874.81 11 | }, 12 | { 13 | "storeId": "Redmond", 14 | "orderDate": "2021-05-11T00:00:00", 15 | "orderHour": 19, 16 | "orderCount": 288, 17 | "avgFulfillmentSec": 641, 18 | "orderItemCount": 571, 19 | "totalCost": 4308.81, 20 | "totalPrice": 6915.81 21 | }, 22 | { 23 | "storeId": "Redmond", 24 | "orderDate": "2021-05-11T00:00:00", 25 | "orderHour": 20, 26 | "orderCount": 303, 27 | "avgFulfillmentSec": 986, 28 | "orderItemCount": 626, 29 | "totalCost": 4483.37, 30 | "totalPrice": 7171.87 31 | }, 32 | { 33 | "storeId": "Redmond", 34 | "orderDate": "2021-05-11T00:00:00", 35 | "orderHour": 21, 36 | "orderCount": 225, 37 | "avgFulfillmentSec": 1318, 38 | "orderItemCount": 426, 39 | "totalCost": 3148.78, 40 | "totalPrice": 5038.28 41 | }, 42 | { 43 | "storeId": "Redmond", 44 | "orderDate": "2021-05-12T00:00:00", 45 | "orderHour": 15, 46 | "orderCount": 22, 47 | "avgFulfillmentSec": 47, 48 | "orderItemCount": 248, 49 | "totalCost": 1793.31, 50 | "totalPrice": 2874.81 51 | } 52 | ] 53 | -------------------------------------------------------------------------------- /RedDog.UI/src/pages/Kiosk/OrderItem.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /RedDog.UI/src/pages/Profile.vue: -------------------------------------------------------------------------------- 1 | 12 | 42 | 44 | -------------------------------------------------------------------------------- /RedDog.UI/src/pages/Profile/UserCard.vue: -------------------------------------------------------------------------------- 1 | 35 | 47 | 49 | -------------------------------------------------------------------------------- /RedDog.UI/src/plugins/RTLPlugin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | install(Vue) { 3 | let app = new Vue({ 4 | data() { 5 | return { 6 | isRTL: false 7 | } 8 | }, 9 | methods: { 10 | getDocClasses() { 11 | return document.body.classList 12 | }, 13 | enableRTL() { 14 | this.isRTL = true; 15 | this.getDocClasses().add('rtl'); 16 | this.getDocClasses().add('menu-on-right'); 17 | this.toggleBootstrapRTL(true); 18 | }, 19 | disableRTL() { 20 | this.isRTL = false; 21 | this.getDocClasses().remove('rtl'); 22 | this.getDocClasses().remove('menu-on-right'); 23 | this.toggleBootstrapRTL(false); 24 | }, 25 | toggleBootstrapRTL(value) { 26 | for (let i=0; i < document.styleSheets.length; i++){ 27 | let styleSheet = document.styleSheets[i]; 28 | let { href } = styleSheet; 29 | if(href && href.endsWith('bootstrap-rtl.css')){ 30 | styleSheet.disabled = !value; 31 | } 32 | } 33 | } 34 | } 35 | }); 36 | 37 | Vue.prototype.$rtl = app; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /RedDog.UI/src/plugins/blackDashboard.js: -------------------------------------------------------------------------------- 1 | import SideBar from "@/components/SidebarPlugin"; 2 | import Notify from "@/components/NotificationPlugin"; 3 | import GlobalComponents from "./globalComponents"; 4 | import GlobalDirectives from "./globalDirectives"; 5 | import RTLPlugin from "./RTLPlugin"; 6 | 7 | import "@/assets/sass/black-dashboard.scss"; 8 | import "@/assets/css/nucleo-icons.css"; 9 | 10 | export default { 11 | install(Vue) { 12 | Vue.use(GlobalComponents); 13 | Vue.use(GlobalDirectives); 14 | Vue.use(SideBar); 15 | Vue.use(Notify); 16 | Vue.use(RTLPlugin); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RedDog.UI/src/plugins/globalComponents.js: -------------------------------------------------------------------------------- 1 | import { BaseInput, Card, BaseDropdown, BaseButton, BaseCheckbox } from "../components/index"; 2 | 3 | const GlobalComponents = { 4 | install(Vue) { 5 | Vue.component(BaseInput.name, BaseInput); 6 | Vue.component(Card.name, Card); 7 | Vue.component(BaseDropdown.name, BaseDropdown); 8 | Vue.component(BaseButton.name, BaseButton); 9 | Vue.component(BaseCheckbox.name, BaseCheckbox); 10 | } 11 | }; 12 | 13 | export default GlobalComponents; 14 | -------------------------------------------------------------------------------- /RedDog.UI/src/plugins/globalDirectives.js: -------------------------------------------------------------------------------- 1 | import clickOutside from '../directives/click-ouside.js'; 2 | 3 | 4 | /** 5 | * You can register global directives here and use them as a plugin in your main Vue instance 6 | */ 7 | 8 | const GlobalDirectives = { 9 | install (Vue) { 10 | Vue.directive('click-outside', clickOutside); 11 | } 12 | } 13 | 14 | export default GlobalDirectives 15 | -------------------------------------------------------------------------------- /RedDog.UI/src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | registrationOptions: { 8 | scope: process.env.BASE_URL, 9 | }, 10 | ready () { 11 | console.log( 12 | 'App is being served from cache by a service worker.\n' + 13 | 'For more details, visit https://goo.gl/AFskqB' 14 | ) 15 | }, 16 | registered () { 17 | console.log('Service worker has been registered.') 18 | }, 19 | cached () { 20 | console.log('Content has been cached for offline use.') 21 | }, 22 | updatefound () { 23 | console.log('New content is downloading.') 24 | }, 25 | updated () { 26 | console.log('New content is available; please refresh.') 27 | }, 28 | offline () { 29 | console.log('No internet connection found. App is running in offline mode.') 30 | }, 31 | error (error) { 32 | console.error('Error during service worker registration:', error) 33 | } 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /RedDog.UI/src/router/index.js: -------------------------------------------------------------------------------- 1 | import VueRouter from "vue-router"; 2 | import routes from "./routes"; 3 | 4 | // configure router 5 | const router = new VueRouter({ 6 | routes, // short for routes: routes 7 | linkExactActiveClass: "active", 8 | scrollBehavior: (to) => { 9 | if (to.hash) { 10 | return {selector: to.hash} 11 | } else { 12 | return { x: 0, y: 0 } 13 | } 14 | } 15 | }); 16 | 17 | export default router; 18 | -------------------------------------------------------------------------------- /RedDog.UI/src/router/routes.js: -------------------------------------------------------------------------------- 1 | import DashboardLayout from "@/layout/dashboard/DashboardLayout.vue"; 2 | 3 | import NotFound from "@/pages/NotFoundPage.vue"; 4 | 5 | const Dashboard = () => import("@/pages/Dashboard.vue"); 6 | const Maps = () => import("@/pages/Maps.vue"); 7 | const Profile = () => import("@/pages/Profile.vue"); 8 | 9 | const routes = [ 10 | { 11 | path: "/", 12 | component: DashboardLayout, 13 | redirect: "/dashboard", 14 | children: [ 15 | { path: "dashboard", name: "dashboard", component: Dashboard }, 16 | { path: "maps", name: "maps", component: Maps }, 17 | { path: "profile", name: "profile", component: Profile } 18 | ], 19 | }, 20 | { path: "*", component: NotFound }, 21 | ]; 22 | 23 | /** 24 | * Asynchronously load view (Webpack Lazy loading compatible) 25 | * The specified component must be inside the Views folder 26 | * @param {string} name the filename (basename) of the view to load. 27 | function view(name) { 28 | var res= require('../components/Dashboard/Views/' + name + '.vue'); 29 | return res; 30 | };**/ 31 | 32 | export default routes; 33 | -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | 4 | # Creates a non-root user with an explicit UID and adds permission to access the /app folder 5 | # For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers 6 | RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app 7 | USER appuser 8 | 9 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 10 | WORKDIR /src 11 | COPY . . 12 | WORKDIR "/src/RedDog.VirtualCustomers" 13 | RUN dotnet build "RedDog.VirtualCustomers.csproj" -c Release -o /app/build 14 | 15 | FROM build AS publish 16 | RUN dotnet publish "RedDog.VirtualCustomers.csproj" -c Release -o /app/publish 17 | 18 | FROM base AS final 19 | WORKDIR /app 20 | COPY --from=publish /app/publish . 21 | ENTRYPOINT ["dotnet", "RedDog.VirtualCustomers.dll"] 22 | -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/Models/CustomerOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.VirtualCustomers.Models 6 | { 7 | public class CustomerOrder 8 | { 9 | [JsonPropertyName("storeId")] 10 | public string StoreId { get; set; } 11 | 12 | [JsonPropertyName("firstName")] 13 | public string FirstName { get; set; } 14 | 15 | [JsonPropertyName("lastName")] 16 | public string LastName { get; set; } 17 | 18 | [JsonPropertyName("loyaltyId")] 19 | public string LoyaltyId { get; set; } 20 | 21 | [JsonPropertyName("orderItems")] 22 | public List OrderItems { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/Models/CustomerOrderItem.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.VirtualCustomers.Models 4 | { 5 | public class CustomerOrderItem 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("quantity")] 11 | public int Quantity { get; set; } 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.VirtualCustomers.Models 4 | { 5 | public class Product 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("description")] 14 | public string Description { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | 22 | [JsonPropertyName("imageUrl")] 23 | public string ImageUrl { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/RedDog.VirtualCustomers.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /RedDog.VirtualCustomers/appsettings.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Controllers/ProbesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace RedDog.VirtualWorker.Controllers 8 | { 9 | [ApiController] 10 | [Route("[controller]")] 11 | public class ProbesController : ControllerBase 12 | { 13 | private string DaprHttpPort = Environment.GetEnvironmentVariable("DAPR_HTTP_PORT") ?? "3500"; 14 | private ILogger _logger; 15 | private HttpClient _httpClient; 16 | 17 | public ProbesController(ILogger logger, IHttpClientFactory httpClientFactory) 18 | { 19 | _logger = logger; 20 | _httpClient = httpClientFactory.CreateClient(); 21 | } 22 | 23 | [HttpGet("ready")] 24 | public async Task IsReady() 25 | { 26 | return await Task.FromResult(Ok()); 27 | } 28 | 29 | [HttpGet("healthz")] 30 | public async Task IsHealthy() 31 | { 32 | // Ensure dapr sidecar is running and healthy. If not, fail the health check and have the pod restarted. 33 | // This should prevent the case where the application container is running before dapr is installed in 34 | // the case of a gitops deploy. 35 | var response = await _httpClient.GetAsync($"http://localhost:{DaprHttpPort}/v1.0/healthz"); 36 | return new StatusCodeResult((int)response.StatusCode); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base 2 | WORKDIR /app 3 | EXPOSE 80 4 | 5 | ENV ASPNETCORE_URLS=http://+:80 6 | 7 | FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build 8 | WORKDIR /src 9 | COPY . . 10 | WORKDIR "/src/RedDog.VirtualWorker" 11 | RUN dotnet build "RedDog.VirtualWorker.csproj" -c Release -o /app/build 12 | 13 | FROM build AS publish 14 | RUN dotnet publish "RedDog.VirtualWorker.csproj" -c Release -o /app/publish 15 | 16 | FROM base AS final 17 | WORKDIR /app 18 | COPY --from=publish /app/publish . 19 | ENTRYPOINT ["dotnet", "RedDog.VirtualWorker.dll"] 20 | -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Models/OrderItemSummary.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace RedDog.VirtualWorker.Models 4 | { 5 | public class OrderItemSummary 6 | { 7 | [JsonPropertyName("productId")] 8 | public int ProductId { get; set; } 9 | 10 | [JsonPropertyName("productName")] 11 | public string ProductName { get; set; } 12 | 13 | [JsonPropertyName("quantity")] 14 | public int Quantity { get; set; } 15 | 16 | [JsonPropertyName("unitCost")] 17 | public decimal UnitCost { get; set; } 18 | 19 | [JsonPropertyName("unitPrice")] 20 | public decimal UnitPrice { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Models/OrderSummary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace RedDog.VirtualWorker.Models 6 | { 7 | public class OrderSummary 8 | { 9 | [JsonPropertyName("orderId")] 10 | public Guid OrderId { get; set; } 11 | 12 | [JsonPropertyName("orderDate")] 13 | public DateTime OrderDate { get; set; } 14 | 15 | [JsonPropertyName("orderCompletedDate")] 16 | public DateTime? OrderCompletedDate { get; set; } 17 | 18 | [JsonPropertyName("storeId")] 19 | public string StoreId { get; set; } 20 | 21 | [JsonPropertyName("firstName")] 22 | public string FirstName { get; set; } 23 | 24 | [JsonPropertyName("lastName")] 25 | public string LastName { get; set; } 26 | 27 | [JsonPropertyName("loyaltyId")] 28 | public string LoyaltyId { get; set; } 29 | 30 | [JsonPropertyName("orderItems")] 31 | public List OrderItems { get; set; } 32 | 33 | [JsonPropertyName("orderTotal")] 34 | public decimal OrderTotal { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "Vigilantes.DaprWorkshop.VirtualBarista": { 5 | "commandName": "Project", 6 | "applicationUrl": "http://127.0.0.1:5500", 7 | "environmentVariables": { 8 | "ASPNETCORE_ENVIRONMENT": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RedDog.VirtualWorker/RedDog.VirtualWorker.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /RedDog.VirtualWorker/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Serilog; 7 | using RedDog.VirtualWorker.Controllers; 8 | 9 | namespace RedDog.VirtualWorker 10 | { 11 | public class Startup 12 | { 13 | public Startup(IConfiguration configuration) 14 | { 15 | Configuration = configuration; 16 | } 17 | 18 | public IConfiguration Configuration { get; } 19 | 20 | public void ConfigureServices(IServiceCollection services) 21 | { 22 | services.AddHttpClient(); 23 | services.AddControllers().AddDapr(); 24 | } 25 | 26 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 27 | { 28 | if (env.IsDevelopment()) 29 | { 30 | app.UseDeveloperExceptionPage(); 31 | } 32 | 33 | app.UseSerilogRequestLogging(); 34 | app.UseRouting(); 35 | app.UseCloudEvents(); 36 | app.UseAuthorization(); 37 | app.UseEndpoints(endpoints => 38 | { 39 | endpoints.MapSubscribeHandler(); 40 | endpoints.MapControllers(); 41 | }); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /RedDog.VirtualWorker/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RedDog.VirtualWorker/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /assets/.keep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /assets/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/assets/architecture.png -------------------------------------------------------------------------------- /assets/hybrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/assets/hybrid.png -------------------------------------------------------------------------------- /assets/paas-vnext-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/assets/paas-vnext-arch.png -------------------------------------------------------------------------------- /assets/reddog_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/assets/reddog_code.png -------------------------------------------------------------------------------- /manifests/branch/.flux.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | patchUpdated: 3 | generators: 4 | - command: kustomize build . 5 | patchFile: flux-patch.yaml -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.binding.receipt.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.binding.receipt 5 | namespace: reddog-retail 6 | spec: 7 | type: bindings.azure.blobstorage 8 | version: v1 9 | metadata: 10 | - name: storageAccount 11 | value: reddogreceipts 12 | - name: container 13 | value: receipts 14 | - name: storageAccessKey 15 | secretKeyRef: 16 | name: blob-storage-key 17 | key: blob-storage-key 18 | scopes: 19 | - receipt-generation-service 20 | auth: 21 | secretStore: reddog.secretstore 22 | -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.binding.virtualworker.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: orders 5 | namespace: reddog-retail 6 | spec: 7 | type: bindings.cron 8 | version: v1 9 | metadata: 10 | - name: schedule 11 | value: "@every 5s" 12 | scopes: 13 | - virtual-worker -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Configuration 3 | metadata: 4 | name: reddog.config 5 | namespace: reddog-retail 6 | spec: 7 | tracing: 8 | samplingRate: "1" 9 | zipkin: 10 | endpointAddress: "http://zipkin.zipkin.svc.cluster.local:9411/api/v2/spans" -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.pubsub.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.pubsub 5 | namespace: reddog-retail 6 | spec: 7 | type: pubsub.rabbitmq 8 | version: v1 9 | metadata: 10 | - name: host 11 | secretKeyRef: 12 | name: rabbitmq-connectionstring 13 | key: rabbitmq-connectionstring 14 | - name: durable 15 | value: true 16 | - name: deleteWhenUnused 17 | value: false 18 | - name: deliveryMode 19 | value: 2 20 | scopes: 21 | - order-service 22 | - make-line-service 23 | - loyalty-service 24 | - receipt-generation-service 25 | - accounting-service 26 | auth: 27 | secretStore: reddog.secretstore 28 | -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.secretstore.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.secretstore 5 | namespace: reddog-retail 6 | spec: 7 | type: secretstores.azure.keyvault 8 | version: v1 9 | metadata: 10 | - name: vaultName 11 | value: reddog-kv-branch 12 | - name: spnClientId 13 | value: 14 | - name: spnTenantId 15 | value: 16 | - name: spnCertificate 17 | secretKeyRef: 18 | name: reddog.secretstore 19 | key: secretstore-cert 20 | -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.state.loyalty.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.state.loyalty 5 | namespace: reddog-retail 6 | spec: 7 | type: state.redis 8 | version: v1 9 | metadata: 10 | - name: redisHost 11 | value: redis-cache-master.redis:6379 12 | - name: redisPassword 13 | secretKeyRef: 14 | name: redis-password 15 | key: redis-password 16 | scopes: 17 | - loyalty-service 18 | auth: 19 | secretStore: reddog.secretstore 20 | -------------------------------------------------------------------------------- /manifests/branch/base/components/reddog.state.makeline.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.state.makeline 5 | namespace: reddog-retail 6 | spec: 7 | type: state.redis 8 | version: v1 9 | metadata: 10 | - name: redisHost 11 | value: redis-cache-master.redis:6379 12 | - name: redisPassword 13 | secretKeyRef: 14 | name: redis-password 15 | key: redis-password 16 | scopes: 17 | - make-line-service 18 | auth: 19 | secretStore: reddog.secretstore 20 | -------------------------------------------------------------------------------- /manifests/branch/base/deployments/accounting-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: accounting-service 5 | namespace: reddog-retail 6 | labels: 7 | app: accounting-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: accounting-service 13 | template: 14 | metadata: 15 | labels: 16 | app: accounting-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "accounting-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: accounting-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-accounting-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | readinessProbe: 30 | httpGet: 31 | path: /probes/ready 32 | port: 80 33 | timeoutSeconds: 30 34 | successThreshold: 1 35 | failureThreshold: 12 36 | periodSeconds: 10 37 | startupProbe: 38 | httpGet: 39 | path: /probes/healthz 40 | port: 80 41 | failureThreshold: 6 42 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/branch/base/deployments/bootstrapper.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: bootstrapper 5 | namespace: reddog-retail 6 | labels: 7 | app: bootstrapper 8 | spec: 9 | template: 10 | metadata: 11 | name: bootstrapper 12 | labels: 13 | app: bootstrapper 14 | annotations: 15 | dapr.io/enabled: "true" 16 | dapr.io/app-id: "bootstrapper" 17 | dapr.io/config: "reddog.config" 18 | spec: 19 | containers: 20 | - name: bootstrapper 21 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-bootstrapper:latest" 22 | imagePullPolicy: Always 23 | restartPolicy: OnFailure -------------------------------------------------------------------------------- /manifests/branch/base/deployments/loyalty-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: loyalty-service 5 | namespace: reddog-retail 6 | labels: 7 | app: loyalty-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: loyalty-service 13 | template: 14 | metadata: 15 | labels: 16 | app: loyalty-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "loyalty-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: loyalty-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-loyalty-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | startupProbe: 30 | httpGet: 31 | path: /probes/healthz 32 | port: 80 33 | failureThreshold: 6 34 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/branch/base/deployments/make-line-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: make-line-service 5 | namespace: reddog-retail 6 | labels: 7 | app: make-line-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: make-line-service 13 | template: 14 | metadata: 15 | labels: 16 | app: make-line-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "make-line-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: make-line-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-make-line-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | startupProbe: 30 | httpGet: 31 | path: /probes/healthz 32 | port: 80 33 | failureThreshold: 6 34 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/branch/base/deployments/namespace.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: reddog-retail -------------------------------------------------------------------------------- /manifests/branch/base/deployments/order-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: order-service 5 | namespace: reddog-retail 6 | labels: 7 | app: order-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: order-service 13 | template: 14 | metadata: 15 | labels: 16 | app: order-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "order-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: order-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-order-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | startupProbe: 30 | httpGet: 31 | path: /probes/healthz 32 | port: 80 33 | failureThreshold: 6 34 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/branch/base/deployments/rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: secret-reader 6 | namespace: reddog-retail 7 | rules: 8 | - apiGroups: [""] 9 | resources: ["secrets"] 10 | verbs: ["get", "list"] 11 | --- 12 | 13 | kind: RoleBinding 14 | apiVersion: rbac.authorization.k8s.io/v1 15 | metadata: 16 | name: dapr-secret-reader 17 | namespace: reddog-retail 18 | subjects: 19 | - kind: ServiceAccount 20 | name: default 21 | roleRef: 22 | kind: Role 23 | name: secret-reader 24 | apiGroup: rbac.authorization.k8s.io 25 | -------------------------------------------------------------------------------- /manifests/branch/base/deployments/receipt-generation-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: receipt-generation-service 5 | namespace: reddog-retail 6 | labels: 7 | app: receipt-generation-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: receipt-generation-service 13 | template: 14 | metadata: 15 | labels: 16 | app: receipt-generation-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "receipt-generation-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: receipt-generation-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-receipt-generation-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | startupProbe: 30 | httpGet: 31 | path: /probes/healthz 32 | port: 80 33 | failureThreshold: 6 34 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/branch/base/deployments/services-for-ui.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: make-line-service 5 | namespace: reddog-retail 6 | labels: 7 | name: make-line-service 8 | spec: 9 | type: LoadBalancer 10 | ports: 11 | - name: http 12 | port: 8082 13 | targetPort: 80 14 | selector: 15 | app: make-line-service 16 | --- 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: accounting-service 21 | namespace: reddog-retail 22 | labels: 23 | name: accounting-service 24 | spec: 25 | type: LoadBalancer 26 | ports: 27 | - name: http 28 | port: 8083 29 | targetPort: 80 30 | selector: 31 | app: accounting-service 32 | -------------------------------------------------------------------------------- /manifests/branch/base/deployments/ui-service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: reddog-branch-ui 6 | namespace: reddog-branch 7 | labels: 8 | name: reddog-branch-ui 9 | spec: 10 | type: LoadBalancer 11 | ports: 12 | - name: http 13 | port: 80 14 | targetPort: 8080 15 | selector: 16 | app: ui 17 | -------------------------------------------------------------------------------- /manifests/branch/base/deployments/ui.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: ui 5 | namespace: reddog-retail 6 | labels: 7 | app: ui 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: ui 13 | template: 14 | metadata: 15 | labels: 16 | app: ui 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "ui" 20 | dapr.io/config: "reddog.config" 21 | spec: 22 | containers: 23 | - name: ui 24 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-ui:latest" 25 | ports: 26 | - containerPort: 8080 27 | imagePullPolicy: Always 28 | env: 29 | - name: VUE_APP_SITE_TITLE 30 | value: "Red Dog Pharmacy - Store" 31 | - name: VUE_APP_SITE_TYPE 32 | value: "Pharmacy" 33 | - name: VUE_APP_IS_CORP 34 | value: "false" 35 | - name: VUE_APP_STORE_ID 36 | valueFrom: 37 | secretKeyRef: 38 | name: branch.config 39 | key: store_id 40 | - name: VUE_APP_MAKELINE_BASE_URL 41 | valueFrom: 42 | secretKeyRef: 43 | name: branch.config 44 | key: makeline_base_url 45 | - name: VUE_APP_ACCOUNTING_BASE_URL 46 | valueFrom: 47 | secretKeyRef: 48 | name: branch.config 49 | key: accounting_base_url 50 | -------------------------------------------------------------------------------- /manifests/branch/base/deployments/virtual-customers.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: virtual-customers 5 | namespace: reddog-retail 6 | labels: 7 | app: virtual-customers 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: virtual-customers 13 | template: 14 | metadata: 15 | labels: 16 | app: virtual-customers 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "virtual-customers" 20 | dapr.io/config: "reddog.config" 21 | spec: 22 | containers: 23 | - name: virtual-customers 24 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-virtual-customers:latest" 25 | imagePullPolicy: Always 26 | env: 27 | - name: STORE_ID 28 | valueFrom: 29 | secretKeyRef: 30 | name: branch.config 31 | key: store_id 32 | - name: MAX_ITEM_QUANTITY 33 | value: "9" 34 | - name: MIN_SEC_TO_PLACE_ORDER 35 | value: "2" 36 | - name: MAX_SEC_TO_PLACE_ORDER 37 | value: "8" 38 | - name: MIN_SEC_BETWEEN_ORDERS 39 | value: "2" 40 | - name: MAX_SEC_BETWEEN_ORDERS 41 | value: "8" 42 | - name: NUM_ORDERS 43 | value: "-1" -------------------------------------------------------------------------------- /manifests/branch/base/deployments/virtual-worker.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: virtual-worker 5 | namespace: reddog-retail 6 | labels: 7 | app: virtual-worker 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: virtual-worker 13 | template: 14 | metadata: 15 | labels: 16 | app: virtual-worker 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "virtual-worker" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: virtual-worker 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-virtual-worker:latest" 26 | imagePullPolicy: Always 27 | startupProbe: 28 | httpGet: 29 | path: /probes/healthz 30 | port: 80 31 | failureThreshold: 6 32 | periodSeconds: 10 33 | env: 34 | - name: STORE_ID 35 | valueFrom: 36 | secretKeyRef: 37 | name: branch.config 38 | key: store_id 39 | - name: MIN_SECONDS_TO_COMPLETE_ITEM 40 | value: "2" 41 | - name: MAX_SECONDS_TO_COMPLETE_ITEM 42 | value: "12" -------------------------------------------------------------------------------- /manifests/branch/base/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - ./deployments/namespace.yaml 5 | - ./deployments/rbac.yaml 6 | - ./deployments/accounting-service.yaml 7 | - ./deployments/bootstrapper.yaml 8 | - ./deployments/loyalty-service.yaml 9 | - ./deployments/make-line-service.yaml 10 | - ./deployments/order-service.yaml 11 | - ./deployments/receipt-generation-service.yaml 12 | - ./deployments/ui.yaml 13 | - ./deployments/services-for-ui.yaml 14 | - ./deployments/virtual-customers.yaml 15 | - ./deployments/virtual-worker.yaml 16 | - ./components/reddog.binding.receipt.yaml 17 | - ./components/reddog.binding.virtualworker.yaml 18 | - ./components/reddog.config.yaml 19 | - ./components/reddog.pubsub.yaml 20 | - ./components/reddog.secretstore.yaml 21 | - ./components/reddog.state.loyalty.yaml 22 | - ./components/reddog.state.makeline.yaml 23 | -------------------------------------------------------------------------------- /manifests/branch/dependencies/.flux.yaml: -------------------------------------------------------------------------------- 1 | version: 1 2 | scanForFiles: {} -------------------------------------------------------------------------------- /manifests/branch/dependencies/cert-manager/cert-manager.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: cert-manager 5 | namespace: cert-manager 6 | spec: 7 | releaseName: cert-manager 8 | chart: 9 | repository: https://charts.jetstack.io 10 | name: cert-manager 11 | version: 1.3.1 12 | values: 13 | installCRDs: true -------------------------------------------------------------------------------- /manifests/branch/dependencies/dapr/dapr.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: dapr 5 | namespace: dapr-system 6 | spec: 7 | releaseName: dapr 8 | chart: 9 | repository: https://dapr.github.io/helm-charts/ 10 | name: dapr 11 | version: 1.3.0 -------------------------------------------------------------------------------- /manifests/branch/dependencies/keda/keda.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: keda 5 | namespace: keda 6 | spec: 7 | releaseName: keda 8 | chart: 9 | repository: https://kedacore.github.io/charts 10 | name: keda 11 | version: 2.2.0 12 | -------------------------------------------------------------------------------- /manifests/branch/dependencies/nginx/nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: nginx-ingress 5 | namespace: nginx-ingress 6 | spec: 7 | releaseName: nginx-ingress 8 | chart: 9 | repository: https://kubernetes.github.io/ingress-nginx 10 | name: ingress-nginx 11 | version: 3.31.0 12 | values: 13 | controller: 14 | service: 15 | type: LoadBalancer 16 | annotations: 17 | service.beta.kubernetes.io/azure-dns-label-name: "paas-vnext-workshop" 18 | replicaCount: 2 -------------------------------------------------------------------------------- /manifests/branch/dependencies/rabbitmq/rabbitmq.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: rabbitmq 5 | namespace: rabbitmq 6 | spec: 7 | releaseName: rabbitmq 8 | targetNamespace: rabbitmq 9 | timeout: 300 10 | resetValues: false 11 | wait: false 12 | forceUpgrade: false 13 | chart: 14 | repository: https://marketplace.azurecr.io/helm/v1/repo 15 | name: rabbitmq 16 | version: 8.20.2 17 | values: 18 | replicaCount: 3 19 | service: 20 | type: LoadBalancer 21 | auth: 22 | username: contosoadmin 23 | password: MyPassword123 24 | # podSecurityContext: 25 | # enabled: true 26 | # fsGroup: 2000 27 | # runAsUser: 0 28 | -------------------------------------------------------------------------------- /manifests/branch/dependencies/redis/redis.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: helm.fluxcd.io/v1 2 | kind: HelmRelease 3 | metadata: 4 | name: redis 5 | namespace: redis 6 | spec: 7 | releaseName: redis 8 | targetNamespace: redis 9 | timeout: 300 10 | resetValues: false 11 | wait: false 12 | forceUpgrade: false 13 | chart: 14 | repository: https://marketplace.azurecr.io/helm/v1/repo 15 | name: redis 16 | version: 15.0.0 17 | values: 18 | auth: 19 | password: MyPassword123 20 | master: 21 | podSecurityContext: 22 | enabled: true 23 | fsGroup: 2000 24 | containerSecurityContext: 25 | runAsUser: 0 26 | enabled: true 27 | replica: 28 | podSecurityContext: 29 | enabled: true 30 | fsGroup: 2000 31 | containerSecurityContext: 32 | runAsUser: 0 33 | enabled: true -------------------------------------------------------------------------------- /manifests/branch/dependencies/sql/pvc.yaml: -------------------------------------------------------------------------------- 1 | kind: StorageClass 2 | apiVersion: storage.k8s.io/v1 3 | metadata: 4 | name: azure-disk 5 | provisioner: kubernetes.io/azure-disk 6 | parameters: 7 | storageaccounttype: Standard_LRS 8 | kind: Managed 9 | --- 10 | kind: PersistentVolumeClaim 11 | apiVersion: v1 12 | metadata: 13 | name: mssql-data 14 | # annotations: 15 | # volume.beta.kubernetes.io/storage-class: azure-disk 16 | spec: 17 | accessModes: 18 | - ReadWriteOnce 19 | resources: 20 | requests: 21 | storage: 8Gi 22 | # storageClassName: default -------------------------------------------------------------------------------- /manifests/branch/dependencies/sql/sql-server.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: mssql-deployment 5 | spec: 6 | replicas: 1 7 | selector: 8 | matchLabels: 9 | app: mssql 10 | template: 11 | metadata: 12 | labels: 13 | app: mssql 14 | spec: 15 | terminationGracePeriodSeconds: 30 16 | hostname: mssqlinst 17 | securityContext: 18 | fsGroup: 10001 19 | containers: 20 | - name: mssql 21 | image: mcr.microsoft.com/mssql/server:2019-latest 22 | ports: 23 | - containerPort: 1433 24 | env: 25 | - name: MSSQL_PID 26 | value: "Developer" 27 | - name: ACCEPT_EULA 28 | value: "Y" 29 | - name: SA_PASSWORD 30 | valueFrom: 31 | secretKeyRef: 32 | name: mssql 33 | key: SA_PASSWORD 34 | volumeMounts: 35 | - name: mssqldb 36 | mountPath: /var/opt/mssql 37 | volumes: 38 | - name: mssqldb 39 | persistentVolumeClaim: 40 | claimName: mssql-data 41 | --- 42 | apiVersion: v1 43 | kind: Service 44 | metadata: 45 | name: mssql-deployment 46 | spec: 47 | selector: 48 | app: mssql 49 | ports: 50 | - protocol: TCP 51 | port: 1433 52 | targetPort: 1433 53 | type: LoadBalancer -------------------------------------------------------------------------------- /manifests/branch/dependencies/yaml/cluster-issuer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert-manager.io/v1alpha2 2 | kind: Issuer 3 | metadata: 4 | name: letsencrypt-prod 5 | namespace: paas-vnext-workshop 6 | spec: 7 | acme: 8 | server: https://acme-v02.api.letsencrypt.org/directory 9 | email: paasvnextworkshop@microsoft.com 10 | privateKeySecretRef: 11 | name: letsencrypt-prod 12 | solvers: 13 | - http01: 14 | ingress: 15 | class: nginx -------------------------------------------------------------------------------- /manifests/branch/dependencies/yaml/namespaces.yaml: -------------------------------------------------------------------------------- 1 | kind: Namespace 2 | apiVersion: v1 3 | metadata: 4 | name: dapr-system 5 | --- 6 | kind: Namespace 7 | apiVersion: v1 8 | metadata: 9 | name: rabbitmq 10 | --- 11 | kind: Namespace 12 | apiVersion: v1 13 | metadata: 14 | name: redis 15 | --- 16 | kind: Namespace 17 | apiVersion: v1 18 | metadata: 19 | name: nginx-ingress 20 | --- 21 | kind: Namespace 22 | apiVersion: v1 23 | metadata: 24 | name: cert-manager 25 | --- 26 | kind: Namespace 27 | apiVersion: v1 28 | metadata: 29 | name: keda 30 | -------------------------------------------------------------------------------- /manifests/branch/redmond/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | bases: 4 | - ../base 5 | patchesStrategicMerge: 6 | - virtual-worker.patch.yaml 7 | - virtual-customers.patch.yaml 8 | -------------------------------------------------------------------------------- /manifests/branch/redmond/virtual-customers.patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: virtual-customers 5 | namespace: reddog-retail 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: virtual-customers 11 | env: 12 | - name: STORE_ID 13 | value: Redmond 14 | -------------------------------------------------------------------------------- /manifests/branch/redmond/virtual-worker.patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: virtual-worker 5 | namespace: reddog-retail 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: virtual-worker 11 | env: 12 | - name: STORE_ID 13 | value: Redmond 14 | -------------------------------------------------------------------------------- /manifests/corporate/components/reddog.config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Configuration 3 | metadata: 4 | name: reddog.config 5 | namespace: reddog-retail 6 | spec: 7 | tracing: 8 | samplingRate: "1" 9 | zipkin: 10 | endpointAddress: "http://zipkin.zipkin.svc.cluster.local:9411/api/v2/spans" 11 | -------------------------------------------------------------------------------- /manifests/corporate/components/reddog.pubsub.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.pubsub 5 | namespace: reddog-retail 6 | spec: 7 | type: pubsub.azure.servicebus 8 | version: v1 9 | metadata: 10 | - name: connectionString 11 | secretKeyRef: 12 | name: sb-root-connectionstring 13 | key: sb-root-connectionstring 14 | scopes: 15 | - loyalty-service 16 | - accounting-service 17 | auth: 18 | secretStore: reddog.secretstore 19 | -------------------------------------------------------------------------------- /manifests/corporate/components/reddog.secretstore.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.secretstore 5 | namespace: reddog-retail 6 | spec: 7 | type: secretstores.azure.keyvault 8 | version: v1 9 | metadata: 10 | - name: vaultName 11 | value: reddog-kv-corp 12 | - name: spnClientId 13 | value: 14 | - name: spnTenantId 15 | value: 16 | - name: spnCertificate 17 | secretKeyRef: 18 | name: reddog.secretstore 19 | key: secretstore-cert 20 | -------------------------------------------------------------------------------- /manifests/corporate/components/reddog.state.loyalty.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.state.loyalty 5 | namespace: reddog-retail 6 | spec: 7 | type: state.azure.cosmosdb 8 | version: v1 9 | metadata: 10 | - name: url 11 | value: https://reddogdemocorp.documents.azure.com:443/ 12 | - name: database 13 | value: reddog 14 | - name: collection 15 | value: loyalty 16 | - name: masterKey 17 | secretKeyRef: 18 | name: cosmos-primary-rw-key 19 | key: cosmos-primary-rw-key 20 | scopes: 21 | - loyalty-service 22 | auth: 23 | secretStore: reddog.secretstore -------------------------------------------------------------------------------- /manifests/corporate/deployments/accounting-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: accounting-service 5 | namespace: reddog-retail 6 | labels: 7 | app: accounting-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: accounting-service 13 | template: 14 | metadata: 15 | labels: 16 | app: accounting-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "accounting-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: accounting-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-accounting-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | readinessProbe: 30 | httpGet: 31 | path: /probes/ready 32 | port: 80 33 | timeoutSeconds: 30 34 | successThreshold: 1 35 | failureThreshold: 12 36 | periodSeconds: 10 37 | startupProbe: 38 | httpGet: 39 | path: /probes/healthz 40 | port: 80 41 | failureThreshold: 6 42 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/corporate/deployments/bootstrapper.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: bootstrapper 5 | namespace: reddog-retail 6 | labels: 7 | app: bootstrapper 8 | spec: 9 | template: 10 | metadata: 11 | name: bootstrapper 12 | labels: 13 | app: bootstrapper 14 | annotations: 15 | dapr.io/enabled: "true" 16 | dapr.io/app-id: "bootstrapper" 17 | dapr.io/config: "reddog.config" 18 | spec: 19 | containers: 20 | - name: bootstrapper 21 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-bootstrapper:latest" 22 | imagePullPolicy: Always 23 | restartPolicy: OnFailure -------------------------------------------------------------------------------- /manifests/corporate/deployments/loyalty-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: loyalty-service 5 | namespace: reddog-retail 6 | labels: 7 | app: loyalty-service 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: loyalty-service 13 | template: 14 | metadata: 15 | labels: 16 | app: loyalty-service 17 | annotations: 18 | dapr.io/enabled: "true" 19 | dapr.io/app-id: "loyalty-service" 20 | dapr.io/app-port: "80" 21 | dapr.io/config: "reddog.config" 22 | spec: 23 | containers: 24 | - name: loyalty-service 25 | image: "ghcr.io/cloudnativegbb/paas-vnext/reddog-loyalty-service:latest" 26 | ports: 27 | - containerPort: 80 28 | imagePullPolicy: Always 29 | startupProbe: 30 | httpGet: 31 | path: /probes/healthz 32 | port: 80 33 | failureThreshold: 6 34 | periodSeconds: 10 -------------------------------------------------------------------------------- /manifests/corporate/deployments/rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: secret-reader 6 | namespace: reddog-retail 7 | rules: 8 | - apiGroups: [""] 9 | resources: ["secrets"] 10 | verbs: ["get", "list"] 11 | --- 12 | 13 | kind: RoleBinding 14 | apiVersion: rbac.authorization.k8s.io/v1 15 | metadata: 16 | name: dapr-secret-reader 17 | namespace: reddog-retail 18 | subjects: 19 | - kind: ServiceAccount 20 | name: default 21 | roleRef: 22 | kind: Role 23 | name: secret-reader 24 | apiGroup: rbac.authorization.k8s.io 25 | -------------------------------------------------------------------------------- /manifests/corporate/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - ./components/reddog.config.yaml 5 | - ./components/reddog.pubsub.yaml 6 | - ./components/reddog.secretstore.yaml 7 | - ./deployments/accounting-service.yaml 8 | - ./deployments/bootstrapper.yaml 9 | -------------------------------------------------------------------------------- /manifests/local/branch/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/manifests/local/branch/.keep -------------------------------------------------------------------------------- /manifests/local/branch/reddog.binding.receipt.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.binding.receipt 5 | namespace: reddog-retail 6 | spec: 7 | type: bindings.localstorage 8 | version: v1 9 | metadata: 10 | - name: rootPath 11 | value: /tmp/receipts 12 | scopes: 13 | - receipt-generation-service -------------------------------------------------------------------------------- /manifests/local/branch/reddog.binding.virtualworker.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: orders 5 | namespace: reddog-retail 6 | spec: 7 | type: bindings.cron 8 | version: v1 9 | metadata: 10 | - name: schedule 11 | value: "@every 5s" 12 | scopes: 13 | - virtual-worker -------------------------------------------------------------------------------- /manifests/local/branch/reddog.pubsub.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.pubsub 5 | namespace: reddog-retail 6 | spec: 7 | type: pubsub.redis 8 | version: v1 9 | metadata: 10 | - name: redisHost 11 | value: dapr_redis_dapr-dev-container:6379 12 | scopes: 13 | - order-service 14 | - make-line-service 15 | - loyalty-service 16 | - receipt-generation-service 17 | - accounting-service 18 | auth: 19 | secretStore: reddog.secretstore -------------------------------------------------------------------------------- /manifests/local/branch/reddog.secretstore.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.secretstore 5 | namespace: reddog-retail 6 | spec: 7 | type: secretstores.local.file 8 | version: v1 9 | metadata: 10 | - name: secretsFile 11 | value: ./manifests/local/branch/secrets.json -------------------------------------------------------------------------------- /manifests/local/branch/reddog.state.loyalty.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.state.loyalty 5 | namespace: reddog-retail 6 | spec: 7 | type: state.redis 8 | version: v1 9 | metadata: 10 | - name: redisHost 11 | value: dapr_redis_dapr-dev-container:6379 12 | scopes: 13 | - loyalty-service -------------------------------------------------------------------------------- /manifests/local/branch/reddog.state.makeline.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dapr.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: reddog.state.makeline 5 | namespace: reddog-retail 6 | spec: 7 | type: state.redis 8 | version: v1 9 | metadata: 10 | - name: redisHost 11 | value: dapr_redis_dapr-dev-container:6379 12 | scopes: 13 | - make-line-service -------------------------------------------------------------------------------- /manifests/local/branch/secrets.json: -------------------------------------------------------------------------------- 1 | { 2 | "reddog-sql": "Data Source=reddog-sql-server;Initial Catalog=reddogdemo;User Id=sa;Password=pass@word1;TrustServerCertificate=true;" 3 | } -------------------------------------------------------------------------------- /manifests/local/corporate/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/reddog-code/fa46c0a24d34d089cbf6ff904a5bb2ae6f49c154/manifests/local/corporate/.keep -------------------------------------------------------------------------------- /rest-samples/accounting-service.rest: -------------------------------------------------------------------------------- 1 | @accounting-service = 127.0.0.1:5700 2 | 3 | 4 | ###### ORDER METRICS 5 | ### Order metrics per store 6 | GET http://{{accounting-service}}/OrderMetrics?StoreId=Redmond 7 | 8 | ### Order metrics total 9 | GET http://{{accounting-service}}/OrderMetrics 10 | 11 | 12 | ###### ORDERS OVER TIME 13 | ### Order counts over the last 20 minutes 14 | GET http://{{accounting-service}}/Orders/Minute/PT20M?StoreId=Redmond 15 | 16 | ### Order counts over the last 24 hours, by hour 17 | GET http://{{accounting-service}}/Orders/Hour/PT24H?StoreId=Redmond 18 | 19 | ### Orders by Day 20 | GET http://{{accounting-service}}/Orders/Day/P14D?StoreId=Redmond 21 | 22 | 23 | ###### CORP STORE LISTING 24 | ### Corporate Store List 25 | GET http://{{accounting-service}}/Corp/Stores 26 | 27 | 28 | ###### CORP SALES PROFIT 29 | ### Corp SalesProfit Per Store 30 | GET http://{{accounting-service}}/Corp/SalesProfit/PerStore 31 | 32 | ### Corp SalesProfit All Stores 33 | GET http://{{accounting-service}}/Corp/SalesProfit/Total 34 | 35 | 36 | ### Readiness probe 37 | GET http://{{accounting-service}}/Probes/ready 38 | 39 | 40 | ### 41 | GET http://corp.accounting.brianredmond.io/Corp/SalesProfit/PerStore 42 | 43 | -------------------------------------------------------------------------------- /rest-samples/makeline-service.rest: -------------------------------------------------------------------------------- 1 | @makeline-service = 127.0.0.1:5200 2 | @storeId = Redmond 3 | 4 | ### Get all orders waiting to be made via makeline-service 5 | GET http://{{makeline-service}}/orders/{{storeId}} 6 | 7 | //GET http://127.0.0.1:5580/v1.0/invoke/make-line-service/method/orders/{{storeId}} 8 | 9 | GET http://0.0.0.0:5180/v1.0/invoke/order-service/method/orders/{{storeId}} 10 | 11 | 12 | ### Complete (delete) an order via makeline-service (NOTE: replace the GUID with an actual orderId) 13 | DELETE http://{{makeline-service}}/orders/{{storeId}}/b3cc166e-3253-4ae4-8da5-34d102f72c71 14 | 15 | 16 | 17 | ### Brian Austin Makeline 18 | http://austin.makeline.brianredmond.io/orders/Austin -------------------------------------------------------------------------------- /rest-samples/ui.rest: -------------------------------------------------------------------------------- 1 | @ui-dapr = 127.0.0.1:5980 2 | @store-id = Redmond 3 | @order-service-name = order-service 4 | 5 | POST http://{{ui-dapr}}/v1.0/invoke/{{order-service-name}}/method/order 6 | Content-Type: application/json 7 | 8 | { 9 | "storeId": "{{store-id}}", 10 | "firstName": "John 'Hannibal'", 11 | "lastName": "Smith", 12 | "loyaltyId": "42", 13 | "orderItems": [ 14 | { 15 | "productId": 1, 16 | "quantity": 1 17 | }, 18 | { 19 | "productId": 2, 20 | "quantity": 1 21 | }, 22 | { 23 | "productId": 3, 24 | "quantity": 3 25 | } 26 | ] 27 | } 28 | 29 | 30 | ### 31 | GET http://{{ui-dapr}}/v1.0/invoke/accounting-service/method/OrderMetrics 32 | Content-Type: application/json 33 | 34 | ### 35 | 36 | GET http://0.0.0.0:5980/v1.0/invoke/make-line-service/method/orders/Redmond 37 | Content-Type: application/json 38 | 39 | 40 | 41 | ### 42 | 43 | GET http://localhost:5680/v1.0/healthz 44 | Content-Type: application/json 45 | 46 | ### 47 | # order-service 48 | GET http://localhost:5180/v1.0/healthz 49 | 50 | ### 51 | # makeline-service 52 | GET http://0.0.0.0:5280/v1.0/healthz 53 | 54 | ### 55 | # receipt-gen-service 56 | GET http://0.0.0.0:5380/v1.0/healthz 57 | 58 | 59 | ### 60 | # fake users 61 | GET https://randomuser.me/api/?inc=name&nat=au,ca,us,de,nz,gb&results=5 62 | --------------------------------------------------------------------------------