Skip to content

Online Store with React, Strapi, Stripe and GraphQL. (Demo on Github page)

Notifications You must be signed in to change notification settings

Raigyo/react-online-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Online Store with React, Strapi CMS with GraphQL & Stripe

July 2020 (updated: October 2020)

🔨 From Udemy 'Build an Online Store with React and GraphQL in 90 Minutes'.

Demo on Github page.

To valid the credit card do as suggested by Stripe: Need a test card? Try 4242 4242 4242 4242, a valid expiration date in the future, and any CVC number and zip code.

The Strapi CMS part is hosted on heroku and uses cloudinary to host images.

screen-01.PNG

About

screen-01.PNG

screen-02.PNG

screen-03.PNG

screen-04.PNG

How to launch in dev mode

React app: npm start

Strapi:

cd server //(or name choosen)

npm run develop

If error: Cannot find module '../build/Release/sharp.node'

    • Delete node_modules folder
  • Clear npm cache npm cache clean --force
  • (Optional) upgrade npm packages npm install npm@latest -g
  • Re-install packages by running npm install

React

Use import in React to import Strapi as component:

import Strapi from 'strapi-sdk-javascript/build/main';

GraphQL

Playground in Strapi with documentations and schemas: Playground

In Strapi, in Role & Permission add for users:

content-type: find + findone

Allow to perform this action for: ratelimit

Exemple to list all brands:

query {
	brands {
  	_id
    name
    description
        image {
        name
        }
	}
}

Components & Services

  • MongoDB Atlas, cloud MongoDB service.
  • Gestalt, React UI Components
  • Strapi, Strapi is the leading open-source headless CMS. It’s 100% Javascript, fully customizable and developer-first => Use npm run develop to launch strapi in developer mode (otherwise won't be possible to add content-types)
  • GraphGL: installed using Strapi dashboard.
  • Stripe, Online payment processing for internet businesses => Use npm i stripe after modifying server/api/orders/controllers/order.js
  • strapi-provider-email-sendgrid
  • SendGrid => In /server/ use npm i strapi-provider-email-sendgrid

Useful Links

About

Online Store with React, Strapi, Stripe and GraphQL. (Demo on Github page)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published