Home
Softono
b

basir

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
3

Software by basir

mern-amazona
Open Source

mern-amazona

# MERN AMAZONA ![amazona](/frontend/public/images/amazona.jpg) # React Tutorial - Build ECommerce in 6 Hours [2022] Welcome to my React and Node tutorial 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). Watch it on Youtube: [https://www.youtube.com/watch?v=CDtPMR5y0QU](https://www.youtube.com/watch?v=CDtPMR5y0QU) ## Demo Website - 👉 Render : [https://amazona.onrender.com](https://amazona.onrender.com) ## You Will Learn - HTML5 and CSS3: Semantic Elements, CSS Grid, Flexbox - React: Components, Props, Events, Hooks, Router, Axios - Context API: Store, Reducers, Actions - Node & Express: Web API, Body Parser, File Upload, JWT - MongoDB: Mongoose, Aggregation - Development: ESLint, Babel, Git, Github, - Deployment: Heroku ## Run Locally ### 1. Clone repo ``` $ git clone [email protected]:basir/mern-amazona.git $ cd mern-amazona ``` ### 2. Create .env File - duplicate .env.example in backend folder and rename it to .env ### 3. Setup MongoDB - Local MongoDB - Install it from [here](https://www.mongodb.com/try/download/community) - In .env file update MONGODB_URI=mongodb://localhost/amazona - OR Atlas Cloud MongoDB - Create database at [https://cloud.mongodb.com](https://cloud.mongodb.com) - In .env file update MONGODB_URI=mongodb+srv://your-db-connection ### 4. Run Backend ``` $ cd backend $ npm install $ npm start ``` ### 5. Run Frontend ``` # open new terminal $ cd frontend $ npm install $ npm start ``` ### 6. Seed Users and Products - Run this on browser: http://localhost:5000/api/seed - It returns admin email and password and 6 sample products ### 7. Admin Login - Run http://localhost:3000/signin - Enter admin email and password and click signin ## Support - Contact Instructor: [Basir](mailto:[email protected]) # Lessons 1. Introduction 2. Install Tools 3. Create React App 4. Create Git Repository 5. List Products 1. create products array 2. add product images 3. render products 4. style products 6. Add page routing 1. npm i react-router-dom 2. create route for home screen 3. create router for product screen 7. Create Node.JS Server 1. run npm init in root folder 2. Update package.json set type: module 3. Add .js to imports 4. npm install express 5. create server.js 6. add start command as node backend/server.js 7. require express 8. create route for / return backend is ready. 9. move products.js from frontend to backend 10. create route for /api/products 11. return products 12. run npm start 8. Fetch Products From Backend 1. set proxy in package.json 2. npm install axios 3. use state hook 4. use effect hook 5. use reducer hook 9. Manage State By Reducer Hook 1. define reducer 2. update fetch data 3. get state from usReducer 10. Add bootstrap UI Framework 1. npm install react-bootstrap bootstrap 2. update App.js 11. Create Product and Rating Component 1. create Rating component 2. Create Product component 3. Use Rating component in Product component 12. Create Product Details Screen 1. fetch product from backend 2. create 3 columns for image, info and action 13. Create Loading and Message Component 1. create loading component 2. use spinner component 3. craete message component 4. create utils.js to define getError fuction 14. Create React Context For Add Item To Cart 1. Create React Context 2. define reducer 3. create store provider 4. implement add to cart button click handler 15. Complete Add To Cart 1. check exist item in the cart 2. check count in stock in backend 16. Create Cart Screen 1. create 2 columns 2. display items list 3. create action column 17. Complete Cart Screen 1. click handler for inc/dec item 2. click handler for remove item 3. click handler for checkout 18. Create Signin Screen 1. create sign in form 2. add email and password 3. add signin button 19. Connect To MongoDB Database 1. create atlas monogodb database 2. install local mongodb database 3. npm install mongoose 4. connect to mongodb database 20. Seed Sample Products 1. create Product model 2. create seed route 3. use route in server.js 4. seed sample product 21. Seed Sample Users 1. create user model 2. seed sample users 22. Create Signin Backend API 1. create signin api 2. npm install jsonwebtoken 3. define generateToken 23. Complete Signin Screen 1. handle submit action 2. save token in store and local storage 3. show user name in header 24. Create Shipping Screen 1. create form inputs 2. handle save shipping address 3. add checkout wizard bar 25. Create Sign Up Screen 1. create input forms 2. handle submit 3. create backend api 26. Implement Select Payment Method Screen 1. create input forms 2. handle submit 27. Create Place Order Screen 1. show cart items, payment and address 2. calculate order summary 28. Implement Place Order Action 1. handle place order action 2. create order create api 29. Create Order Screen 1. create backend api for order/:id 2. fetch order api in frontend 3. show order information in 2 cloumns 30. Pay Order By PayPal 1. generate paypal client id 2. create api to return client id 3. install react-paypal-js 4. use PayPalScriptProvider in index.js 5. use usePayPalScriptReducer in Order Screen 6. implement loadPaypalScript function 7. render paypal button 8. implement onApprove payment function 9. create pay order api in backend 31. Display Order History 1. create order screen 2. create order history api 3. use api in the frontend 32. Create Profile Screen 1. get user info from context 2. show user information 3. create user update api 4. update user info 33. Publish To Heroku 1. create and config node project 2. serve build folder in frontend folder 3. Create heroku account 4. connect it to github 5. Create mongodb atlas database 6. Set database connection in heroku env variables 7. Commit and push 34. Add Sidebar and Search Box 1. add sidebar 2. add search box 35. Create Search Screen 1. show filters 2. create api for searching products 3. display results 36. Create Admin Menu 1. define protected route component 2. define admin route component 3. add menu for admin in header 37. Create Dashboard Screen 1. create dashboard ui 2. implement backend api 3. connect ui to backend 38. Manage Products 1. create products list ui 2. implement backend api 3. fetch data 39. Create Product 1. create products button 2. implement backend api 3. handle on click 40. Create Edit Product 1. create edit button 2. create edit product ui 3. dispaly product info in the input boxes 41. Implement Update Product 1. create edit product backend api 2. handle update click 42. Upload Product Image 1. create cloudinary account 2. use the api key in env file 3. handle upload file 4. implement backend api to upload 43. Delete Product 1. show delete button 2. implement backend api 3. handle on click 44. List Orders 1. create order list screen 2. implement backen api 3. fetch and display orders 45. Deliver Order 1. add deliver button 2. handle click action 3. implement backen api for deliver 46. Delete Order 1. add delete button 2. handle click action 3. implement backen api for delete 47. List Users 1. create user list screen 2. implement backen api 3. fetch and display users 48. Edit User 1. create edit button 2. create edit product ui 3. dispaly product info in the input boxes 4. implement backend api 5. handle edit click 49. Delete User 1. add delete button 2. handle click action 3. implement backen api for delete 50. Choose Address On Google Map 1. create google map credentials 2. update .env file with Google Api Key 3. create api to send google api to frontend 4. create map screen 5. fetch google api 6. getUserLocation 7. install @react-google-maps/api 8. use it in shipping screen 9. apply map to the checkout screen 51. Email order receipt by mailgun 1. create mailgun account 2. add and verify your domain to mailgun 3. install mailgun-js 4. set api key in env file 5. change pay order in orderRouter 6. send email order receipt 52. Review Products 1. create submit review form 2. handle submit 3. implement backend api for review 53. Upload multiple Images 1. add images to product model 2. get images in edit screen 3. show images in product screen 54. Upgrade To React 18 1. install node-check-updates 2. ncu -u 3. remove package-lock.json 4. npm install 5. replace render with createRoot 6. fix LinkContainer error

