Test e-commerce website allowing the Stu Knits company to sell their goods via Stripe's secure credit card checkout. Users can browse through the inventory of available knit goods, add to their cart, add quanity/remove from the cart and checkout. In current phase, Stripe's checkout only accepts the test credit card number (4242 4242 4242 4242). Users can also look up their order history. Admin privileges currently allow viewing of all orders placed via the Stripe checkout system.
Decoupled MERN app with Stripe API for checkout
- Fork and clone this repo
- In the terminal, run npm i to install all needed packages
- Open client file in desired code editor
- Create a
.env.localfile- Assign a Server Url like so:
REACT_APP_SERVER_URL=http://localhost:<whateverPortYouWant>
- Move
.env.localfile intonode_modules
- Create an account on Stripe and obtain your secret key from the Developer Dashboard
- While in testing, use
Secret keyas your API key, and if ready to deploy and accept payments usePublishable key
- While in testing, use
- Open server file in desired code editor
- Create a
.envfile- Assign a port, URI for mongoDB, and JWT secret (for tokens), like so:
PORT=<thisPortShouldBeTheSamePortAssignedInTheServerUrl> MONGODB_URI=mongodb://localhost/rankify JWT_SECRET="whateverYouWant" STRIPE_PRIVATE_KEY= paste your Stripe API key here
- Create a
.gitignorefile and place.envinside to be sure your API key and other sensitive info is not published online



