You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove old nginx conf
* Refreshed for eslint and all packages to latest
* Fix run target dependency to ensure frontend modules are available before starting processes
* Refactor golangci-lint configuration for improved clarity and organization
* golangci-lint fixes
* Update base images in Dockerfiles to latest stable versions
* Update Dapr sidecar images to latest version and clean up Dockerfile
* Bump version to 0.8.6 in Makefile
* Version bumps
* Major refactor of testing
* Add Bruno collection
* Add TypeSpec for API
* Update README.md to enhance Docker instructions and clarify identity provider configuration
* Update CI workflow to use latest actions and Go version
* Update CI workflows: add golangci-lint installation and upgrade checkout action to v4
* Refactor CI workflow: update integration test steps and remove unused linting commands
* Update CI workflow and Makefile: add integration test reporting and improve test command
* Update CI workflow: initialize Dapr and upgrade test reporting action to v15
* Update CI workflow and Makefile: add golangci-lint installation, improve test reporting, and enhance test commands
* Update CI workflow and Makefile: install go-junit-report, enhance test reporting, and improve integration test command
* Update CI workflow and Makefile: rename test report output files for consistency and install additional Go tools
* Update CI workflow: re-enable build and push Docker images job with proper configuration
* Update CI workflow and Makefile: standardize test report paths and improve output directory management
* Names for tests
* Update README.md: add GitHub Actions workflow status badge
* Update CI workflow: replace sleep with inotifywait for API integration tests and adjust Makefile for process management
* Update CI workflow: modify inotifywait to monitor specific file for API integration tests
* Update CI workflow: replace inotifywait with sleep for API integration tests
* Update .github/workflows/ci-build.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update CI workflow to run API integration tests with a new URL check script
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
frontend: $(FRONTEND_DIR)/node_modules ## 💻 Build and bundle the frontend Vue SPA
38
51
cd$(FRONTEND_DIR); npm run build
39
52
cd$(SERVICE_DIR)/frontend-host; go build
40
53
41
54
clean: ## 🧹 Clean the project, remove modules, binaries and outputs
42
-
rm -rf output
55
+
rm -rf $(TEST_OUT_DIR)
43
56
rm -rf $(FRONTEND_DIR)/node_modules
44
57
rm -rf $(FRONTEND_DIR)/dist
45
58
rm -rf $(FRONTEND_DIR)/coverage
@@ -49,14 +62,18 @@ clean: ## 🧹 Clean the project, remove modules, binaries and outputs
49
62
rm -rf $(SERVICE_DIR)/products/products
50
63
rm -rf $(SERVICE_DIR)/frontend-host/frontend-host
51
64
52
-
run: ## 🚀 Start & run everything locally as processes
65
+
clear-state: ## 💥 Clear all state from Redis (wipe the database)
66
+
docker run --rm --network host redis redis-cli flushall
67
+
68
+
run: $(FRONTEND_DIR)/node_modules ## 🚀 Start & run everything locally as processes
53
69
cd$(FRONTEND_DIR); npm run dev &
54
70
dapr run --app-id cart --app-port 9001 --log-level $(DAPR_RUN_LOGLEVEL) go run github.com/azure-samples/dapr-store/cmd/cart &
55
71
dapr run --app-id products --app-port 9002 --log-level $(DAPR_RUN_LOGLEVEL) go run github.com/azure-samples/dapr-store/cmd/products ./cmd/products/sqlite.db &
56
72
dapr run --app-id users --app-port 9003 --log-level $(DAPR_RUN_LOGLEVEL) go run github.com/azure-samples/dapr-store/cmd/users &
57
73
dapr run --app-id orders --app-port 9004 --log-level $(DAPR_RUN_LOGLEVEL) go run github.com/azure-samples/dapr-store/cmd/orders &
58
74
@sleep 6
59
75
@./scripts/local-gateway/run.sh &
76
+
@touch -m /tmp/dapr-store-running
60
77
@sleep infinity
61
78
@echo "!!! Processes may still be running, please run `make stop` in order to shutdown everything"
62
79
@@ -76,13 +93,20 @@ docker-stop: ## 🚫 Stop and remove local containers
76
93
77
94
stop: ## ⛔ Stop & kill everything started locally from `make run`
78
95
docker rm -f api-gateway ||true
96
+
rm -f /tmp/dapr-store-running
79
97
dapr stop --app-id api-gateway
80
98
dapr stop --app-id cart
81
99
dapr stop --app-id products
82
100
dapr stop --app-id users
83
101
dapr stop --app-id orders
84
102
pkill cart; pkill users; pkill orders; pkill products; pkill main
Copy file name to clipboardExpand all lines: README.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,21 +20,20 @@ The following diagram shows all the components of the application and main inter
20
20
The application uses the following [Dapr Building Blocks](https://docs.dapr.io/developing-applications/building-blocks/) and APIs
21
21
22
22
-**Service Invocation** — The API gateway calls the four main microservices using HTTP calls to [Dapr service invocation](https://docs.dapr.io/developing-applications/building-blocks/service-invocation/service-invocation-overview/). This provides retries, mTLS and service discovery.
23
-
-**State** — State is held for *users* and *orders* using the [Dapr state management API](https://docs.dapr.io/developing-applications/building-blocks/state-management/state-management-overview/). The state provider used is Redis, however any other provider could be plugged in without any application code changes.
23
+
-**State** — State is held for _users_ and _orders_ using the [Dapr state management API](https://docs.dapr.io/developing-applications/building-blocks/state-management/state-management-overview/). The state provider used is Redis, however any other provider could be plugged in without any application code changes.
24
24
-**Pub/Sub** — The submission of new orders through the cart service, is decoupled from the order processing via pub/sub messaging and the [Dapr pub/sub messaging API](https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-overview/). New orders are placed on a topic as messages, to be collected by the orders service. This allows the orders service to independently scale and separates our reads & writes
25
25
-**Output Bindings** — To communicate with downstream & 3rd party systems, the [Dapr Bindings API](https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/) is used. This allows the system to carry out tasks such as saving order details into external storage (e.g. Azure Blob) and notify uses with emails via SendGrid
26
26
-**Middleware** — Dapr supports a range of HTTP middleware, for this project traffic rate limiting can enabled on any of the APIs with a single Kubernetes annotation
First time only, you will need to setup *go-sqlite3* library
209
+
First time only, you will need to setup _go-sqlite3_ library
211
210
212
211
```bash
213
212
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3
@@ -239,16 +238,20 @@ A makefile is provided to assist working with the project and building/running i
239
238
help 💬 This help message :)
240
239
lint 🔎 Lint & format, check to be run in CI, sets exit code on error
241
240
lint-fix 📝 Lint & format, fixes errors and modifies code
242
-
test 🎯 Unit tests for services and snapshot tests for SPA frontend
243
-
test-reports 📜 Unit tests with coverage and test reports (deprecated)
244
-
bundle 💻 Build and bundle the frontend Vue SPA
241
+
test 🎯 Unit tests for services and snapshot tests for SPA frontend
242
+
test-report 🎯 Unit tests and generate report
243
+
test-api 🧪 Run API integration tests with httpYac
244
+
test-api-report 🧪 Run API integration tests with httpYac & generate report
245
+
frontend 💻 Build and bundle the frontend Vue SPA
245
246
clean 🧹 Clean the project, remove modules, binaries and outputs
247
+
clear-state 💥 Clear all state from Redis (wipe the database)
246
248
run 🚀 Start & run everything locally as processes
247
249
docker-run 🐋 Run locally using containers and Docker compose
248
250
docker-build 🔨 Build all containers using Docker compose
249
251
docker-push 📤 Push all containers using Docker compose
250
252
docker-stop 🚫 Stop and remove local containers
251
253
stop ⛔ Stop & kill everything started locally from `make run`
254
+
api-spec 📜 Generate OpenAPI spec & JSON schemas from TypeSpec
252
255
```
253
256
254
257
# CI / CD
@@ -263,7 +266,7 @@ A set of CI and CD release GitHub actions workflows are included in `.github/wor
263
266
264
267
The default mode of operation for the Dapr Store is in "demo mode" where there is no identity provider configured, and no security enforcement on the APIs. This makes it simple to run and allows us to focus on the Dapr aspects of the project. In this mode a demo/dummy user account is used to sign-in and place orders in the store.
265
268
266
-
Optionally Dapr store can be configured utilise the [Microsoft identity platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/) (aka Microsoft Entra ID) as an identity provider. This then supports real user sign-in, and securing of the APIs.
269
+
Optionally Dapr store can be configured utilise the [Microsoft identity platform](https://docs.microsoft.com/en-us/azure/active-directory/develop/) (aka Microsoft Entra ID) as an identity provider. When this is configured, the app supports real user sign-in, and the APIs are secured.
267
270
268
271
#### [📃 Extra Doc: Security, identity & authentication](./docs/auth-identity/)
269
272
@@ -277,12 +280,12 @@ All services support the following environmental variables. All settings are opt
277
280
-`AUTH_CLIENT_ID` - Used to enable integration with Azure AD for identity and authentication. Default is _blank_, which runs the service with no identity backend. See the [security, identity & authentication docs](#security-identity--authentication) for more details.
278
281
-`DAPR_STORE_NAME` - Name of the Dapr state component to use. Default is `statestore`
279
282
280
-
The following vars are used only by the *Cart* and *Orders* services:
283
+
The following vars are used only by the _Cart_ and _Orders_ services:
281
284
282
285
-`DAPR_ORDERS_TOPIC` - Name of the Dapr pub/sub topic to use for orders. Default is `orders-queue`
283
286
-`DAPR_PUBSUB_NAME` - Name of the Dapr pub/sub component to use for orders. Default is `pubsub`
284
287
285
-
The following vars are only used by the *Orders* service:
288
+
The following optional vars are only used by the _Orders_ service:
286
289
287
290
-`DAPR_EMAIL_NAME` - Name of the Dapr SendGrid component to use for sending order emails. Default is `orders-email`
288
291
-`DAPR_REPORT_NAME` - Name of the Dapr Azure Blob component to use for saving order reports. Default is `orders-report`
0 commit comments