Finally all the pieces are coming together. It's like watching movie where someone is trying to solve a mystery. Thank You Sir for this amazing explanation.
00:03 Logic building is achieved through real-world software projects 02:06 Logic building exercise helps in breaking down problems into small steps 05:40 Validation and file checking are important steps in register controller. 07:36 Extract URL from the response and check for successful avatar upload 11:23 The user details are extracted from the request body with a destructure operation 13:19 Testing the data using Postman 17:16 To use the uploaded file in the register route, add the upload middleware and use the 'fields' option to accept multiple files. 19:01 Creating an array with two objects for accepting avatar and cover image files. 22:36 Using the dot sum method to check if fields are empty 24:24 Checking validation and user registration in a JavaScript code 27:57 Retrieve user email based on username 29:47 Logic building for registering controller 33:22 Upload cover image and avatar image 35:15 Upload your file on cloud using a method 38:49 Creating an entry in the database with Avatar object 40:41 Ensure validation of cover image and handle cases when it is missing. 44:07 Use Find by ID to find a user and ensure successful creation 46:04 Creating a properly structured API response 49:44 Creating a new object with given status code and data 51:33 Register controller and bug fixes
3:53 Register User: 1. Get the data from req.body and check if all fields are present (ex: username, email, password) 2. Check in the db, if a user with provided email is already present or not. 3. If present, then return. If not, then proceed further. 4. Create a new user in the db with provided details from req.body. 5. Send a success message to client.
Hitesh sir , i have been learning coding from many indian channels but your way of teaching and selection of words is unique and next level.. now a days i only visit chai aur code + hitesh choudhary . thanks and love from pakistan 💓
It's a Top level Explanation and Advanced level teaching , Actually Hitesh sir is teaching us how to write code in professional standards . I bet you will not find such type of content in RUclips . thank you so much Hitesh sir . 💐
steps: 1. Get required fields from user. 2. Validate the received fields. 3. Check user already present in db or not. If yes don't save data to db and send a response to user. 4. If not then hash the password and save data to database. 5. Generate access token 6. send response with status code
bhaiya industry experience matter karta hai aaj kal ke bhaiya didi ki tarah nahi production me bhale hi ek bhi project na kiye ho lekin gayan denge lamba . keval tag laga kar . mujhe to ye nahi samajh aata bache aise logo se kya sikhte hai bhai jo khud kuchh ukhada na ho vo dusro ko ukhadna kya hi sikhayega . isliye mai un logo se door rahta hai .
Sir big fan of you , never stop teaching us , In Sha Allah aap k subscribers bohot barh janay hain, ap ki serires seriously best serires hain, love from Pakistan
3:58 // 1. taking fields required for register by req.body // 2. check if user already exists in the database // 3. password validation // 4. hashing the password // 5. save the avatar and coverimage to local server and then to cloudinary // 6. save the data to mongodb
I saw your first video at the college wallah channel and I must say I've never met anyone like you before I've been a fan of your teaching style from day one and I started following you and till now I've watched all your videos. Thank you so much for the amazing content. Love You 3000 ❤
for rgistering the user 1.take the data from the user 2.validate the given data 3.if the data is valid then store it your DB 4.then send response to client that registration is succesfull
1. first the user send the data 2. then we have to take the data from body 2.1, check if all required fields are available or not 3. then in our regsiteration model we have to find the user if present in it then we return without registering the user 4. if user not present we create the user in the database 5. then we sent the message that user created successfully
then in our regsiteration model we have to find the user if present in it then we return without registering the user +++ in this case we return login method
i don't think the step 3 is need because in user model we put the unique email and username with unique : true if there is a user with same username or email id in the db then mongoose should return error and then we just pass that error to the user/client
3:49 - assignment 1. De-Structure Data from req 2. Check if user already exist 3. check for unique username 4. decrypt the password. 5. Generate jwt token 6. re-direct go home page
for regestration we will take data from frontend ,where we can take data like name,username,email, and password. second from my view it will check this user is exist or not if that user is existed it shows some thing like this use has benn already created .so we make condition for that or write code for that . this user is unique so we wll take his password and hash. and then it shows users has been created . this much i have think. in my first view, now its time to check what hitesh sir will teaches us.
bohat achay lectures hain ap k sir .... post man main jahan ap url type kr ray hain us k agay cancel ka button hai responce ko stop krnay k lia or agar server restart krtay hain tab b post man ka request standing process stop ho jata hai ... baki love you sir g production level ka parhanay k lia😍😍😍😍😍
24:34 We can also check the fields whether it is empty or not in this way if(!fullname || !username || !email || !password) { throw new ApiError(400, "All fields are required!"); }
Better way can be to check it in some() function `if( [username,fullName,email,password].some((field) => field?.trim() === "" || field === undefined) ){ throw new ApiError("Please fill all fields",400); }` i was confused bcz of this for 4 days🥲
steps to register user step 0) get input from user in frontend or using thunder client.. step1) making schema and linking it. through routes step2) then connecting with database mongodb atlas. step3) testing it''s working.
3:58 To write the logic for register a user these are the following steps 1. Get all the data from request body and file (for avatar) 2. Validation of data (whether the data is empty / valid or not) (we can also create a validator middleware where each request values will be validated before getting it on our register controller0 3. Check if the user already exists in the database or not 4. Create a new user 5. Remove sensitive data (password, token, __v, etc) 6. Return the response
4:05 Steps for Registration: 1. Take Details from the user 2. Check check where the primary key isn't duplicated in the database 3. Add the data of the user into the database.
3:49 to register user 1) we take users details 2) check if user already exist or not 3) so now if user not exist we create a user in db and hashing the password which user given us hashing that and saving and giving access to further pages to users along passing jwt token to user
Guys ... Plz don't ignore the hardwork of Hitesh sir .. just bcz he's comfortably teaching us...If you are following this playlist.. by now , you might already have known what a mind-blowing series this is ! All pieces are coming together... This is undoubtedly the best course for backend foundation out there ❤.. plz keep supporting sir .. hope sir won't delete this masterpiece as it's still very underrated.. we have to admit : we all are extremely lucky that this level of content is freely available for us ❤
1. First we try to get the user data from req.body 2.then once we got data we can validate it with some middleware if data we are getting is in correct format 3. Then import user from model to create new user and store it in our database and use try and catch 4. If success then send status of 200 and some messages like successful register 5. If not then some status code like internal server error or failed to register
4:08 - 1. take the data from the fields from frontend 2. Check whether the given information are correct type and required fields are filled or not 3. If not then give the error and say to rewrite the required fields 4. if everything is correct then encryption of password should be taken care and all data are saved in db or there is any error 5. if any error resolve it and if not then successful message shown to user
finally all the dots are connecting now. I have learned react from your Chai aur react course. Thank you so much for providing such a quality learning courses. You are doing a great job 😀❤
4:08 1.get data from users 2.validate all the details entered by users 3.check if the user data is already present in db, if yes then send response to user 4. else store the details in db (hash password, generate access tokens) 5. send msg that user created successfully
sir amazing videos i am not building this same project just learn from this project and apply it to my project. by the way I am building CRM system enjoying your work.
1. send data from th user. 2. check if the required fields are there. 3. check if there is any duplicate entry for the unique fields in the database. ( we can send the required message if anything missing or duplicate entry) 4. If all data is fine, then we save the user in the database, and send the success message.
3:57 -1. we have to get the data from request, 2. send the data to the data base, 3. get the response from the data base, 4. send the response to frontend.
step 1 : sabse pehle name and apni info ko data base mein store karega step 2: uske baad phir ham uski image profile wagira ko handle karenge step 3: then fir woh apna content wagaira upload kar sakta hai step 4: or woh jo bhi activities karenga usko ham data base mein sav ekarenge
1. Ask the user Data from FE 2. Access the data in BE 3. check if all required field are given with correct format 4. check if the user is already created 5. if not create a new user 6. send the user message that he has been created
Steps to register the user 04:00 1. take all the name email etc from user 2. add them in a veriable 3. use checks for any error handlings 4. send to routes page and then 5. write function to send it to database
So after all that time learning coding, I can finally say I know how different pieces of web development come together to form an application. Kudos to the very Guru of programming for such an amazing lecture.
Hitesh sir, I have been learning coding from many Indian channels but your way of teaching and selection of words is unique and next level. now a days I only visit chai aur code. thanks and love from Pakistan.
@4:05 1. User sends a get request to the register page 2. User fills in details. Validation is done at the frontend. 3. User clicks the submit button. 4. A post request is generated. 5. Server finds the route. Triggers the controller associated with the create user. 6. The User creation function is called. 7. Password is processed and encrypted for the db. 8. JWT Tokens are generated specified for the user. 9. A success response is generated. We use the APIResponse class. And the user is directed to the home page. 10. If A failure occurs at 7,8 we must handle the error and redirect the user to another route.
4:15 - Steps: 1. Get the details from user 2. Fields validation 3. Check if same email is already present if yes then say user is already present. 4. If not, save the password to db after bcrypt.
first step make middle ware that trigger the route. ex. app.use("/register", routename) step 2 handle the route like give method post in the routname.js and give the function that will execute using the contrroler function step 3 write a controller function logic means the mongodb.connect import mongodb to save the data import the schema of the user login so that the monogodb can be connect and for the lmage we have 2 use the utility of the cloudinarry that we already made the earlier
best course in terms of explanation, and how he is not wasting time in explaining js instead focusing on explaining the actual logic and db related terms 🔥🎉
Thoda sa chota rakhenge is video ko bolkr 1 ghnte ka lecture bna dete ho Sir hamesha 😂😂. Btw hats off to your efforts and Thank you very much sir for this great production level content.
03:54 steps for registrin user as below step1 : define fields which we have to take from user like username,email,password,avtarimage etc. step2: after getting value first check alredy user exists or not if user exists then give error regarding to that and validate other feild also step3:hash password and save data step4:genrtae acesstoken and also save token in cokkies to know weater user is login or logout
3:53 Steps to register user 1: store user text details in variables 2: store user avatar and cover image in temp directory 3: push images to cloudinary from temp directory using multer 4: push user text details and cloudinary file urls to Mongo DB
4:08 Steps to Register Users 1: Accept data from user such email, name, password 2: check if user already exists 3: if not, encrypt the password 4: store the user
Fantastic tutorial on logic building and register controller! This video provides a clear, step-by-step guide to mastering problem-solving skills in software projects. Highly recommended for anyone looking to enhance their coding knowledge.
1.take all required values for registrering (if required,do validations) 2.call the function which handle register user 3.inside the function call the api to create user
i was so dissapointed watching a bunch of videos here and there for backend.But truth be told this playlist made my concept crystal clear.I must appriciate your teaching process .You divide each concept in chunks and explain all of the working flow of codes and each logic.Take love from bangladesh.Your are a gem that i found on youtube.This type of course should not be free,but luckily people like you helping us by teaching free.Thank you❤❤
3:55 1. Deconstruct the request obj; 2. check if all the required properties are provided and valid 3. get avatar with multer middleware 4. store it in the public temp folder 5. then store the avatar in the cloudinary or other s3 buckets 6. then unlink the avatar using fs.unlink method 7. then store the link as a string in the db 8. create the user 9. return a response with status code, token using the methods we defined in the model file and a user object for the frontend to work with.
04:00 Homework: 1. Take the data entered by the user 2. Validate the data and send the error message if any validation fails. 3. Once validated, send the data to the database to store user data. 4. Redirect the user to homepage if required to the login page.
Such a nice video on controller. I learnt how to think properly, when you asked us to pause and think I paused and only made 4 steps but there is so much more to do. Such a beautiful logic written
if you are facing trouble in understanding the video. 25:00 stop here take a break of 5 mins Come back And watch the rest of the video. ( it’s nothing but pomodoro technique )
-03:56-- step 1:- get the data from the user. step 2:- validate all data according to requirement. step 3:- after complete all validation create the user in database step 4:- return response data
chai aur code me hi possible h, chota rahte h video bol ke 52:48 min ka padhaa diya apne sir ji aur pata v nai laga Hats off to you sir ji You rock, i tried to learn backend but i stopped multiple time but your playlist is soo amazing, just wanted to watch next video and learn. Thank you soooo much for such a free course 🙏
4:00 1>humko ye dekhna padega ki user register hai ki nahi . agar register hai toh . login route pr hmko redirect karna hai . agar user regisster nahi hai toh hum ko user se data lena hai and db me store karna hai ? 2> jab user register ho jye toh userImage ko humko clooudinary par upload karnaa hai 3>cloudinary mae uplload karne ke baad humko imgs temp file se remove karni hai 4> user jab register ho jye tab user ko congrats message bhej na hai
I just wanna say that your videos are best for a beginner.....best to start with any course....the context it provides is straight forward that i find confusing elsewhere...i don't get the things at first but watching your videos your tutorials does provide the confidence that I can do it...and that just means more than anything to me.... Thankyou ❤
Best video sir ❤❤. Finally i got to know that why we were writing code for diffrent utilities like multer and cloudinary and Api response etc ....... 🤣🤣❤❤
steps to register 1. get user details from frontend 2. validation - not empty 3. check if user already exists: username, email 4. check for images, check for avtar 5. upload them to cloudinary, avatar 6. create user object - create entry in db 7. remove password and refresh token field from resonse 8. check for user creation 9. return response
get user details from frontend validation - not empty check if user already exists: username, email check for images, check for avatar upload them to cloudinary, avatar create user object - create entry in db remove password and refresh token field response check for user creation return response
3:50 1.Get the details of user 2. Check whether all details are received from the user 3. Check the format of the data received by the user so that it matches the given requirements 4. Set it in the database as a new entry
3:50 First get the data from req body( frontend), which we want to insert in db for registering the user, Now , check whether the data already exist in db or not If data exist return user exist else insert the data into db
1.) the user sends data about itself under specific keys. 2.) the function takes the specific input from the user, parses it 3.) checks if the user with those details is already present or not 4.) adds those fields of data to the database, under a try catch handle.
4:00 1. Agar hame register karna hai user ko to sabse pehle user ka data hona chahiye jo ki form ya postman se post method ke through aa gayi let's say, yaha tak to waise frontend waalon ko dekhna hai data kaise bhejenge. 2. Achha ab data aa gayi hai to kya directly save kar de mongo db me ya kuchh aur operation perform karne ki jarurat??? data me avatar aur user ki image bhi aayegi ab vo data ham directly mongodb me save to kar nahi rahe, usse ham pehle server ke disk storage pe save kar rahe hain and then cloudinary pe save kar rahe hain, to jab bhi ye data aayegi uske liye ek check lagakar(basic if statement) ham multer aur cloudinary waala middleware run kar lenge. 3. Ab password save karne ke liye userSchema me jo pre methods hain wo run karne honge(kaise hoga ye to video dekh ke hi pata chalega). 4. Mujhe lagta hai hamne sab kar liya hai ab tak, to ab data save kar lete hain. req.body se data le liya aur save karte gaye aur password, avatar aur image ko save karte waqt dhyan rakhna hoga kyunki waha hashed password aur url save karni hai. Mera logic to filhaal itna hi keh raha hai baaki video dekh ke samajh aayegi, aisi aur kya chizein hain jo miss ho gayi. BTW mujhe bohot jyada darr lagta thha production ke code se, MVC pattern use karke jab bhi likhte hain samajh hi nahi aata but through this playlist abhi tak aisi koi dikkat aayi nahi hai aur ab hitesh sir pe aur khud pe bharosa hai aage bhi aisi koi dikkat aayegi nahi.
Finally all the pieces are coming together. It's like watching movie where someone is trying to solve a mystery. Thank You Sir for this amazing explanation.
Literally i am also feeling this
Sir aap jabse hindi language me aaye ho, aapne bawaal hi macha diya hai market mein ❤❤😮
Bilkul shi kaha bro 🎉
00:03 Logic building is achieved through real-world software projects
02:06 Logic building exercise helps in breaking down problems into small steps
05:40 Validation and file checking are important steps in register controller.
07:36 Extract URL from the response and check for successful avatar upload
11:23 The user details are extracted from the request body with a destructure operation
13:19 Testing the data using Postman
17:16 To use the uploaded file in the register route, add the upload middleware and use the 'fields' option to accept multiple files.
19:01 Creating an array with two objects for accepting avatar and cover image files.
22:36 Using the dot sum method to check if fields are empty
24:24 Checking validation and user registration in a JavaScript code
27:57 Retrieve user email based on username
29:47 Logic building for registering controller
33:22 Upload cover image and avatar image
35:15 Upload your file on cloud using a method
38:49 Creating an entry in the database with Avatar object
40:41 Ensure validation of cover image and handle cases when it is missing.
44:07 Use Find by ID to find a user and ensure successful creation
46:04 Creating a properly structured API response
49:44 Creating a new object with given status code and data
51:33 Register controller and bug fixes
are you using merlin for comment?
@@abcxyz-b3h yes bro !!
3:53
Register User:
1. Get the data from req.body and check if all fields are present (ex: username, email, password)
2. Check in the db, if a user with provided email is already present or not.
3. If present, then return. If not, then proceed further.
4. Create a new user in the db with provided details from req.body.
5. Send a success message to client.
I can say after analysing my way,
Anyone can learn as calmly U say..
I have watched a video U made one day
U R respected as well as "they"
🌟🌟🌟🌟🌟😊
Again ,The most beautiful line of this vedio is - "jitna code likhne me time nhi bitate us se jyade debugging me aap time bitate hai"🙏🙏❤
Best Development Series I have seen till yet with great level of work. Hats off to you 👍👍
From Bangladesh 🇧🇩!
Thanks to Bollywood for teaching me hindi.....this course is soo insane, I can't believe its free.
Thanks Hitesh Sir!
Hitesh sir , i have been learning coding from many indian channels but your way of teaching and selection of words is unique and next level..
now a days i only visit chai aur code + hitesh choudhary .
thanks and love from pakistan 💓
It's a Top level Explanation and Advanced level teaching ,
Actually Hitesh sir is teaching us how to write code in professional standards .
I bet you will not find such type of content in RUclips .
thank you so much Hitesh sir . 💐
steps:
1. Get required fields from user.
2. Validate the received fields.
3. Check user already present in db or not. If yes don't save data to db and send a response to user.
4. If not then hash the password and save data to database.
5. Generate access token
6. send response with status code
this is one of the best series on youtube
itna inDepth toh Alpha &delta ke paid cources me bhi nahi hai
mazzaa aagya 👌👌👌👌
bhaiya industry experience matter karta hai aaj kal ke bhaiya didi ki tarah nahi production me bhale hi ek bhi project na kiye ho lekin gayan denge lamba . keval tag laga kar . mujhe to ye nahi samajh aata bache aise logo se kya sikhte hai bhai jo khud kuchh ukhada na ho vo dusro ko ukhadna kya hi sikhayega . isliye mai un logo se door rahta hai .
Sir big fan of you , never stop teaching us , In Sha Allah aap k subscribers bohot barh janay hain, ap ki serires seriously best serires hain, love from Pakistan
3:58
// 1. taking fields required for register by req.body
// 2. check if user already exists in the database
// 3. password validation
// 4. hashing the password
// 5. save the avatar and coverimage to local server and then to cloudinary
// 6. save the data to mongodb
I saw your first video at the college wallah channel and I must say I've never met anyone like you before I've been a fan of your teaching style from day one and I started following you and till now I've watched all your videos. Thank you so much for the amazing content. Love You 3000 ❤
for rgistering the user
1.take the data from the user
2.validate the given data
3.if the data is valid then store it your DB
4.then send response to client that registration is succesfull
1. first the user send the data
2. then we have to take the data from body
2.1, check if all required fields are available or not
3. then in our regsiteration model we have to find the user if present in it then we return without registering the user
4. if user not present we create the user in the database
5. then we sent the message that user created successfully
then in our regsiteration model we have to find the user if present in it then we return without registering the user +++ in this case we return login method
i don't think the step 3 is need because in user model we put the unique email and username with unique : true
if there is a user with same username or email id in the db then mongoose should return error and then we just pass that error to the user/client
3:49 - assignment
1. De-Structure Data from req
2. Check if user already exist
3. check for unique username
4. decrypt the password.
5. Generate jwt token
6. re-direct go home page
sir hats offf!!!! 15 minute se toilet laga hay...itna interesting lag raha hay...uthne ka mann nehi kar raha...
3:50
Step 1: Take input from the User
Step 2: Send the data to DB
Step 3 : Feedback to the users it success or have error
for regestration we will take data from frontend ,where we can take data like name,username,email, and password.
second from my view it will check this user is exist or not if that user is existed it shows some thing like this use has benn already created .so we make condition for that or write code for that . this user is unique so we wll take his password and hash. and then it shows users has been created . this much i have think. in my first view, now its time to check what hitesh sir will teaches us.
bohat achay lectures hain ap k sir ....
post man main jahan ap url type kr ray hain us k agay cancel ka button hai responce ko stop krnay k lia or agar server restart krtay hain tab b post man ka request standing process stop ho jata hai ... baki love you sir g production level ka parhanay k lia😍😍😍😍😍
24:34 We can also check the fields whether it is empty or not in this way
if(!fullname || !username || !email || !password) {
throw new ApiError(400, "All fields are required!");
}
LCO course method
Better way can be to check it in some() function
`if(
[username,fullName,email,password].some((field) => field?.trim() === "" || field === undefined)
){
throw new ApiError("Please fill all fields",400);
}` i was confused bcz of this for 4 days🥲
Absolutely the most in depth and easy to understand backened series on youtube, Keep it up sir❤
Big fan sir
Your teaching is very help full to me.
Big respect for you sir🙏🙏🙏
steps to register user
step 0) get input from user in frontend or using thunder client..
step1) making schema and linking it. through routes
step2) then connecting with database mongodb atlas.
step3) testing it''s working.
understood++
Aaj puri clarity aa gayee ki kyu hum utils bana rahe the. Bohot kuch sikhne ko mila. ❤❤
3:58 To write the logic for register a user these are the following steps
1. Get all the data from request body and file (for avatar)
2. Validation of data (whether the data is empty / valid or not) (we can also create a validator middleware where each request values will be validated before getting it on our register controller0
3. Check if the user already exists in the database or not
4. Create a new user
5. Remove sensitive data (password, token, __v, etc)
6. Return the response
4:05 Steps for Registration:
1. Take Details from the user
2. Check check where the primary key isn't duplicated in the database
3. Add the data of the user into the database.
3:49 to register user
1) we take users details
2) check if user already exist or not
3) so now if user not exist we create a user in db and hashing the password which user given us hashing that and saving and giving access to further pages to users along passing jwt token to user
Guys ... Plz don't ignore the hardwork of Hitesh sir .. just bcz he's comfortably teaching us...If you are following this playlist.. by now , you might already have known what a mind-blowing series this is ! All pieces are coming together... This is undoubtedly the best course for backend foundation out there ❤.. plz keep supporting sir .. hope sir won't delete this masterpiece as it's still very underrated.. we have to admit : we all are extremely lucky that this level of content is freely available for us ❤
1. First we try to get the user data from req.body
2.then once we got data we can validate it with some middleware if data we are getting is in correct format
3. Then import user from model to create new user and store it in our database and use try and catch
4. If success then send status of 200 and some messages like successful register
5. If not then some status code like internal server error or failed to register
4:08 - 1. take the data from the fields from frontend
2. Check whether the given information are correct type and required fields are filled or not
3. If not then give the error and say to rewrite the required fields
4. if everything is correct then encryption of password should be taken care and all data are saved in db or there is any error
5. if any error resolve it and if not then successful message shown to user
finally all the dots are connecting now. I have learned react from your Chai aur react course. Thank you so much for providing such a quality learning courses. You are doing a great job 😀❤
4:08
1.get data from users
2.validate all the details entered by users
3.check if the user data is already present in db, if yes then send response to user
4. else store the details in db (hash password, generate access tokens)
5. send msg that user created successfully
Only the hashing will be done token will not be generated as it is method I think we need to call them
sir amazing videos i am not building this same project just learn from this project and apply it to my project. by the way I am building CRM system enjoying your work.
1. send data from th user.
2. check if the required fields are there.
3. check if there is any duplicate entry for the unique fields in the database.
( we can send the required message if anything missing or duplicate entry)
4. If all data is fine, then we save the user in the database, and send the success message.
3:57 -1. we have to get the data from request, 2. send the data to the data base, 3. get the response from the data base, 4. send the response to frontend.
In paid courses you can't get this treasure.
Hats off Sir ❤
best educational channel in the world ❤
Best series of javascript backed on youtube... Aag laga di bhaiya ji 🎉
Was a great video, abhi tk lag rha tha ki kya chal rha h ye backend me... But now it is, kya mast chal rha h Backend Course 😸
step 1 : sabse pehle name and apni info ko data base mein store karega
step 2: uske baad phir ham uski image profile wagira ko handle karenge
step 3: then fir woh apna content wagaira upload kar sakta hai
step 4: or woh jo bhi activities karenga usko ham data base mein sav ekarenge
shortest video i ever seen. I didn't realize where the one hour goes. Thankyou so much sir...
1. Ask the user Data from FE
2. Access the data in BE
3. check if all required field are given with correct format
4. check if the user is already created
5. if not create a new user
6. send the user message that he has been created
Steps to register the user 04:00
1. take all the name email etc from user
2. add them in a veriable
3. use checks for any error handlings
4. send to routes page and then
5. write function to send it to database
So after all that time learning coding, I can finally say I know how different pieces of web development come together to form an application. Kudos to the very Guru of programming for such an amazing lecture.
Wow the most in depth user registration video ever......
Hitesh sir, I have been learning coding from many Indian channels but your way of teaching and selection of words is unique and next level.
now a days I only visit chai aur code.
thanks and love from Pakistan.
@4:05
1. User sends a get request to the register page
2. User fills in details. Validation is done at the frontend.
3. User clicks the submit button.
4. A post request is generated.
5. Server finds the route. Triggers the controller associated with the create user.
6. The User creation function is called.
7. Password is processed and encrypted for the db.
8. JWT Tokens are generated specified for the user.
9. A success response is generated. We use the APIResponse class. And the user is directed to the home page.
10. If A failure occurs at 7,8 we must handle the error and redirect the user to another route.
4:15 - Steps:
1. Get the details from user
2. Fields validation
3. Check if same email is already present if yes then say user is already present.
4. If not, save the password to db after bcrypt.
aaj main 20 tak complete krke hi jauga ✌✌😎😎
first step make middle ware that trigger the route. ex. app.use("/register", routename)
step 2 handle the route like give method post in the routname.js and give the function that will execute using the contrroler function
step 3 write a controller function logic means the mongodb.connect import mongodb to save the data import the schema of the user login so that the monogodb can be connect and for the lmage we have 2 use the utility of the cloudinarry that we already made the earlier
best course in terms of explanation, and how he is not wasting time in explaining js instead focusing on explaining the actual logic and db related terms 🔥🎉
Thoda sa chota rakhenge is video ko bolkr 1 ghnte ka lecture bna dete ho Sir hamesha 😂😂. Btw hats off to your efforts and Thank you very much sir for this great production level content.
03:54 steps for registrin user as below
step1 : define fields which we have to take from user like username,email,password,avtarimage etc.
step2: after getting value first check alredy user exists or not if user exists then give error regarding to that and validate other feild also
step3:hash password and save data
step4:genrtae acesstoken and also save token in cokkies to know weater user is login or logout
your experience is next level sir, they way you teach fundamentally..
3:53
Steps to register user
1: store user text details in variables
2: store user avatar and cover image in temp directory
3: push images to cloudinary from temp directory using multer
4: push user text details and cloudinary file urls to Mongo DB
First take req from user
Validate on req that required things are there
Check password validation
Save data on db
4:08 Steps to Register Users
1: Accept data from user such email, name, password
2: check if user already exists
3: if not, encrypt the password
4: store the user
Step 1: user data lenge based on our user schema
Step 2: condition checking
Step 3 : sending response
Step 4 : error handling
Fantastic tutorial on logic building and register controller! This video provides a clear, step-by-step guide to mastering problem-solving skills in software projects. Highly recommended for anyone looking to enhance their coding knowledge.
1.take all required values for registrering
(if required,do validations)
2.call the function which handle register user
3.inside the function call the api to create user
i was so dissapointed watching a bunch of videos here and there for backend.But truth be told this playlist made my concept crystal clear.I must appriciate your teaching process .You divide each concept in chunks and explain all of the working flow of codes and each logic.Take love from bangladesh.Your are a gem that i found on youtube.This type of course should not be free,but luckily people like you helping us by teaching free.Thank you❤❤
Your Series is as best as the straight drive of Sachin Tendulkar sir
now, after 12 videos , it is making sense , thanks for so much efforts sir
Hanji ek Dil h kitni baar jitenge ❤
App aisee hii hmara sath dete rahiyee hum mehnat krte rehengee ❤️
Sir agar video ban gyi hai to aaj hi premiere kar dijiye na, 35h baad ka premiere kyon set kiya hua hai..
Taki consistency bni rhe
3:55
1. Deconstruct the request obj;
2. check if all the required properties are provided and valid
3. get avatar with multer middleware
4. store it in the public temp folder
5. then store the avatar in the cloudinary or other s3 buckets
6. then unlink the avatar using fs.unlink method
7. then store the link as a string in the db
8. create the user
9. return a response with status code, token using the methods we defined in the model file and a user object for the frontend to work with.
04:00 Homework:
1. Take the data entered by the user
2. Validate the data and send the error message if any validation fails.
3. Once validated, send the data to the database to store user data.
4. Redirect the user to homepage if required to the login page.
Such a nice video on controller. I learnt how to think properly, when you asked us to pause and think I paused and only made 4 steps but there is so much more to do. Such a beautiful logic written
if you are facing trouble in understanding the video.
25:00 stop here
take a break of 5 mins
Come back And watch the rest of the video.
( it’s nothing but pomodoro technique )
-03:56-- step 1:- get the data from the user.
step 2:- validate all data according to requirement.
step 3:- after complete all validation create the user in database
step 4:- return response data
chai aur code me hi possible h, chota rahte h video bol ke 52:48 min ka padhaa diya apne sir ji aur pata v nai laga
Hats off to you sir ji
You rock, i tried to learn backend but i stopped multiple time but your playlist is soo amazing, just wanted to watch next video and learn.
Thank you soooo much for such a free course 🙏
🥳The best
3:50 1) user se data lenge 2) data ka validation check karenge 3) database me bhejenge
Amazing, how all earlier explained work and concepts are used to together to write the logic in controller, WOW.
4:00 1>humko ye dekhna padega ki user register hai ki nahi . agar register hai toh . login route pr hmko redirect karna hai . agar user regisster nahi hai toh hum ko user se data lena hai and db me store karna hai ?
2> jab user register ho jye toh userImage ko humko clooudinary par upload karnaa hai
3>cloudinary mae uplload karne ke baad humko imgs temp file se remove karni hai
4> user jab register ho jye tab user ko congrats message bhej na hai
I just wanna say that your videos are best for a beginner.....best to start with any course....the context it provides is straight forward that i find confusing elsewhere...i don't get the things at first but watching your videos your tutorials does provide the confidence that I can do it...and that just means more than anything to me.... Thankyou ❤
finale is coming closer. Best lecture ever
Best Unpaid course which is far better than paid courses.. Thank You Sir
Best video sir ❤❤. Finally i got to know that why we were writing code for diffrent utilities like multer and cloudinary and Api response etc ....... 🤣🤣❤❤
In this video I feel I am learning backend maja aagay sir ❤
Glad to hear that😊☕️
gajab deep coding thi video mai! kuch code difficult th samajhne mai, par worth it hai full on!
00:17 Sir 2 hours me to comment nahi karsaka lekin 2 months me karraha hu. Thank you for this valuable video
Thanks for amazing tutorial. 16:01 Please click on CANCEL button in postman to stop response.
Best video on logic building of course💌
steps to register
1. get user details from frontend
2. validation - not empty
3. check if user already exists: username, email
4. check for images, check for avtar
5. upload them to cloudinary, avatar
6. create user object - create entry in db
7. remove password and refresh token field from resonse
8. check for user creation
9. return response
one of the best video of backend series. Thank you very much sir :)
get user details from frontend
validation - not empty
check if user already exists: username, email
check for images, check for avatar
upload them to cloudinary, avatar
create user object - create entry in db
remove password and refresh token field response
check for user creation
return response
3:50
1.Get the details of user
2. Check whether all details are received from the user
3. Check the format of the data received by the user so that it matches the given requirements
4. Set it in the database as a new entry
3:50 First get the data from req body( frontend), which we want to insert in db for registering the user,
Now , check whether the data already exist in db or not
If data exist return user exist
else insert the data into db
This is the best backend series online!!
Thanks 🤗☕️
3:49 :- take input from user then store the input in database and before storing create model for registration
1.) the user sends data about itself under specific keys.
2.) the function takes the specific input from the user, parses it
3.) checks if the user with those details is already present or not
4.) adds those fields of data to the database, under a try catch handle.
outstanding explanation sir har ek word samajh aaya : )
4:00 1. Agar hame register karna hai user ko to sabse pehle user ka data hona chahiye jo ki form ya postman se post method ke through aa gayi let's say, yaha tak to waise frontend waalon ko dekhna hai data kaise bhejenge.
2. Achha ab data aa gayi hai to kya directly save kar de mongo db me ya kuchh aur operation perform karne ki jarurat???
data me avatar aur user ki image bhi aayegi ab vo data ham directly mongodb me save to kar nahi rahe, usse ham pehle server ke disk storage pe save kar rahe hain and then cloudinary pe save kar rahe hain, to jab bhi ye data aayegi uske liye ek check lagakar(basic if statement) ham multer aur cloudinary waala middleware run kar lenge.
3. Ab password save karne ke liye userSchema me jo pre methods hain wo run karne honge(kaise hoga ye to video dekh ke hi pata chalega).
4. Mujhe lagta hai hamne sab kar liya hai ab tak, to ab data save kar lete hain. req.body se data le liya aur save karte gaye aur password, avatar aur image ko save karte waqt dhyan rakhna hoga kyunki waha hashed password aur url save karni hai.
Mera logic to filhaal itna hi keh raha hai baaki video dekh ke samajh aayegi, aisi aur kya chizein hain jo miss ho gayi.
BTW mujhe bohot jyada darr lagta thha production ke code se, MVC pattern use karke jab bhi likhte hain samajh hi nahi aata but through this playlist abhi tak aisi koi dikkat aayi nahi hai aur ab hitesh sir pe aur khud pe bharosa hai aage bhi aisi koi dikkat aayegi nahi.
bro thankyou yaar
The most interesting backend series !!!