Coder Social home page Coder Social logo

nextjs-shopify-app's Introduction

Shopify NextJS App Example

An example app built with NextJS that can be setup and deployed to production in seconds on Vercel.

Deploy your own

Deploy with Vercel

This examples uses Upstash (Serverless Redis Database) as its data storage. During deployment, you will be asked to connect with Upstash. The integration will help you create a free Redis database and link it to your Vercel project automatically.

You'll need to get a Shopify App API Key and API secret key inside the Partner Dashboard to complete the deploy. After deployed, select App Setup on your app's summary page in Partner Dashboard, and update the following values:

  1. App Url: https://[your-vercel-deploy-url].vercel.app/embedded
  2. Redirection URLs: https://[your-vercel-deploy-url].ngrok.io/auth/shopify/callback

Finally, install your app on a development store by selecting Test on development store on your app's summary page in Partner Dashboard

Setup Local Development

  1. Clone your app's repo git clone https://github.com/[your-user-name]/nextjs-shopify-app.git
  2. Expose your dev environment with ngrok
  3. Get another Shopify API Key and API secret key for local development inside the Partner Dashboard
    • Instead of using https://yourNgrokTunnel.ngrok.io/ for the App URL, use https://yourNgrokTunnel.ngrok.io/embedded
    • Instead of using https://yourNgrokTunnel.ngrok.io/auth/callback for the Redirection URLs, use https://yourNgrokTunnel.ngrok.io/api/auth/shopify/callback
  4. Rename .env.example to .env.local and fill in values
  5. Run npm install and then npm run dev
  6. Install your app on a development store and start developing!

You can start editing the page by modifying pages/embedded/index.js. The page auto-updates as you edit the file.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

nextjs-shopify-app's People

Contributors

t-kelly avatar dan-gamble avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.