dabit3 / jamstack-ecommerce

Fork of JAMstack ECommerce for YC blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JAMstack E Commerce Professional

This is a fork of JAMstack ECommerce for the YC blog. For the most up to date version of the project, please visit the main repo here.

This project provides a way to quickly get up and running with a fully configurable JAMstack E Commerce site.

Out of the box, the site uses completely static data coming from a provider at providers/inventoryProvider.js. You can update this provider to fetch data from any real API by changing the call in the getInventory function.

This project is still in Beta.

Getting started

  1. Clone the project
$ git clone https://github.com/jamstack-cms/jamstack-ecommerce.git
  1. Install the dependencies:
$ yarn

# or

$ npm install
  1. Run the project
$ gatsby develop

# or to build

$ gatsby build

Configuring inventory provider

Update providers/inventoryProvider.js with your own inventory provider.

Updating with Auth / Admin panel

  1. Update src/pages/admin.js with sign up, sign, in, sign out, and confirm sign in methods.

  2. Update src/templates/ViewInventory.js with methods to interact with the actual inventory API.

  3. Update src/components/formComponents/AddInventory.js with methods to add item to actual inventory API.

Other considerations

Images

If you're using dynamic images over http, you can add a build step into exports.createPages in gatsby-node.esm.js to download the images locally to improve the user experience. You can also add a placeholder image in src/components/Image.js or make some adjustments in that component for other image loading enhancements.

About

Fork of JAMstack ECommerce for YC blog

License:MIT License


Languages

Language:JavaScript 85.6%Language:CSS 14.4%