An e-commerce app built on MERN stack (MongoDB, Express, React and Node) with Stripe Checkout to handle payments. Features present in the app :-
- Authentication using JSON Web Tokens (JWT).
- Option to add, edit, view and delete all the items in our store.
- Option to add items or remove items from the cart for the user.
- Display the total bill of the cart and update it as soon as the cart is updated by the user.
- Using Local Storage to store the JWT so that we only allow logged-in users to buy items.
- Option to pay using Stripe Checkout and thus creating a new order and emptying the cart after payment is successful.
- Option to view all your past orders along with the bill amount for each.
Backend
-
Configure default configs. In
config/default.json
, set your variables.dbUrl
: It can be set asmongodb://localhost/MernECommerce
. NOTE: This is very basic, one without any username and password. This can be configured as per your requirement.
-
jwtsecret
: This is the key used sign jwt tokens. It can be set asdummySecret
. -
StripeAPIKey
: Create your account here register. -
Install dependencies with
npm i
. -
Server will start running on port 4000.