How To Build A Google Docs Clone With React, Socket.io, and MongoDB

  Рет қаралды 200,631

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Пікірлер: 259
@zawadahmed9111
@zawadahmed9111 3 жыл бұрын
Now we can sell it to Google so that they can do their interviews in it
@berndeveloper
@berndeveloper 3 жыл бұрын
but doesn't invert a binary tree 😆
@gustavoshigueo
@gustavoshigueo 3 жыл бұрын
I know this really doesn't matter, but if you want an exact A4 paper size you should use these measuraments: width: 21cm; min-height: 29.7cm; Yes, cm is a CSS unit for centimeters
@sidheshwartiwari9834
@sidheshwartiwari9834 3 жыл бұрын
I needed to know this. I am actually coding a packing slip for an e-commerce business. Since they are printable, an A4 size would be great. Thanks!
@gustavoshigueo
@gustavoshigueo 3 жыл бұрын
@@sidheshwartiwari9834 you're welcome! Glad to know I helped :D
@rishabh1S
@rishabh1S Жыл бұрын
Great info 👍🏻
@yooos3
@yooos3 Жыл бұрын
I was so skeptical how is he gonna build something like that in just 46 minutes. But woah! This is amazing and even though I have experience in working with react and socket, still I learned so much! Great video!
@habeeb_a
@habeeb_a Жыл бұрын
yeah me too
@Jonathan_Henderson
@Jonathan_Henderson 3 жыл бұрын
You make creating these projects look so easy! One could only wish to create such an awesome and fluent tutorial
@GavHern
@GavHern 3 жыл бұрын
I recommend you cache the document when you save it and then next time you save it, make sure changes have been made to the document before updating the database. That way you can eliminate unnecessary database writes and API calls.
@patcodingcodester9781
@patcodingcodester9781 3 жыл бұрын
So I implemented this pretty simply with just a let oldData and compared it to the data passed in the saved change function using JSON.stringify(oldData) === JSON.stringify(data) and it works great. But one issue I'm unsure of is what would happen if another browser window accessed the document within the two second window of saving. What would occur? Would it be better to just call this any time a change is made on the doc instead of setting an interval and caching? Wouldn't it be much more consistent that way? Or does this matter? I guess if someone else is accessing the document at that exact moment it is still an open socket so it would be seen by the new user?? I'm confused by this lol
@patcodingcodester9781
@patcodingcodester9781 3 жыл бұрын
Actually that was a potential issue. I did a quick test my self and saw it sometime did not catch all the data. It seems like a small issue but could be problematic with a lot of people. I decided to emit "save-document" right after I emit "send-changes". I kept it a separate emit for ease and to reuse save as a button incase someone doesn't trust the auto save. Either way this fixed the issue for me on a personal testing stand point. I'm sure this would still have errors somehow like with a lot of changes, but maybe ill look into a message queue or something if that's a possible issue
@TheLumiBros
@TheLumiBros 2 жыл бұрын
@@patcodingcodester9781 My guess a collision of some type which is why the caching was recommended.
@xavimb
@xavimb 2 жыл бұрын
I would rather have a throttled function whenever a user changes their content. This way you ensure that 1- DB writes only when changes are made 2- for each text change, you only do one write to the DB
@frankorefice4115
@frankorefice4115 3 жыл бұрын
Funny how I needed this yesterday. Either way, I'm happy there are more videos on this.
@sarvagya-sharma
@sarvagya-sharma 3 жыл бұрын
I saw your project upload on github and knew it was coming!
@CS_parth
@CS_parth Жыл бұрын
Bug : If you are getting double texteditors Fixation : When Strict Mode is on, React will run one extra development-only setup+cleanup cycle before the first real setup. This is a stress-test that ensures that your cleanup logic “mirrors” your setup logic and that it stops or undoes whatever the setup is doing. If this causes a problem, implement the cleanup function.{source: reactdocs}
@SivakD
@SivakD 3 жыл бұрын
I am doing my own little socket app and I mainly came for the explanation of implementing socket which starts at 23:07, but I definitely enjoyed the other parts. Thanks for the good content.
@greenie62
@greenie62 3 жыл бұрын
between your spotify's background refreshing, this background saving and a little useCallback thrown in there, good stuff man. Enjoying these React projects!
@hello-peters
@hello-peters 5 ай бұрын
This is the best channel about Web dev I've ever seen!
@evans8245
@evans8245 3 жыл бұрын
Please, if you're reading this. Learn about operational transformations (OT). A set of algorithms for real-time collaboration. Y'all know sockets are expensive.
@sharpdotexe1660
@sharpdotexe1660 3 жыл бұрын
Kyle never disappoints, great video 👏
@sethurk
@sethurk 3 жыл бұрын
This is actually a great css tutorials as well!
@pallavggupta
@pallavggupta 2 жыл бұрын
This channel is best simply for learning web stuff
@MohamedAshraf-ur1jp
@MohamedAshraf-ur1jp 5 ай бұрын
great video! I would love it if you made a video implementing this with an OT or CRDT library for synchronization.
@aditya_01
@aditya_01 2 жыл бұрын
You really did what your name is "Web dev simplified". Thanks a lot for such a great content.Keep posting .Thanks again 😁
@giantPangolin
@giantPangolin 2 жыл бұрын
Could you do a follow up video explaning how to proceed with the V6 react-router-dom?
@codewithhazem
@codewithhazem 2 жыл бұрын
👇update of react-router-dom v6 👇 import {BrowserRouter as Router,Route,Routes,Navigate,} from "react-router-dom"; // Switch > Routes //Redirect > Navigate // component > element // no more exact path for '/'
@dragonburger5676
@dragonburger5676 3 жыл бұрын
Just incredible work man. Perfectly described and explained. Love this channel
@nicholaspreston9586
@nicholaspreston9586 2 жыл бұрын
Thanks for the Hostinger mention. I'll check it out!
@89stoev
@89stoev 3 жыл бұрын
Super cool , however title is misleading. Google Docs have so much complex stuff like pages , headers , footers , page zones , columns . This is just Quill with save to DB
@DopeCode123
@DopeCode123 2 жыл бұрын
Bro you are just awesome. No comments just awesome. My first point of reference related to MERN or web itself. For me you are the "single source of concept" from the beginning. And I wish I reach your level of expertise very fast
@mirkosedda3196
@mirkosedda3196 3 жыл бұрын
Crazy tutorial! Nice job Kyle!
@adrianohermes
@adrianohermes Жыл бұрын
nice tutorial, how to create multiple pages? if we reach a word limit, we will jump to a new page instead of just increasing the textbox size
@avneet12284
@avneet12284 3 жыл бұрын
Brilliant stuff ! I can imagine the amount of research to pull off something so good.
@konstantinreut2577
@konstantinreut2577 11 ай бұрын
Thank you for the greate tutorial Kyle! It would be wonderful if you could record a video about how to deploy full-stack app to repository. Because it's important to show projects to employer. Thanks in advance!
@msundar661
@msundar661 Жыл бұрын
Unbelievable build in 45 minutes! and very neat explanation. so cool video. Thank you so much bro ❤🍻
@Ribhav.Singla
@Ribhav.Singla Ай бұрын
worth watching!
@mattural20
@mattural20 2 жыл бұрын
This really is a great tutorial, almost a year later. Do know that a good bit has changed re: the "Handling Multiple Documents" chapter of the video…"react-router-dom" has upgraded to v.6 something and changed "Switch" to "Routes" and "Redirect" is now "Navigate", and you have to change the way react allows the jsx to be used.
@mhiro216
@mhiro216 2 жыл бұрын
Thank you for the excellent point. Regarding "you have to change the way react allows the jsx to be used.", can you tell me specifically how to modify the code?
@mhiro216
@mhiro216 2 жыл бұрын
Resolved! please forget about my previous question. Here is my code:
@abumohammad3136
@abumohammad3136 Жыл бұрын
yes need code bro can u help
@andrejvujic
@andrejvujic 3 жыл бұрын
21:39 Correct me if I'm wrong but I think that CORS stands for cross-origin resource sharing.
@laurenzrausche2387
@laurenzrausche2387 3 жыл бұрын
yeah i think so#
@mukiibipeter07
@mukiibipeter07 3 жыл бұрын
I haven't watched this tutorial ye but brooooooo ... I'm excited.
@MiSt3300
@MiSt3300 3 жыл бұрын
wow dude what an awesome tutorial!
@akashmurugesh3509
@akashmurugesh3509 3 жыл бұрын
And I can't wait to know how u can do this... Exceptional kyle
@buncakciku
@buncakciku 3 жыл бұрын
gg i watch every second...didn't notice the video was 47 min.....best code tutorial ever, easy to understand....good job
@TralkNEW
@TralkNEW 3 жыл бұрын
Me like a week ago: hmm i wonder how to make a google docs clone This video: :) Thank you!
@mthaha2735
@mthaha2735 3 жыл бұрын
Would be useful if you could create the editor by your self. Looking forward to a video where you create a text editor with all standard features like text selection(changing it's calligraphy)
@ilin76bb
@ilin76bb 3 жыл бұрын
dong that is a pain in the arse and not nesecary since so many solutions out there justt take them and adjust it according to your needs is better then doing from scratch nooob
@mthaha2735
@mthaha2735 3 жыл бұрын
@@ilin76bb Dude you sound like some phony lazy arse dev who can't think and is totally dependant on others. Man if you are a serious dev then you would want to create the editor by yourselves, not because the self made is better in fact quill would be a better choice for production, but since this is a channel where he teaches js this will make your understand more deeper concepts thoroughly. Please refrain from calling noobs and all cause only a shortsighted person would do so
@ilin76bb
@ilin76bb 3 жыл бұрын
@@mthaha2735 sorry noob.
@alinet2007
@alinet2007 3 жыл бұрын
amazing tutorial time to make notion.so next
@konstantinreut2577
@konstantinreut2577 11 ай бұрын
That is updated code due to new version of React.
@AJF013
@AJF013 3 жыл бұрын
Perfect one 😉 Pls can u do Spotify Clone another time and Netflix clone too and mainly Amazon clone
@adityak1231
@adityak1231 3 жыл бұрын
@@losing_interest_in_everything Hey do you know any vid which shows how to use react with an MVC structure?
@ivss8927
@ivss8927 3 жыл бұрын
​@@adityak1231 My advice to you is search for explanations about the mvc and then go to a tutorial where they apply to it. Which videos? If there is a database (Mongo, postgress, mysql...) and they use it, and they do a folder called "controllers" they are using it.
@adityak1231
@adityak1231 3 жыл бұрын
@@ivss8927 Hey thanks. That comment was 1 month back and I've learnt a lot in that duration. I had a fully working website with a mongodb database at that point with an MVC architecture and I wanted to use React in it. I don't need it now because I'm comfortable with the full MERN stack now. Thanks again though.
@trueuchiha2042
@trueuchiha2042 3 жыл бұрын
@@adityak1231 do you do nextJs or u comfy with just React?
@adityak1231
@adityak1231 3 жыл бұрын
@@trueuchiha2042 Just React
@nikitakrulikov
@nikitakrulikov 3 жыл бұрын
Your tutorial is really awesome and very helpful. Nowadays, typescript is very popular and if you make the video with typescript , it would be great.
@julian_pp
@julian_pp 3 жыл бұрын
Amazing! thank you! please do more short app tutorials
@murunwascengy2762
@murunwascengy2762 3 жыл бұрын
🎉🎉🎉 thank you Kyle, how to create multiple pages using quill just like word-document???
@iJuce
@iJuce 3 жыл бұрын
if only you uploaded this 2 years earlies...
@cristhianjoeljarquin8016
@cristhianjoeljarquin8016 2 жыл бұрын
😆 wow you are really amazing, you make the explication super easy
@ianterada6821
@ianterada6821 3 жыл бұрын
Really cool! Thanks for putting this together!
@creativetech8471
@creativetech8471 3 жыл бұрын
I wanted to same but as mark down editor, Great Content
@autorevolutionHQ
@autorevolutionHQ 2 ай бұрын
Can you make a tutorial on how to add pages that google docs or word has?
@RahulSingh-b1t8u
@RahulSingh-b1t8u Жыл бұрын
Ek number bhai
@slyrockyballboa
@slyrockyballboa 3 жыл бұрын
Very nice, what is main benefit from cloning google docs, spotify... I saw many videos like this, clone this, clone that...
@nosiphondlovu6751
@nosiphondlovu6751 2 жыл бұрын
Cel ung'shade, angeke ngik'phoxe 😍😜
@strawberryjoker
@strawberryjoker 3 жыл бұрын
This was a fantastic tutorial! Thank you!
@MiserableDuck95
@MiserableDuck95 3 жыл бұрын
Awesome video! The client folder code didn't get committed to the repo properly btw.
@thesubinsebastian
@thesubinsebastian 3 жыл бұрын
Brother could you please please do this in angular too, Would really love to do this project in angular🙂
@FindYourWhyInLife
@FindYourWhyInLife Жыл бұрын
great one bud!
@RianY2K
@RianY2K 3 жыл бұрын
nice tutorial, thank you
@muhammadrezahaghiri
@muhammadrezahaghiri 3 жыл бұрын
It would be great if you show us how we can add authentication from another backend to this (e.g. a django or rails application).
@konstantinreut2577
@konstantinreut2577 11 ай бұрын
@005_harshgupta7
@005_harshgupta7 Жыл бұрын
how can we make this multipage google docs project. For example if we hit a word limit we jump to a new page instead of just increasing size text box
@acerik97
@acerik97 3 жыл бұрын
Maybe a newbie question but what is the proper way to store rich/formatted text like this to database (mysql)?
@tylertachiki5186
@tylertachiki5186 3 жыл бұрын
Web Dev Simplified in 5 years: Google Search Engine clone with the algorithm
@OleksandrDanylchenko2k
@OleksandrDanylchenko2k 3 жыл бұрын
Great trick with useCallback instead of useRef
@oussamasethoum2755
@oussamasethoum2755 3 жыл бұрын
aren't you the best ? yes you are
@ratul1125
@ratul1125 3 жыл бұрын
Hostinger is the the Best
@navpreetsingh3007
@navpreetsingh3007 3 жыл бұрын
Hey plz make a video on how to handle multiple collection in database plz
@rangabharath4253
@rangabharath4253 3 жыл бұрын
Awesome as always 👍😀
@oa1197
@oa1197 3 жыл бұрын
Thank you so much! Are you planning on making an Angular course anytime soon?
@aguyoninternet9883
@aguyoninternet9883 3 жыл бұрын
Why use that shitty and unnecessarily large angular when you have it's dad React
@oa1197
@oa1197 3 жыл бұрын
@@aguyoninternet9883 I also prefer react but my uni wants us to use Angular this semester so I have to learn it :)
@aguyoninternet9883
@aguyoninternet9883 3 жыл бұрын
@@oa1197 oh, I see
@aguyoninternet9883
@aguyoninternet9883 3 жыл бұрын
@@oa1197 There are some more angular course on yt, you can learn from them, I guess Kyle is not close on doing it, how about angular course by traversy media
@ivss8927
@ivss8927 3 жыл бұрын
@@aguyoninternet9883 Traversy Media is the must go in many Crash Courses hehe, i recommend it to. In fact i was planing to learn php with him (you know, for the legacy stuff of business xd)
@piusvictor8780
@piusvictor8780 3 жыл бұрын
Great Job 👏👏👏
@Victor_Marius
@Victor_Marius 3 жыл бұрын
Is it ok to have socket.on("send-changes", ) inside socket.on("get-document", ) ? If it works like addEventListener probably it's a bad idea because it just appends a new listener of the same type on the same object to a new anonymous function and this can create bugs due to multiple unnecessary calls (I saw this kind of mistake in the video about the piano app as well). Usually any kind of event listener should be added once per tuple of (object, type, function) unless the callback function is not anonymous and is the same (probably stored in a more global context). Any way I think in this case you can get away by sending the documentId along side with the delta as one data object and you can acces them inside socket.on("send-changes", ) and take it outside of socket.on("get-document", ). And the same applies for the socket.on("save-document", ). Or...is socket (on the server) a different object for each client? Great video and cheers! This Quill library is good to know about it. Thanks
@shubhamdodiya-s2s
@shubhamdodiya-s2s Жыл бұрын
its dope man, does it has new page kinda thing in it, like google docs has, like if you exceding bottom of the page , then it automatically goes to next page ????
@hbfl3x50
@hbfl3x50 11 ай бұрын
setQuill(q) -> results on an error because it repeatedly calls setState inside componentDidUpdate or componentDidMount. React throws an error to avoid loops
@shakirahsanromeo7863
@shakirahsanromeo7863 3 жыл бұрын
Nice. Now please create a Google Sheets clone
@snehalambatkar9910
@snehalambatkar9910 3 жыл бұрын
Will you make a tutorial on game development
@aman9267
@aman9267 3 жыл бұрын
💯👍👍 Yes! This is what I wanted!
@n3x404
@n3x404 3 жыл бұрын
Great idea, amazing really cool project 💪👌
@tsydi
@tsydi 3 жыл бұрын
Very useful, thanks
@rlopez6636
@rlopez6636 3 жыл бұрын
Custom Google excel next pls
@lowvrgamer
@lowvrgamer 9 ай бұрын
I took you project from github but I can't run it what version of node are you using? How can I install the modules corectly?
@paulmichaelpangan8710
@paulmichaelpangan8710 3 жыл бұрын
Hi Sir! Is it possible to open a word file then edit like what google docs does? Thank you in advance.
@seanmcelroy4074
@seanmcelroy4074 3 жыл бұрын
What if i wanted to deploy the server on something like AWS or Heroku, how would i know which port and location my client would need to connect to?
@ashokkumawat88
@ashokkumawat88 Жыл бұрын
I want to like it once again 😀
@rosalyna_24
@rosalyna_24 3 жыл бұрын
hey can u make a video about signing a PDF using nodesignpdf module
@birotest6294
@birotest6294 3 жыл бұрын
I love your videos.
@ankitdubey9310
@ankitdubey9310 3 жыл бұрын
you are a god!
@marvinkatende5077
@marvinkatende5077 3 жыл бұрын
Hello, could you be having , or even upload some tutorials on connecting a UAV via cellular systems using socket.io, JSON API etc. If not, some recommendations would be truly appreciated.
@LukeWilliams91
@LukeWilliams91 2 жыл бұрын
this is truly concerning... 😂
@hartyom
@hartyom 3 жыл бұрын
So much covered in less than an hour.
@bradygerber6372
@bradygerber6372 3 жыл бұрын
Is there a way to set this up so that only you (the person running the doc) can make edits to one specific link, and when someone else sees it, they can't edit the page? Maybe something as simple as hiding the Quill Editor depending on who's viewing it?
@lokeshnegi5051
@lokeshnegi5051 2 жыл бұрын
I don't know why the loading is not going from my sheet I've event tried copy pasting your code but still facing same issue.
@anils1383
@anils1383 8 ай бұрын
HI, Thanks for this tutorial, i have question, like how to send the value from MS docx file text as default
@giwrgosiwannidis4684
@giwrgosiwannidis4684 3 жыл бұрын
Sooo helpfull great work
@shreyasrivastava5418
@shreyasrivastava5418 3 жыл бұрын
@web dev simplified, how do you build all of this so fast? It would've taken me months to come up with something like this
@priyaraj4735
@priyaraj4735 3 жыл бұрын
Can someone tell me how to deploy this project??
@shivanimehta4046
@shivanimehta4046 3 жыл бұрын
Just a beginner question. We have to create a MongoDB document and pass the DB uri to the mongoose.connect()? Am I right?
@mistekfcio
@mistekfcio 3 жыл бұрын
That's so cool! Really informative video :)
@trochymiak
@trochymiak 3 жыл бұрын
To było dobre :) Very nice thx !
@abhaytiwari6411
@abhaytiwari6411 3 жыл бұрын
One video On How to build Netflix in React js
@29namankumar29
@29namankumar29 3 жыл бұрын
Thanks
@damiangilz
@damiangilz 3 жыл бұрын
That's a lot of useEffects! Can they be split into files? I think I have to create many custom hooks.
@danielf535
@danielf535 3 жыл бұрын
Why not split it into multiple smaller functions that you call inside the useEffect hook?
@damiangilz
@damiangilz 3 жыл бұрын
@@danielf535 So a bunch of functions will do? Using hooks is innecesary then. Thanks for the tip.
@danielf535
@danielf535 3 жыл бұрын
@@damiangilz Do something like this: useEffect(() => { callFirstFunction() callSecondFunction() callThirdFunction() }, []) The benefit of doing it like this is that you get the benefit of using lifecycle methods, but you don't repeat useEffect 3 or 4 times. Note that the code I wrote is only good if you need to do something once when the application first mounts.
@damiangilz
@damiangilz 3 жыл бұрын
@@danielf535 thanks for the example. A question, if function A (fA) receives args like fA(arg1), fB(arg1,arg2), and fC(arg2), and I put arg1 and arg2 in the dependency arrays, all 3 functions will get triggered each time either variable changes, right?
@danielf535
@danielf535 3 жыл бұрын
@@damiangilz I'm not sure how experienced you are with React, but if you want the useEffect to trigger on anything but the component mounting, then you need to add variables to the useEffect dependency array, and the useEffect will trigger if any of these change. As far as I know, you can use these variables as arguments to the functions inside the useEffect hook.
@rishabkumar9578
@rishabkumar9578 3 жыл бұрын
Next How to create your own Chrome
@m-series719
@m-series719 Жыл бұрын
Can you plz provide the flaw chart plz ..
@benlaw7843
@benlaw7843 3 жыл бұрын
Pagination with Header, Footer, Cover page ... Any tips on this ?
Learn React PropTypes In 13 Minutes
13:11
Web Dev Simplified
Рет қаралды 77 М.
Learn Socket.io In 30 Minutes
27:27
Web Dev Simplified
Рет қаралды 516 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 16 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 58 МЛН
I thought one thing and the truth is something else 😂
00:34
عائلة ابو رعد Abo Raad family
Рет қаралды 6 МЛН
How To Create A Video Chat App With WebRTC
28:53
Web Dev Simplified
Рет қаралды 919 М.
Socket.io Introduction - How to Build a Chat App
21:38
Dave Gray
Рет қаралды 43 М.
Socket.io + ReactJS Tutorial | Learn Socket.io For Beginners
32:35
How To Build Feature Flags Like A Senior Dev In 20 Minutes
20:33
Web Dev Simplified
Рет қаралды 95 М.
Building a collaborative text editor with WebRTC and CRDTs
28:12
JavaScriptMN
Рет қаралды 15 М.
WebSocket in NodeJS | Socket.IO - Real Time Messaging
32:27
Piyush Garg
Рет қаралды 198 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 488 М.
How To Handle Permissions Like A Senior Dev
36:39
Web Dev Simplified
Рет қаралды 166 М.
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 16 МЛН