Welcome to my TypeScript course to build a fully-functional e-commerce website exactly like amazon. Open your code editor and follow me for the next hours to build an e-commerce website using MERN stack (MongoDB, ExpressJS, React and Node.JS).
- 👉 Render : https://ts-amazona-final.onrender.com
- Creating react application by Vite in TypeScript
- Defining and exporting Types like product, orders and user in frontend
- Creating e-commerce pages like cart, checkout and place order using React Router Dom
- Using React hooks to handle form inputs and fetch backend api
- Managing and monitoring application state by React Context
- 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.
- Deploying your application on cloud servers like Render
- PayPal and Stipe for online payment,
- Render for deployment
- Google Map for locate customer address on map
- Mailgun to email order receipt to user
$ git clone git@github.com:basir/ts-mern-amazona.git
$ cd ts-mern-amazona
- 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/amazona
- 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 start
- Run this on browser: http://localhost:5000/api/seed
- It returns admin email and password and 6 sample products
- Run http://localhost:3000/signin
- Enter admin email and password and click signin
- Contact Instructor: Basir