GithubHelp home page GithubHelp logo

next-js-e-commerce's Introduction

Sanity.io and Next.js Ecommerce Starter

This is an e-commerce starter that features a studio with a simple Next.js frontend.

This starter uses the Next.js toolkit for Sanity.io.

Note: This starter is an example of e-commerce content models and layout. It doesn't come with a full cart and fulfilmment solution. If you're interested in how to integrate Sanity with a e-commerce solution, do join our community.

Features:

  • Live previews, including website preview for products
  • Frontend with product pages styled using Tailwind.css
  • Content types for products, ads, pages, routes, popup shops, social media

This starter comes with an intentionally sparse frontend for just products and super simple landing pages. The fun is building and tweaking it yourself?

Getting started

The quickest way to get up and running is to go to https://www.sanity.io/create?template=sanity-io%2Fsanity-template-nextjs-ecommerce and create a new project by following the instructions there.

Enabling live preview

You can append ?preview to the landing pages, product pages and the products overview to enable preview mode when you are logged into your Sanity project. For example:

https://<your-project>.vercel.app/products/roji?preview

You can find the code for the in-studio preview over in /studio/src/components/product.

Running Locally

To run locally, rename .env.test to .env and add your project ID from manage.sanity.io.

If you have already set up deployments on Vercel, you can also do vercel env pull to copy environment variables to your development environment.

NOTE: If your Vercel project is set up to use the Next.js framework preset, you'll have to go to the project settings under https://vercel.com and under Build & Develpment change the development command to: npm run dev

To start the development server:

npm start

This will run the frontend at http://localhost:3000 and the Sanity Studio at http://localhost:3000/studio

Credits

The e-commerce frontend is built with Tailwind components by khatabwedaa.

next-js-e-commerce's People

Contributors

louis-smit 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.