Virtual Store is an e-commerce app built as a yarn monorepo using MERN stack. Frontend react app can be found in ../client
directory and the express API server resides insides ../server
directory.
To run this app locally you will need to create environment variables, setup a MongoDB Database and setup a react app and express API
yarn install
Make a .env
file in the ../client/
with the following content
REACT_APP_AUDIENCEc= URL of the backend
ORIGIN = URL of react app
DATABASE = URL of MongoDB Database
ACESS_TOKEN_SECRET = Secret for acess token
REFRESH_TOKEN_SECRET = Secret for refresh token
This app uses a MongoDB Database. To setup this app you will need products data. Products collection should satisfy the following schema requirement for proper functioning of the app.
name
of type string to describe the name of the product
price
of type number to describe the price of the product
images
of type array to hold address of product images
The documents in the Products Collection use the data available at https://dummyjson.com/products
yarn run dev
If the app fails to render or crashes due to some reason, delete the browser history and reset the state using Redux Dev Tolls