Frontend Templates E-commerce Platforms
344 Github Stars
next-tailwind-amazona
Open Source

next-tailwind-amazona

# Build Nextjs ECommerce Website Like Amazon - Tech: Nextjs 13, Next Auth 4 - UI: Tailwind, chart.js, react-chartjs - DB: MongoDB, Mongoose - Payment: PayPal, Stripe - Content Hosting: cloudinary - Deploy: Github, Vercel, MongoDB Atlas ![next amazona](/public/app.jpg) ## Resources - Youtube Video : https://youtu.be/_IBlyR5mRzA - Demo Website :  https://next-tailwind-amazona.vercel.app - Source Code   :  https://github.com/basir/next-tailwind-amazona - Full Course: [basir.thinkific.com](https://basir.thinkific.com/courses/build-ecommerce-website-like-amazon-by-next-js?coupon=SAVE90) ## What you will learn - NextJS basics like setting up project, navigating between pages and data fetching - NextJS advanced topics like dynamic routing, image optimization,  SSG and SSR - Tailwind CSS framework to build responsive website using custom theme, animation and carousel - ReactJS including decomposing components, context API and hooks - Next Auth package to authenticate customers and admin users - MongoDB and Mongoose to save and retrieve data like products, orders and users - PayPal developer api to make online payment - Deploy web applications on servers like Vercel and Netlify ## Full Course Get this course by 90% discount on Thinkific: https://basir.thinkific.com/courses/build-ecommerce-website-like-amazon-by-next-js?coupon=SAVE90 ## Run Locally 1. Clone repo ```shell $ git clone [email protected]:basir/next-tailwind-amazona.git $ cd next-tailwind-amazona ``` 2. Create .env File - duplicate .env.example and rename it to .env 3. Setup MongoDB - Local MongoDB - Install it from [here](https://www.mongodb.com/try/download/community) - In .env file update MONGODB_URI=mongodb://localhost/amazona - OR Atlas Cloud MongoDB - Create database at [https://cloud.mongodb.com](https://cloud.mongodb.com) - In .env file update MONGODB_URI=mongodb+srv://your-db-connection 4. Install and Run ```shell npm install npm run dev ``` 5. Seed Data - Run this on browser: http://localhost:5000/api/seed - It returns admin email and password and 6 sample products 6. Admin Login - Run http://localhost:3000/login - Enter admin email and password and click Login ## Lessons 1. Introduction 2. Install Tools 3. Create Next App 4. Publish to Github 5. Create Website Layout 1. create layout component 2. add header 3. add main section 4. add footer 5. add tailwind classes 6. List Products 1. add data.js 2. add images 3. render products 7. Create Product Details 1. create product page 2. create 3 columns 3. show image in first column 4. show product info in second column 5. show add to cart action on third column 6. add styles 8. Handle Add To Cart 1. define react context 2. define cart items state 3. create addd to cart action 4. add reducer 5. create store provider 6. handle add to cart button 9. Create Cart Page 1. create cart.js 2. use context to get cart items 3. list items in cart items 4. redirect to cart screen after add to cart 10. Update Quantity In The Cart 1. add select box for quantity 2. handle select box change 11. Save Cart Items 1. install js-cookie package 2. save and retreive cart items in cookies 12. Create Login Form 1. install react hook form 2. create input boxes 3. add login button 13. Connect To MongoDB 1. install mongoose 2. install mongodb or use mongodb atlas 3. save connection url in .env file 4. create db utils file 5. create sample users 14. Create Login API 1. install next-auth 2. create nextauth.js 3. implement signin 4. use signin in login form 15. Add User Menu 1. check user authentication 2. install headlessui 3. show user menu 16. Create Shipping Screen 1. display address fields 2. save address in context 17. Create Payment Method Screen 1. dispaly payment methods 2. save payment method in context 18. Seed sample products 1. create product model in mongoose 2. insert sample products to mongodb 19. Load Products MongoDB 1. load products in home page from mongodb 2. load products in product page from mongodb 3. use product api to check count in stock in add to cart 20. Create Place Order Screen 1. display shipping address 2. display payment method 3. display order items 4. implment create order 21. Create Order Screen 1. implement backend api for order details 2. load order data from backend 3. display order details 22. Create Register Screen 1. add signup api 2. create register page 3. call api on form submit 23. Pay Order By PayPal 1. add paypal button 2. handle payment 3. create backend api 4. update order state 24. Create Order History Screen 1. create my order api 2. create order history component 3. fetch orders and display them 25. Publish On Vercel 1. create vercel account 2. connect to github 3. set next auth and mongodb db in env vars 4. push code to github 26. Update User Profile 1. create profile screen 2. show user info 3. handle update user info 27. Create Admin Dashboard 1. Create Admin Menu 2. create dashboard screen 3. Implement admin summary api 28. List Orders For Admin 1. create orders page 2. create orders api 3. use api in page 29. Deliver Order For Admin 1. create deliver api 2. add deliver button 3. implement click handler 30. List Products For Admin 1. create products page 2. create products api 3. use api in page 31. Create Product Edit Page 1. create edit page 2. create api for product 3. show product data in form 32. Upload Product Image 1. create cloudinary account 2. get cloudinary keys 3. create upload api 4. upload files in edit page 33. Create And Delete Products 1. add create product button 2. build new product api 3. add handler for delete 4. implement delete api 34. List Users For Admin 1. create users page 2. create users api 3. use api in page 35. Add Carousel 1. create featured products 2. feed carousel data 3. show popular products 36. Create Search Page 1. create filters 2. list products 3. show filters

Frontend Templates E-commerce Platforms
243 Github Stars
ecommerce-shopping-cart
Open Source

ecommerce-shopping-cart

# E-commerce Shopping Cart Application Learn React & Redux From 0 to 100 in this course at https://codingwithbasir.com ## Demo Open [Shopping Cart Demo](https://basir.github.io/ecommerce-shopping-cart/) ![Demo](https://basir.github.io/ecommerce-shopping-cart/demo.gif) ## Install ``` $ clone [email protected]:basir/ecommerce-shopping-cart.git $ yarn ``` ## Run Server ``` $ npm install -g json-server Then $ yarn server or $ json-server public/db.json --port 8000 ``` ## Run App ``` $ yarn start ``` Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

Frontend Templates E-commerce Platforms
143 Github Stars