Hydrogen is Shopify’s stack for headless commerce. Hydrogen is designed to dovetail with Remix, Shopify’s full stack web framework. This template contains a minimal setup of components, queries and tooling to get started with Hydrogen.
- Remix
- Hydrogen
- Oxygen
- Vite
- Shopify CLI
- ESLint
- Prettier
- GraphQL generator
- TypeScript and JavaScript flavors
- Minimal setup of components and routes
Do the following to test cart attributes:
- Navigate to the app with query parameters for
campaignIdandtemplateId, e.g.https://itbl-hydrogen-dev-storefront-03b5cbc92343e7c5b861.o2.myshopify.dev?iterable_campaign=1&iterable_template=2 - Sign in, add things to cart
- Go to checkout
- We use bogus payment gateway which means you'd have to:
- Provide
1as a card number for transaction to be successful - Any valid future expiry date and 3-digit CVV
- Provide
- Proceed to finalize the order and observe cloudwatch for the webhooks. Attributes will be a top-level webhook payload
note_attributesfield, for instance:
"note_attributes": [
{
"name": "__iterable_campaign_id",
"value": "1"
},
{
"name": "__iterable_template_id",
"value": "2"
}
],
Requirements:
- Node.js version 18.0.0 or higher
npm create @shopify/hydrogen@latestnpm run buildnpm run devIn order to deploy a new version, type:
npx shopify hydrogen deployYou will be asked either deploying to preview or production. Choose preview if you want to just test it out on oxygen outside of local environment and production for changes merged to main.
You will need to run ngrok (public address proxy) in order for the Customer Account API to function properly. In order to access auth token, refer to "Integrations Team Vault" in 1password, note name is ngrok auth token
ngrok config add-authtoken $auth_tokenThen, after running a local server, in parallel run
ngrok http --domain=ketogenetic-archaeological-jaylah.ngrok-free.dev 3000You can access the store at https://ketogenetic-archaeological-jaylah.ngrok-free.dev now.
Follow step 1 and 2 of https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#step-1-set-up-a-public-domain-for-local-development
Client ID should be set by
npx shopify hydrogen env pullRead more at https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started
Authorization endpoint
https://shopify.com/authentication/86249668965/oauth/authorize
Token endpoint
https://shopify.com/authentication/86249668965/oauth/token
Logout endpoint
https://shopify.com/authentication/86249668965/logout