Skip to content

Commit 9d6ffae

Browse files
committed
Add repo setup orchestration commands
1 parent 4405d04 commit 9d6ffae

15 files changed

Lines changed: 478 additions & 248 deletions

File tree

.env.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Checkout Kit sample storefront configuration.
2-
# Copy this file to .env, fill in local values, then run:
2+
# Copy this file to .env, fill in local values, then run dev up or:
33
# scripts/setup_storefront_env
4-
# Optional Apple Pay and Customer Account API values can stay blank.
4+
# Direct interactive setup prompts for optional Apple Pay and Customer Account
5+
# API values by default. dev up uses non-interactive setup, so missing optional
6+
# values can stay blank.
57
#
68
# Do not commit real values from .env or generated platform config files.
79

.github/CONTRIBUTING.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following is a set of guidelines for contributing to this project. Please take a moment to read through them before submitting your first PR.
44

5-
This is a monorepo containing the iOS/Swift, Android, and (forthcoming) React Native implementations of the Shopify Checkout Kit. Each platform has its own conventions, tooling, and release process; the shared guidelines below apply to all of them.
5+
This is a monorepo containing the Swift, Android, React Native, and Web implementations of the Shopify Checkout Kit. Each platform has its own conventions, tooling, and release process; the shared guidelines below apply to all of them.
66

77
## Code of Conduct
88

@@ -41,14 +41,30 @@ When in doubt about whether we will be interested in including a new feature, pl
4141

4242
### Dev tooling
4343

44-
Shopify employees can use the root `dev.yml` from the repo root:
44+
Shopify employees can use the root `dev.yml` from the repo root or any platform
45+
directory:
4546

4647
```bash
4748
dev up
4849
dev check
4950
```
5051

51-
Platform-scoped commands are available as `dev android <command>`, `dev swift <command>`, and `dev react-native <command>` (or `dev rn`). Protocol schema/model commands are available as `dev protocol <command>`. For cross-platform changes, use `dev lint`, `dev test`, `dev check`, `dev format`, and `dev build`.
52+
`dev up` performs full DevHub provisioning, then runs Checkout Kit's repo-owned
53+
setup steps. Those repo-owned steps are summarized at the end so a Swift,
54+
Android, React Native, or Web setup failure is visible without hiding later
55+
platform results. If a setup step fails, fix it and rerun `dev up`.
56+
57+
Setup creates or syncs sample app storefront configuration from the repo-root
58+
`.env`. If `.env` is missing, setup prompts for required storefront values and
59+
then generates the Android, Swift, and React Native sample config files.
60+
Optional Apple Pay and Customer Account API values are preserved if already set,
61+
but `dev up` leaves missing optional values blank instead of prompting.
62+
63+
Platform-scoped commands are available as `dev android <command>`, `dev swift <command>`, `dev react-native <command>` (or `dev rn`), and `dev web <command>` after setup. Protocol schema/model commands are available as `dev protocol <command>`. For cross-platform changes, use `dev lint`, `dev test`, `dev check`, `dev format`, and `dev build`.
64+
65+
React Native sample apps can be run against local in-repo SDK sources with
66+
`dev rn ios --local` or `dev rn android --local`. The Web sample accepts a
67+
checkout URL directly and does not use the shared storefront credential files.
5268

5369
Sample app storefront configuration is generated from the repo-root `.env`.
5470
Shopify employees get this through `dev up`. External contributors can copy
@@ -142,7 +158,7 @@ If your change intentionally modifies the public API:
142158
2. Review the diff in `platforms/android/lib/api/lib.api` alongside your code changes.
143159
3. Commit the updated `.api` file in the same PR.
144160

145-
If you did *not* intend to change public API and `apiCheck` is failing, the diff shows what your change inadvertently affected — treat it as a signal that something in your PR has consumer-visible impact.
161+
If you did _not_ intend to change public API and `apiCheck` is failing, the diff shows what your change inadvertently affected — treat it as a signal that something in your PR has consumer-visible impact.
146162

147163
### Releasing a new Android version
148164

AGENTS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ platforms/
55
swift/ # iOS Swift Package and CocoaPods sources
66
android/ # Android library and sample apps
77
react-native/ # React Native wrapper
8+
web/ # Web component package and sample app
89
protocol/ # cross-platform communication layer based on UCP
910
e2e/ # cross-platform end-to-end tests
1011
.github/ # workflows, issue templates, CODEOWNERS
@@ -19,14 +20,17 @@ e2e/ # cross-platform end-to-end tests
1920
> shadowenv exec --dir <repo_root> -- /opt/dev/bin/dev test [ARGS]
2021
> ```
2122
22-
Run `dev` commands from the repo root. Use `dev up` before running commands when
23-
the environment may not be provisioned.
23+
Run `dev` commands from the repo root or any platform directory. Use `dev up`
24+
before running commands when the environment may not be provisioned.
2425
2526
For platform-scoped work, prefer the root `dev.yml` commands:
2627
2728
- Android: `dev android <command>`
2829
- Swift: `dev swift <command>`
2930
- React Native: `dev react-native <command>` or `dev rn <command>`
31+
- Web: `dev web <command>`
32+
33+
Use `dev up` for setup and setup recovery.
3034
3135
For protocol schema/model work, use `dev protocol <command>`.
3236
@@ -87,3 +91,11 @@ USE_LOCAL_SDK=1 ./scripts/publish_android_snapshot
8791
cd sample/android
8892
USE_LOCAL_SDK=1 ./gradlew :shopify_checkout-kit-react-native:testDebugUnitTest
8993
```
94+
95+
## Sensitive configuration
96+
97+
Treat storefront environment and generated sample app configuration values as
98+
sensitive. Never print, commit, paste, or document real values from `.env`,
99+
generated platform config, access tokens, merchant identifiers, shop IDs,
100+
account IDs, or storefront domains. Use synthetic placeholders for docs and
101+
verification.

0 commit comments

Comments
 (0)