MERN Stack Project | Ecommerce Website Source Code | Youtube Project

Posted at September 10, 2020 12118 Views . 0 Saved .

Hello Friends,

My name is Rizwan Khan. I am creating a MERN Stack Series on my Youtube Channel. So this post is for those who is following my youtube mern stack series for their doubts and problems.

But I would recommed to do not use source code directly if you are planning to learn MERN Stack Series. watch the videos write code step by step it will clear and solve all your problems...


Github Links

Back End Source Code

Admin App Source Code

Flipkart Clone

Coding is an art and I love art
munish lahoria
Error: slugify: string argument expected at replace (E:\shopping-app\mern-back-end\node_modules\slugify\slugify.js:20:13) at exports.addCategory (E:\shopping-app\mern-back-end\src\controller\category.js:27:15) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at exports.adminMiddleware (E:\shopping-app\mern-back-end\src\middleware\index.js:27:5) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at exports.requireSignin (E:\shopping-app\mern-back-end\src\middleware\index.js:12:6) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:281:22 at Function.process_params (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:335:12) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:275:10) at Function.handle (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:174:3)
munish lahoria
How to fix this Error: slugify: string argument expected
dileep bannikatti
slugify: string argument expected. Can u help me fix it ?
Rizwan Khan
slugify requires an string parameter, you are getting this error means your title of the product or category is not correct, comment your backend code snippet where slugify is giving error
munish lahoria
const mongoose = require('mongoose'); const categroySchema = new mongoose.Schema({ name:{ type:String, required:true, trim:true }, slug:{ type:String, required:true, unique:true }, parentID:{ type:String, } }, { timestamps:true}); module.exports = mongoose.model('Category', categroySchema);
munish lahoria
import React, { useEffect, useState } from 'react' import { Button, Col, Container, Row, Modal,} from 'react-bootstrap' import { useDispatch, useSelector } from 'react-redux'; import { addCategory, getAllCategory } from '../../actions'; import Layout from '../../components/Layout' import Input from '../../components/UI/Input'; function Category() { const [show, setShow] = useState(false); const [categoryName, setcategoryName] = useStat
Ichwanul rahman
how to give an error response?
Rizwan Khan
there are different types of error response you can create. for eg, 400, 401, 402, 403.....and so on. expressJs example: res.status(400).json({error}); // Bad Request res.status(401).json({error}); // Unauthorised res.status(402).json({error}); // Payment Required res.status(403).json({error}); // Forbidden res.status(404).json({error}); //Not Found ......and so on. More explanation
i m following your tutorial i fouund some problem but i dont know how
Jorge Santos
I'm following your flikart tutorial, I found some problems that had in my backend code and decided to use your BackEnd and try only FrontEnd. Download on your Github the Admin-App and RestServer but there is an interaction problem between them ... I can't add products with images, so adding without image with product index repetition error ... You can help me, thanks.
Rajesh Banoth
Thanq for this great tutorial, actually iam facing a issue while uploading product details something like missing credentials in config if using AWS_config_file,set aws_sdk_load_config=1,can you please help me to sort out this issue
Pavan Srinivas
app.listen(process.env.PORT, () => { console.log(`Server is running on port ${process.env.PORT}`);}); and run git bash to check the server it gives this result server is running on port $index.server.js instead of server is running on port 2000
yeng moua
× TypeError: Cannot read property 'map' of undefined Orders src/containers/Orders/index.js:37 34 | console.log({order}) 35 | 36 | return ( > 37 | <Layout sidebar> | ^ 38 | 39 | { 40 |, index) => ( View compiled ? 23 stack frames were collapsed. (anonymous function) src/actions/initialData.action.js:22 19 | type: productConstants.GET_ALL_PRODUCTS_SUCCESS, 20 | payload: { products }, 21 | }); > 22 | dispatch({ | ^ 23 | type: orderConstants.GET_CUSTOMER_ORDER_SUCCESS, 24 | payload: { orders }, 25 | });
Rizwan Khan
you are not getting orders data in api call
yeng moua
Rizwan Khan
plz check the latest code
Saurabh Behra
how to give access to admin and user both for same route ?
Rizwan Khan
dont put userMiddleware or adminMiddleware check in routes instead create a new middleware for both user and admin like userAdminMiddleware
Saurabh Behra
ok thanks
cool way
I am not getting product details in flipkart-clone, and in my console i am getting infinite data.
Rizwan Khan
bro show us your code in a post and share your post link instead of comment like this no one can understand
jaito tom
sir please add payment methods also.
Rizwan Khan
In this series we will focus on Cash on delivery later we will come with a plan of adding third party payment gateways
branded k
In this project , one product can create multiple times ....
Rizwan Khan
I will improve it
Saurabh Behra
how to add total amount in cart ?
Rizwan Khan
we have not finished cart work yet in this project, i will soon videos about it. stay in touch
Saurabh Behra
sir can you make tutorial on razorpay implementation in mern project ?
Rizwan Khan
Not in this project but i might create a video about razorpay
Ervan Rahadian
My improvement code for numbering table in products admin dashboard. /* Table */ table { counter-reset: row-num-1; } table tr { counter-increment: row-num; } table tr td:first-child::before { content: counter(row-num) "."; }
Rizwan Khan
Thank you so much
tuanvu ngo
Thanks for the knowledge you have shared about Mern Stack. in this video category and sub category, i got an error : slugify: string argument expected. Can u help me fix it ?
Rizwan Khan
I think it is fixed already