Hi, I am an EM for an agency focused on migrating E-comm shops to Shopify Plus, from other systems such as Salesforce. We are being able to hire good developers, but they lack Shopify specific technical knowledge.There are various reading material, but we want to provide them hands-on experience on understanding concepts such as shopify webhooks, app_proxy, checkout extensibility, etc.Can you draft a training material whose expected outcome is an actually working program, to be hosted locally and served through ngrok?
I'd be happy to draft a training material for your developers to gain hands-on experience with Shopify-specific concepts. This material will guide them through creating a working Shopify app that demonstrates webhooks, app_proxy, and checkout extensibility. The app will be built using Next.js and can be hosted locally and served through ngrok.
Let's break this down into a step-by-step guide:
Let's start with the setup and basic app creation:
Now that we have our basic app structure, let's go through the training material step by step:
Setting up the development environment:
npm install -g @shopify/cli @shopify/cli-hydrogen
Creating a basic Next.js app:
npx create-next-app@latest shopify-training-app
cd shopify-training-app
npm install @shopify/shopify-api
Implementing Shopify authentication:
pages/api/auth.ts
and pages/api/auth/callback.ts
files as shown aboveSet up environment variables in a .env.local
file:
API_KEY=your_api_key
API_SECRET_KEY=your_api_secret_key
SCOPES=read_products,write_products
HOST=https://your-ngrok-url.ngrok.io
Working with Shopify webhooks:
pages/api/webhooks.ts
file as shown aboveImplementing app_proxy:
pages/api/proxy.ts
file as shown aboveExploring checkout extensibility:
Create a new checkout UI extension using the Shopify CLI:
shopify hydrogen extension create
checkout-ui-extension/src/index.jsx
file aboveTesting the app locally with ngrok:
npm install -g ngrok
npm run dev
ngrok http 3000
Throughout this process, encourage developers to:
This hands-on approach will give your developers practical experience with key Shopify concepts while building a functional app. They'll learn how to authenticate with Shopify, handle webhooks, implement app proxies, and extend the checkout process.
Remember to provide ample time for questions and troubleshooting during the training. It might also be beneficial to set up a shared repository where developers can commit their progress and collaborate.
Is there any specific area you'd like me to expand on or any additional Shopify concepts you'd like included in this training material?