A TypeScript App showcase by building a fully-functional e-commerce website like amazon using MERN stack (MongoDB, ExpressJS, React and Node.JS).
- React hooks to handle form inputs and fetch backend api
- Handling shopping cart using reducers and local storage
- Building backend web api by node.js, express.js and MongoDB
- Handling authentication and authorization using JsonWebToken and express middleware.
- PayPal and Stipe for online payment,
- Render for deployment
$ git clone git@github.com:Alvi305/E-Commerce_App_TypeScript.git
- duplicate .env.example in backend folder and rename it to .env
- Local MongoDB
- Install it from here
- In .env file update MONGODB_URI=mongodb://localhost/{E-Commerce_App_TypeScript}
- OR Atlas Cloud MongoDB
- Create database at https://cloud.mongodb.com
- In .env file update MONGODB_URI=mongodb+srv://your-db-connection
$ cd backend
$ npm install
$ npm start
# open new terminal
$ cd frontend
$ npm install
$ npm run dev
- Run http://localhost:4000/api/seed to create sample items and an admin user with a password
- It returns the admin email and password and 6 sample products
- Run http://localhost:5173/signin
- Enter admin email and password and click Sign In
This app was made following the tutorial guidelines of the following video: https://www.youtube.com/watch?v=-ifcPnXHn8Q.