This is a full stack ecommerce project built using MERN stack.
- MERN stack
- Redux Toolkit: for state management
- JWT: for authentication
- Paypal: for online payment
-
Clone the repository:
git clone git@github.com:parikshitadhikari/shopp-mern.git
-
Change directory to
shopp-mern
cd shopp-mern
-
In the root directory create a .env file:
NODE_ENV=development PORT=8000 MONGO_URI= ******** JWT_SECRET= ******** PAYPAL_CLIENT_ID= ******** PAYPAL_APP_SECRET= ******** PAYPAL_API_URL=https://api-m.sandbox.paypal.com PAGINATION_LIMIT=4
In order to get PAYPAL_CLIENT_ID and PAYPAL_APP_SECRET, login to Paypal Devs, go to Apps & Credentials > Create App > Enter app name, select merchant and create the app. You then see the Client Id and App Secret which can then be copied into .env
-
Now, in the root directory run the command:
npm i
-
Then, change the directory to
frontend
and run:npm i
-
Return back to root directory using
cd..
and run the script:npm run dev
The project can be then viewed at: http://localhost:3000/
Live url: https://shopp-mern.onrender.com/