All Projects β†’ carstenlebek β†’ shopify-node-app-starter

carstenlebek / shopify-node-app-starter

Licence: other
πŸš€πŸš€ A Shopify embedded app starter template, written in TypeScript with session storage, app context and examples for basic functionalities.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to shopify-node-app-starter

koa-shopify-starter
A slightly modified version of https://github.com/Shopify/unite-react-node-app-workshop.
Stars: ✭ 14 (-85.86%)
Mutual labels:  shopify, shopify-app
nextjs-shopify
This repository contains the app without webhook for the Build a Shopify app with Node and React tutorial.
Stars: ✭ 56 (-43.43%)
Mutual labels:  shopify, shopify-app
mechanic-tasks
Public task repository for Mechanic (https://mechanic.dev)
Stars: ✭ 42 (-57.58%)
Mutual labels:  shopify, shopify-app
nextjs-shopify-auth
Authenticate your Next.js app with Shopify.
Stars: ✭ 54 (-45.45%)
Mutual labels:  shopify, shopify-app
Shopify-Serverless-Starter-App
Shopify Serverless Starter Application built on Serverless Framework and Polaris UI (React.js)
Stars: ✭ 56 (-43.43%)
Mutual labels:  shopify, shopify-app
shopify-node-express-app
Simple Shopify app with Express and Node.js that connects to a Shopify store via OAuth.
Stars: ✭ 20 (-79.8%)
Mutual labels:  shopify, shopify-app
shopify-node-react-app
Shopify paid app in Node.js & React.js that connects to a store and lets merchants select products to automatically discount them in the Shopify admin interface.
Stars: ✭ 29 (-70.71%)
Mutual labels:  shopify, shopify-app
go-shopify
DEPRECATION NOTICE: Continuing support for the go-shopify library will be at Bold Commerce's fork. Please open issues and pull requests over there.
Stars: ✭ 49 (-50.51%)
Mutual labels:  shopify
shopapp-shopify-ios
A Shopify provider for a ShopApp for iOS application
Stars: ✭ 49 (-50.51%)
Mutual labels:  shopify
gatsby-starter-shopify-app
[Experimental] βš‘οΈπŸ’°πŸ—Serverless Shopify App w/ Gatsby & Firebase
Stars: ✭ 102 (+3.03%)
Mutual labels:  shopify-app
gridsome-starter-shopify-advanced
A Gridsome starter for Shopify, complete with authentication πŸ”
Stars: ✭ 16 (-83.84%)
Mutual labels:  shopify
shopify-slater-tailwindcss
Shopify Starter Theme + TailwindCSS with PurgeCSS
Stars: ✭ 40 (-59.6%)
Mutual labels:  shopify
shopify-wishlist
πŸ’™ A set of files used to implement a simple customer wishlist on a Shopify store
Stars: ✭ 115 (+16.16%)
Mutual labels:  shopify
7cart
7cart is a php7 project for building online shops, catalogs or service platforms. 7cart built with simple code and database schema. It is easy to support and fast.
Stars: ✭ 27 (-72.73%)
Mutual labels:  shopify
multiproxy
multiproxy: multiple environments per application
Stars: ✭ 15 (-84.85%)
Mutual labels:  shopify
jimbo
Jimbo - The Free to use and powerful Shopify Bot
Stars: ✭ 22 (-77.78%)
Mutual labels:  shopify
bootstrap-shopify-theme
πŸ› A free Shopify Theme built with Bootstrap, BEM, Liquid, Sass, ESNext, Theme Tools, ... and Webpack.
Stars: ✭ 41 (-58.59%)
Mutual labels:  shopify
monitor
Community restock monitor template
Stars: ✭ 78 (-21.21%)
Mutual labels:  shopify
gulp-shopify
Blank slate Shopify theme for Developers, packaged with Gulp.js for processing SCSS, JavaScript (ES6), images and fonts. Made to support Online Store 2.0 features and Shopify CLI.
Stars: ✭ 142 (+43.43%)
Mutual labels:  shopify
vscode-liquid
πŸ’§Liquid language support for VS Code
Stars: ✭ 137 (+38.38%)
Mutual labels:  shopify

πŸš€πŸš€ Shopify App Template | Next.js | Typescript

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!

Table of Contents

  • 🀩 Features
  • πŸ‘€ Requirements
  • πŸ€“ Getting Started
  • 🎣 Fetching Data
  • 🧰 Built with
  • β˜•οΈ Buy me a coffee

🀩 Features

  • πŸ“ TypeScript
  • ⚑ Next.js - React Framework for static rendering
  • ✨ Serverless Architecture
  • πŸ’³ App Subscriptions
  • πŸ’Ύ Session Storage with Redis
  • πŸš‡ Ngrok for development
  • πŸͺ Webhook registration and persistance after server restart
  • πŸ”‘ Ready to use online and offline accesstokens simultaneously
  • 🌐 App context set up. Can be used to store data, that only needs to be fetched once, but is needed in multiple places
  • Request verification set up
  • Link component to convert <a> tags to Next Links for relative paths
  • Routepropagation set up
  • Examples for creating and displaying of app subscriptions
  • Loading screen while the app context is initializing

🦺 Typesafety

πŸ‘€ Requirements

  • Shopify Partner Account
  • Shopify Dev Store
  • Ngrok account
  • Upstash Redis Database

πŸ€“ Getting Started

  • Click Use this template or this link
  • Create an App in your Shopify Partner Account
  • Fill out your .env file
    • SHOPIFY_API_KEY: The Shopify Api key of the app, you have just created
    • SHOPIFY_API_SECRET_KEY: The Shopify Api secret key of the app, you have just created
    • SCOPES: The access scopes your app needs
    • USE_OFFLINE_ACCESS_TOKEN: Set to true, if you want to use offline accesstokens
    • SHOP: Your dev stores url
    • NGROK_AUTH_TOKEN: Your Ngrok auth token
    • UPSTASH_REDIS_REST_URL: Your Upstash Redis REST url.
    • UPSTASH_REDIS_REST_TOKEN: Your Upstash Redis REST token.
  • Run pnpm install or npm install --force (There is a peer dependency issue between React 18 and Polaris, but it works.)
  • Run npm run dev
  • Your apps ngrok url will be printed to the terminal
  • Install the app to your dev store
  • After you have completed auth, you can run npm run get-schema to generate the gql schema for the admin API, if you want to use a different version than 2022-07z
  • Run npm run generate in a seperate terminal to start the GraphQL code generator

🎣 Fetching Data

Shopify Admin API

  1. Start the GraphQL code generator with npm run generate
  2. Create your Query/Mutation (examples in src/graphql)
  3. Use the generated react-query hook to get your data (example in src/pages/get-data.tsx and src/pages/subscriptions.tsx)

tRPC

  1. Read the tRPC docs
  2. Hook up your DB (Prisma is a great addition to tRPC)
  3. Define your tRPC router
  4. Use the trpc.useQuery() hook to access your data

🧰 Built with

β˜•οΈ Buy me a coffee

Found this repo useful? Buy me a coffee to keep me awake 🀩

BuyMeACoffee

Made by Carsten Lebek

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].