Skip to content

Centralize sample storefront configuration#175

Open
kyle-schellen wants to merge 1 commit into
05-12-align_workspace_dev_commands_in_root_dev.ymlfrom
ks-shared-storefront-env
Open

Centralize sample storefront configuration#175
kyle-schellen wants to merge 1 commit into
05-12-align_workspace_dev_commands_in_root_dev.ymlfrom
ks-shared-storefront-env

Conversation

@kyle-schellen
Copy link
Copy Markdown
Contributor

@kyle-schellen kyle-schellen commented May 20, 2026

Depends on #69.

This PR centralizes sample storefront configuration behind a repo-root .env. It adds .env.example, scripts/setup_storefront_env, and synthetic tests that generate/check the Android, Swift, and React Native sample config files from one shared source of truth.

The shared defaults now use Storefront API 2026-04, matching main. The setup script keeps output sanitized, supports migration from existing platform-local config, and leaves optional Apple Pay / Customer Account API values blank unless provided.

Verified with bash -n scripts/setup_storefront_env scripts/test_setup_storefront_env, scripts/test_setup_storefront_env, and checks that generated platform config stays consistent.

How to test

bash -n scripts/setup_storefront_env scripts/test_setup_storefront_env
scripts/test_setup_storefront_env

With a local .env present:

scripts/setup_storefront_env
scripts/setup_storefront_env --check

Copy link
Copy Markdown
Contributor Author

kyle-schellen commented May 20, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 98%
96.76% (239/247) 91.02% (142/156) 100% (64/64)

@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch from c4e0c6b to ad39f4f Compare May 20, 2026 23:46
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from d2be551 to e86923e Compare May 20, 2026 23:46
@kyle-schellen kyle-schellen self-assigned this May 20, 2026
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch from ad39f4f to 1bf5d08 Compare May 20, 2026 23:59
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from e86923e to 06f9f45 Compare May 20, 2026 23:59
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch from 1bf5d08 to 8575e24 Compare May 21, 2026 00:36
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from 06f9f45 to 0e9dc0f Compare May 21, 2026 00:36
@kyle-schellen kyle-schellen marked this pull request as ready for review May 21, 2026 01:07
@kyle-schellen kyle-schellen requested a review from a team as a code owner May 21, 2026 01:07
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from 0e9dc0f to 8ebd042 Compare May 21, 2026 12:51
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch 2 times, most recently from 83df290 to 9580dc7 Compare May 22, 2026 00:32
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from 8ebd042 to 716abfe Compare May 22, 2026 00:32
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch from 9580dc7 to d73ca4c Compare May 22, 2026 15:28
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch 2 times, most recently from 733c680 to f8b72c3 Compare May 22, 2026 18:30
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch 2 times, most recently from 3028a16 to d3d925e Compare May 24, 2026 17:04
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from f8b72c3 to 5d6ef3d Compare May 24, 2026 17:04
@kyle-schellen kyle-schellen force-pushed the 05-12-align_workspace_dev_commands_in_root_dev.yml branch from d3d925e to 13564e3 Compare May 26, 2026 14:07
@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from 5d6ef3d to 575a93a Compare May 26, 2026 14:07
CUSTOMER_ACCOUNT_API_AUTH_BASE_URL=https://shopify.com/authentication/<shop id>
# Android derives Customer Account redirect and API URLs from the shop ID and version.
CUSTOMER_ACCOUNT_API_SHOP_ID=<shop id>
CUSTOMER_ACCOUNT_API_VERSION=unstable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if we should pin to the latest instead of using unstable here

module.exports = {
__esModule: true,
default: {
API_VERSION: '2025-07',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intentionally different from the version that appears below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I call a merge conflict artifact. 😭 Will update

Comment thread .env.example
# Storefront details
STOREFRONT_DOMAIN=your-store.myshopify.com
STOREFRONT_ACCESS_TOKEN=your-public-storefront-access-token
STOREFRONT_MERCHANT_IDENTIFIER=
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we make it clear anywhere what we use this for?

@kyle-schellen kyle-schellen force-pushed the ks-shared-storefront-env branch from 575a93a to 94d978b Compare May 26, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants