Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 9cc6143

Browse files
authored
docs: add new shopping cart quickstarts (#381)
and update links between quickstarts
1 parent 9006d81 commit 9cc6143

36 files changed

+2504
-4
lines changed

.circleci/config.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,21 @@ jobs:
242242
npm install
243243
npm run build
244244
npm test
245+
- run:
246+
name: "Test quickstart: JS Shopping Cart"
247+
working_directory: "~/tmp"
248+
command: |
249+
# use the bundled quickstart to check against what the user will download
250+
unzip -d js-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/js-shopping-cart-quickstart.zip
251+
cd js-shopping-cart
252+
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
253+
npm install --save \
254+
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
255+
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
256+
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
257+
npm install
258+
npm run build
259+
npm test
245260
- run:
246261
name: "Test quickstart: TS Customer Registry"
247262
working_directory: "~/tmp"
@@ -257,6 +272,21 @@ jobs:
257272
npm install
258273
npm run build
259274
npm test
275+
- run:
276+
name: "Test quickstart: TS Shopping Cart"
277+
working_directory: "~/tmp"
278+
command: |
279+
# use the bundled quickstart to check against what the user will download
280+
unzip -d ts-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/ts-shopping-cart-quickstart.zip
281+
cd ts-shopping-cart
282+
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
283+
npm install --save \
284+
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
285+
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
286+
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
287+
npm install
288+
npm run build
289+
npm test
260290
- run:
261291
name: "Test JS Value Entity Counter sample"
262292
command: |
@@ -401,6 +431,24 @@ jobs:
401431
npm install
402432
npm run build
403433
npm run integration-test
434+
- run:
435+
name: "integration tests: js-shopping-cart-quickstart"
436+
working_directory: "~/tmp"
437+
command: |
438+
export VERSION_CHECK_ON_STARTUP=false
439+
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
440+
source /opt/circleci/.nvm/nvm.sh
441+
pushd ~/project/sdk && nvm install && popd
442+
# use the bundled quickstart to check against what the user will download
443+
unzip -d js-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/js-shopping-cart-quickstart.zip
444+
cd js-shopping-cart
445+
npm install --save \
446+
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
447+
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
448+
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
449+
npm install
450+
npm run build
451+
npm run integration-test
404452
- run:
405453
name: "integration tests: ts-customer-registry-quickstart"
406454
working_directory: "~/tmp"
@@ -419,6 +467,24 @@ jobs:
419467
npm install
420468
npm run build
421469
npm run integration-test
470+
- run:
471+
name: "integration tests: ts-shopping-cart-quickstart"
472+
working_directory: "~/tmp"
473+
command: |
474+
export VERSION_CHECK_ON_STARTUP=false
475+
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
476+
source /opt/circleci/.nvm/nvm.sh
477+
pushd ~/project/sdk && nvm install && popd
478+
# use the bundled quickstart to check against what the user will download
479+
unzip -d ts-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/ts-shopping-cart-quickstart.zip
480+
cd ts-shopping-cart
481+
npm install --save \
482+
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
483+
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
484+
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
485+
npm install
486+
npm run build
487+
npm run integration-test
422488
- run:
423489
name: "integration tests: samples/js/js-customer-registry"
424490
command: |

docs/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ examples:
4646
rsync -a --exclude-from=.examplesignore ../samples/js/js-doc-snippets/ "${managed_examples}/js-doc-snippets/"
4747
rsync -a --exclude-from=.examplesignore ../samples/js/js-customer-registry/ "${managed_examples}/js-customer-registry/"
4848
rsync -a --exclude-from=.examplesignore ../samples/js/js-customer-registry-quickstart/ "${managed_examples}/js-customer-registry-quickstart/"
49+
rsync -a --exclude-from=.examplesignore ../samples/js/js-shopping-cart-quickstart/ "${managed_examples}/js-shopping-cart-quickstart/"
4950
rsync -a --exclude-from=.examplesignore ../samples/js/js-valueentity-shopping-cart/ "${managed_examples}/js-valueentity-shopping-cart/"
5051
rsync -a --exclude-from=.examplesignore ../samples/js/valueentity-counter/ "${managed_examples}/valueentity-counter/"
5152
rsync -a --exclude-from=.examplesignore ../samples/js/js-eventsourced-shopping-cart/ "${managed_examples}/js-eventsourced-shopping-cart/"
5253
rsync -a --exclude-from=.examplesignore ../samples/js/js-replicated-entity-shopping-cart/ "${managed_examples}/js-replicated-entity-shopping-cart/"
5354
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-customer-registry/ "${managed_examples}/ts-customer-registry/"
5455
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-customer-registry-quickstart/ "${managed_examples}/ts-customer-registry-quickstart/"
56+
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-shopping-cart-quickstart/ "${managed_examples}/ts-shopping-cart-quickstart/"
5557
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-valueentity-shopping-cart/ "${managed_examples}/ts-valueentity-shopping-cart/"
5658
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-valueentity-counter/ "${managed_examples}/ts-valueentity-counter/"
5759
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-eventsourced-shopping-cart/ "${managed_examples}/ts-eventsourced-shopping-cart/"
@@ -60,8 +62,8 @@ examples:
6062
bundles:
6163
bin/bundle.sh --zip "${managed_attachments}/js-customer-registry-quickstart.zip" ../samples/js/js-customer-registry-quickstart
6264
bin/bundle.sh --zip "${managed_attachments}/ts-customer-registry-quickstart.zip" ../samples/ts/ts-customer-registry-quickstart
63-
bin/bundle.sh --zip "${managed_attachments}/js-eventsourced-shopping-cart.zip" ../samples/js/js-eventsourced-shopping-cart
64-
bin/bundle.sh --zip "${managed_attachments}/ts-eventsourced-shopping-cart.zip" ../samples/ts/ts-eventsourced-shopping-cart
65+
bin/bundle.sh --zip "${managed_attachments}/js-shopping-cart-quickstart.zip" ../samples/js/js-shopping-cart-quickstart
66+
bin/bundle.sh --zip "${managed_attachments}/ts-shopping-cart-quickstart.zip" ../samples/ts/ts-shopping-cart-quickstart
6567

6668
dev: clean managed validate-xrefs dev-html
6769

docs/src/modules/javascript/pages/quickstart/cr-value-entity-javascript.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ mkdir proto
6666

6767
. Add declarations for:
6868
+
69+
--
6970
* The protobuf syntax version, `proto3`.
7071
* The package name, `customer.api`.
7172
* Import `google/protobuf/empty.proto` and Kalix `kalix/annotations.proto`.
73+
--
7274
+
7375
[source,proto,indent=0]
7476
.proto/customer_api.proto
@@ -240,4 +242,4 @@ kalix service expose customer-registry
240242
== Next steps
241243

242244
* You can learn more about xref:javascript:value-entity.adoc[Value Entities].
243-
* Do another https://docs.kalix.io/quickstart/sc-eventsourced-entity-javascript.html[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
245+
* Do another xref:javascript:quickstart/sc-eventsourced-entity-javascript.adoc[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].

docs/src/modules/javascript/pages/quickstart/cr-value-entity-typescript.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ mkdir proto
6666

6767
. Add declarations for:
6868
+
69+
--
6970
* The protobuf syntax version, `proto3`.
7071
* The package name, `customer.api`.
7172
* Import `google/protobuf/empty.proto` and Kalix `kalix/annotations.proto`.
73+
--
7274
+
7375
[source, proto, indent=0]
7476
.proto/customer_api.proto
@@ -240,4 +242,4 @@ kalix service expose customer-registry
240242
== Next steps
241243

242244
* You can learn more about xref:javascript:value-entity.adoc[Value Entities].
243-
* Do another https://docs.kalix.io/quickstart/sc-eventsourced-entity-javascript.html[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
245+
* Do another xref:javascript:quickstart/sc-eventsourced-entity-typescript.adoc[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].

0 commit comments

Comments
 (0)