🚀🚀 A Shopify embedded app starter template, written in TypeScript with session storage, app context and examples for basic functionalities.
This is an opinionated starter template for embedded Shopify apps. The biggest opinion is, that Typescript should be used everywhere and it's the only right opinion.
This Template utilizes Middleware and Next.js APIs for OAuth, so no custom server is needed.
Found a bug? Please create an issue! ❤️
Apps built with this template:
Manufactory |
---|
Want your app listed? Create a PR!
<a>
tags to Next Links for relative pathsUse this template
or this link
.env
file
SHOPIFY_API_KEY
: The Shopify Api key of the app, you have just createdSHOPIFY_API_SECRET_KEY
: The Shopify Api secret key of the app, you have just createdSCOPES
: The access scopes your app needsUSE_OFFLINE_ACCESS_TOKEN
: Set to true, if you want to use offline accesstokensSHOP
: Your dev stores urlNGROK_AUTH_TOKEN
: Your Ngrok auth token
UPSTASH_REDIS_REST_URL
: Your Upstash Redis REST url.UPSTASH_REDIS_REST_TOKEN
: Your Upstash Redis REST token.pnpm install
or npm install --force
(There is a peer dependency issue between React 18 and Polaris, but it works.)npm run dev
npm run get-schema
to generate the gql schema for the admin API, if you want to use a different version than 2022-07z
npm run generate
in a seperate terminal to start the GraphQL code generatornpm run generate
src/graphql
)src/pages/get-data.tsx
and src/pages/subscriptions.tsx
)trpc.useQuery()
hook to access your dataFound this repo useful? Buy me a coffee to keep me awake 🤩
Made by Carsten Lebek