I built a decentralized chat dapp // GUN web3 Tutorial

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии •

  • @marknadal9622
    @marknadal9622 3 года назад +2034

    GUN author here! Gaaaaah the app is already swamped, OK looks like I'm gonna need to working on my scaling code... trying to fix things now! Probably too late. Please try to run a local version of the project in the meanwhile (so sorry) - and I'm happy to answer any Qs too (tho RUclips rate-limits how fast commenters/me can I reply).

    • @thomaslauer1015
      @thomaslauer1015 3 года назад +63

      Thank you for everything you do! I hope your systems are stable and your bugs sparse!

    • @kahungchim6367
      @kahungchim6367 3 года назад +10

      Hi there, I would consider to build a forum app with gun, however I am concerned that some features like banning users or advanced user management would be impossible. Is it actually the case? Or it is something possible to implement?

    • @nirajsheladiya8246
      @nirajsheladiya8246 3 года назад +4

      Thanks for your time 🤠

    • @deidyomega
      @deidyomega 3 года назад +12

      What would running a local copy of the code do? It looks like its all client side. So if I compile the code locally and run it, or download the code from the webapp and run it, it should run at the same speed, and have the same scaling problems

    • @roastgg
      @roastgg 3 года назад +1

      Awesome work Mark.

  • @the_primal_instinct
    @the_primal_instinct 3 года назад +373

    I built a decentralized chad app

  • @arslantechlab
    @arslantechlab 3 года назад +420

    This guy is God Gift for Developers😍, Back to Back Awesome Tutorials!👏

    • @Fireship
      @Fireship  3 года назад +62

      Looks like you have a nice channel there, subscribed!

    • @arslantechlab
      @arslantechlab 3 года назад +18

      @@FireshipProud Moment for me sir❤😍
      I have a great plans for this channel. I'm working on data structures and algorithms & Nodejs series right now. And then I'll make a complete courses on javascript, Reactjs and many more😊.

    • @isheanesunigelmisi8400
      @isheanesunigelmisi8400 3 года назад +7

      If Jeff subscribes then I will as well

    • @arslantechlab
      @arslantechlab 3 года назад +5

      @@isheanesunigelmisi8400 Thanks dude😊

    • @shafiaansar863
      @shafiaansar863 3 года назад +3

      @@arslantechlab subscribed .🙌This is an awesome channel about programming 👏

  • @y9tw0t
    @y9tw0t 3 года назад +308

    Finally: content on app architectures beyond the conventional server-client model dependant upon the corporate clouds (AWS, Google, _et cetera_ )!

    • @tal_the_great
      @tal_the_great 3 года назад

      Except, of course, that radix server in the middle acting as a non-cache storage.

    • @thecorruptversion
      @thecorruptversion 3 года назад +6

      Writing "etc" as "et cetera" must be one of the must pretentious things I've seen.

    • @y9tw0t
      @y9tw0t 3 года назад

      @@thecorruptversion, so you mustn't've seen very much, then, huh? Try getting out more.

    • @thecorruptversion
      @thecorruptversion 3 года назад +3

      @@y9tw0t Well done for deleting your original comment, because it made no sense. The "try getting out", "go outside" and arguments of that kind are so 2009. Try a better pre-made comment next time.

    • @y9tw0t
      @y9tw0t 3 года назад

      @@thecorruptversion ahh, yes, because the validity of a thought is a function of it's newness; nothing that's "2009" (whatever that even means) 🙄 can be sound. Also, I said _get out_ because you portrayed something that's not at all pretentious as the *"must"* pretentious thing ever when there are myriad things that're a great deal more pretentious, indicating that you're either deficient in experiences out in the world or deficient in attention to details. Oh, and, the only reason I amended my original response is that it occurred to me that you probably aren't the sort who bothers to backup your arguments when someone like myself takes them seriously and gives you an opportunity to make them make sense. Here's, more or less, my original response -let's see if you entertain it in good faith: "How do you figure that using the unabbreviated form of a term amounts to pretention? And, what, do you abbreviate everything, then; only _approx._ , never _approximately_ ; only _no._ , never _number_ ; _et cetera_ ?" There anything else you need explained for you?

  • @GrazianoBF
    @GrazianoBF 3 года назад +37

    So much freedom on one single tutorial.. I feel like going out for some range fun now :)

  • @stfalx
    @stfalx 3 года назад +12

    Wow. No firebase, and mom can't believe you did something that works! Amazing!

  • @TheIlham980
    @TheIlham980 3 года назад +30

    Man you're what I wish to be as a Developer! keep doing your stuff and hope you good health Jeff

  • @MrDallix
    @MrDallix 3 года назад +16

    I am planning on using gun as a framework for realtime crossplatform notifications in a web app I'm making. Absolutely love it! Thank you for making coding easy!

  • @stephen9849
    @stephen9849 3 года назад +156

    I read this as "gnu web3" and I thought Richard Stallman wrote a new thing...

  • @IceBreakerGamer
    @IceBreakerGamer 3 года назад +41

    I'm a simple man, I see fireship upload, I click

  • @fatgolem69
    @fatgolem69 3 года назад +10

    Congrats on 800k subs

    • @LabGecko
      @LabGecko 9 месяцев назад

      Wow, that's been a ride. He's just under 3 mil now

  • @m3po22
    @m3po22 3 года назад +12

    I wish more people used observables. It's a unified API for async that simplifies everything. No friggin async/await everywhere, no one-off event listener syntax, etc...

    • @m3po22
      @m3po22 3 года назад

      @Zelená Žaba we don't have native observables yet, but when we get them the API will be like RxJS

  • @tuliomop
    @tuliomop 3 года назад +4

    Your selection of technologies is great, I always learn something new on this channel, thanks

  • @crowlsyong
    @crowlsyong 2 года назад +4

    What you do for the dev world...is just amazing. THANK YOU. Please keep making (some) free content. I promise I'll get a few months of your pro thing soon.

    • @crowlsyong
      @crowlsyong 2 года назад +1

      For now, take my like/comment and sub. 💖💖

  • @Mikkysam52
    @Mikkysam52 3 года назад +32

    Richard Hendricks, your dream is coming to pass

  • @DevMadeEasy
    @DevMadeEasy 3 года назад +13

    Hey FireSHip🔥.
    😮 Wow, great content, as always!!!
    I just 💜loved it.
    Thanks for sharing it!🙏
    Besides being a programmer, you are an expert in "After Effects"...
    This video is breathtaking.

  • @thedoubleop
    @thedoubleop 3 года назад +5

    I knew I liked this channel for a reason.

  • @princejoogie
    @princejoogie 3 года назад +3

    watched to learn about gunjs, left loving how simple svelte is

  • @0xcoburn
    @0xcoburn 3 года назад +70

    please more videos on building decentralized api’s!

  • @minnow1337
    @minnow1337 3 года назад +1

    So excited for all of the web 3 content to come

  • @jata1
    @jata1 3 года назад +2

    I just found this channel and you are so good! All of your videos are so polished and juicy! Thank you for your videos and inspiring me to explore more development

  • @keerthivasan6107
    @keerthivasan6107 3 года назад +9

    Is Svelte going to be your goto JS framework / library from now !? Glad to see svelte getting much deserved attention ! 😁

  • @rkvkydqf
    @rkvkydqf 3 года назад +154

    Building a demo that's literally more secure, private, scalable and open than most popular chat apps in 10 minutes.

    • @digletwithn
      @digletwithn 3 года назад +14

      secure where?

    • @rkvkydqf
      @rkvkydqf 3 года назад +4

      @@digletwithn Unlike a lot of messaging apps, it technically implements E2E encryption, though with a hardcoded key.

    • @monarch0243
      @monarch0243 3 года назад +17

      @@rkvkydqf Most of messaging apps have encryption nowadays.

    • @digletwithn
      @digletwithn 3 года назад +13

      @@monarch0243 and without a hardcoded key in the first place

    • @monarch0243
      @monarch0243 3 года назад +1

      @@digletwithn Exactly/Obviously!

  • @shauryajain4215
    @shauryajain4215 3 года назад +2

    Love the cowboy music in the background 🤠. These little details always make your videos special

  • @SecularDarwinism
    @SecularDarwinism 3 года назад +4

    The video I've been waiting for! Thank you Jeff 🤩

  • @alphaNaj
    @alphaNaj 3 года назад +8

    great to see you have used svelte!

  • @0xNES
    @0xNES 3 года назад +1

    Was waiting for your video ! You both are great ! Can't wait to have dapp popping everywhere !

    • @computadorhumano949
      @computadorhumano949 3 года назад

      Do you not a spoker English? Why i am ask because my teach english tell me that i always do need put with subject before of sentence in this case "i was wanting for your video"

    • @0xNES
      @0xNES 3 года назад

      ​@@computadorhumano949 I'm not native if that's your question. Your english teacher is right tho, you should put the subject before the verb. My mistake !

    • @LabGecko
      @LabGecko 9 месяцев назад

      @@0xNES said _"Your english teacher is right tho, you should put the subject before the verb."_
      Technically, yes, but what you wrote in the original post is how most English speakers write in text / comments. Saying this in person would be:
      "I was waiting for your video! You're both great! Can't wait to have dapp popping everywhere!"
      Not much difference. I'm not sure why we anglophones use 'I was' at the start. Perhaps it just sets what or who is being spoken about. Good luck with your languages!

  • @svenkuffer4512
    @svenkuffer4512 3 года назад +14

    Reminds me of the IPFS, InterPlanetary File System, a decentralized file storage using a distributed hash table, often used in addition with NFTs and Blockchain

    • @DimaNoizinfected
      @DimaNoizinfected 3 года назад

      ipfs is not about NFTs. Marketplaces use IPFS as database to store graphics.

    • @svenkuffer4512
      @svenkuffer4512 3 года назад +1

      @@DimaNoizinfected that‘s what i said, in addition to NFT, the NFT has an id which is a hash of the files metadata, that is used to lookup the location in the DHT, and then you can retrieve it in the ipfs

    • @Mopark25
      @Mopark25 3 года назад

      @@tobiokandi it's already being used by Audius and I believe NFTs are in their roadmap

    • @arpee1337
      @arpee1337 3 года назад

      What? A shitload of NFT marketplaces already use IPFS to store the meta json

  • @nickydevendt
    @nickydevendt 3 года назад +1

    This is dope! I really like how fast you can start developing.... Me so happy...!

  • @SweetSummerChildern
    @SweetSummerChildern 3 года назад +1

    THIS IS YOUR BEST VIDEO!!!!!!! Thank you for explaining to us know all your design decisions :)

  • @jiren8991
    @jiren8991 3 года назад +3

    WOW! You made my day by uploading this video

  • @hannibal.b5242
    @hannibal.b5242 3 года назад +1

    awesome, as usual the quality of you content is amazing

  • @jordanasghar6419
    @jordanasghar6419 3 года назад +13

    You could take the data layer further and start pushing to IPFS and the Filecoin network for massive scalability.
    Here, you have a prebuilt, state of the art system for storing decentralised data on hard drives across the world, at a fraction of the cost of cloud vendors.

    • @nhivothianh4030
      @nhivothianh4030 Год назад

      Can you help me answer the question? this youtube clip build a dapps, do i need to use IPFS. Currently, I just build to introduce how decentralized database works between 2 computers.

  • @piltonswrangbrahma5140
    @piltonswrangbrahma5140 3 года назад +8

    Fireship on fire 🔥🔥🔥🔥

  • @PranshuTheGamer
    @PranshuTheGamer 3 года назад +6

    I was thinking about a decentralised chatting app just yesterday!

  • @yashkalavadiya5021
    @yashkalavadiya5021 3 года назад +1

    This guy should have been at 1M already

  • @xulipaTV
    @xulipaTV 3 года назад +1

    Fireship always on target delivering premium content!

  • @hourglass8450
    @hourglass8450 3 года назад

    Watching fireship's videos makes me feel like I can learn anything XD

  • @JeyPeyy
    @JeyPeyy 3 года назад +21

    HOW Do you have time to learn so many different topics, animate these awesome videos AND develop dapps???

    • @Altessaire
      @Altessaire 3 года назад +4

      Entrepreneurship

    • @butterfly7562
      @butterfly7562 3 года назад +2

      because make video is his work

    • @sazaraki
      @sazaraki 3 года назад +3

      It's a team of people.

  • @BozmanWJ
    @BozmanWJ 3 года назад +4

    Perfect timing, I was just about to try this 🤣

  • @AbhishekSalunkhe-fg2sy
    @AbhishekSalunkhe-fg2sy 2 года назад

    Video is about gun and it is like a bullet. To the point and fast. Nice work.

  • @nathandaven
    @nathandaven 3 года назад +1

    this is the future of the web highkey

  • @moh6823
    @moh6823 3 года назад +18

    D3js in 100 secondssssssss 🥳🥳🥳🥳

    • @Fireship
      @Fireship  3 года назад +15

      on the list

    • @moh6823
      @moh6823 3 года назад +2

      @@Fireship amazing! Thanks! Cant wait

  • @felipearmijo6242
    @felipearmijo6242 3 года назад +5

    Content on 🔥, as always !

  • @codedByAyush
    @codedByAyush 2 года назад

    This channel is really a god-gifted channel for developers😇😇

  • @loudcoringa5935
    @loudcoringa5935 3 года назад

    you are aweasome! built a chat app in 10 minutes

  • @willd4686
    @willd4686 3 года назад +3

    That was you!!! I was helping you test that! It was fun spamming

  • @losbopfos5637
    @losbopfos5637 3 года назад +8

    Nice nice nice!
    This is exactly what the web needs this days.

  • @TheRollupCo
    @TheRollupCo 3 года назад +1

    This is an amazing tutorial! Please more videos on decentralized chat dapp topic

  • @torvic99
    @torvic99 3 года назад

    Fireship rocks! You guys deserve maximum success!

  • @yollotltamayo2685
    @yollotltamayo2685 3 года назад +2

    Awesome video as always man

  • @brandonsayring
    @brandonsayring 3 года назад +1

    Great idea! You really pushed GUN to its limits (making the app laggy and completely unusable) but it must be great field test for them to observe and make improvements on the source code from!

    • @marknadal9622
      @marknadal9622 3 года назад +6

      absolutely! Gonna non-stop work until this is flawless. I'm very grateful to Fireship!

    • @brandonsayring
      @brandonsayring 3 года назад +3

      @@marknadal9622 nice one, Mark! Love your work!

  • @313comput
    @313comput 3 года назад +49

    I've seen enough Silicon Valley to know where this is going

  • @Valiant600
    @Valiant600 3 года назад +2

    Really loved the use of Svelte instead of React!!!

  • @liquidsnake6879
    @liquidsnake6879 3 года назад

    now this is cool, decentralisation is what is worth talking about imo

  • @h8handles
    @h8handles 3 года назад +2

    Omg 0:23 is why I love your stuff. I'm trusting you....lmfao

  • @aqibsuhail8388
    @aqibsuhail8388 3 года назад +3

    I just completed Silicon Valley, and here you are with a decentralized app tutorial. How do you do it man?!!?

  • @RonnieDenzel
    @RonnieDenzel 8 месяцев назад +1

    Nice tutorial,i was wondering if there is a way for us to see the data stored so far🤔

  • @reitznerdomenik
    @reitznerdomenik 3 года назад +1

    I love it when you do svelte content

  • @anthem2924
    @anthem2924 3 года назад +1

    You definitely helped me through college

  • @Akhbash
    @Akhbash 2 года назад

    7:00 That double whitespace is triggering my OCD so hard XD

  • @aleksd286
    @aleksd286 3 года назад +1

    DAPP is my favorite genre

  • @Algardraug
    @Algardraug 3 года назад

    Finally someone talks about decentralization without hyping blockchain bullshit

  • @fruduruk
    @fruduruk 3 года назад +12

    I think it works but it is extremely slow. I wonder how many people are online rn and what happens if 90% go offline. This must mean there is a moving limit on how much this decentralised db can handle.

    • @Fireship
      @Fireship  3 года назад +9

      This is an interesting test... it needs some optimization to handle the firehose of data

    • @augustday9483
      @augustday9483 3 года назад +4

      I feel like this system would work well for an adhoc chat thread system where a group of users are in a chat together, sending messages, and then when they're done they leave the chat and that data goes away. If your use-case is designed around active users in small rooms, the decentralization would work well (the chatters serve as their own mini peer network). Idk, just spitballing.

    • @marknadal9622
      @marknadal9622 3 года назад +9

      Definitely my fault, still working on improvements. Why I haven't been replying to comments... debugging a ton. Sorry again, everyone! But I won't stop until this works flawlessly.
      @SzymeX "complex"? GUN is only like ~9KB! That is smaller than lodash! With default adapters (networking, storage) GUN is about 13KB, add in cryptography + routing algorithms is about another +16KB. Extremely tiny. :)

    • @ImperiumLibertas
      @ImperiumLibertas 3 года назад +3

      The problem with decentralized tech is incentivizing people to constantly seed the data to make both stable and actually decentralized.
      I wonder what is stopping someone from posting messages in the past or completely rewriting the history all together. Is there a consensus algorithm being used? All things that will need to be figured out in time.

    • @phxcppdvlazi
      @phxcppdvlazi 3 года назад

      @@augustday9483 then how about having "rooms" (no chat data) be distributed as well? basically just a layer on top of rooms which are created using a decentralized "chat room matchmaking" app. Then when users enter the room another mini p2p app is started

  • @azatecas
    @azatecas 3 года назад +1

    Oh man can wait till i get out of work, im doing this tutorial, ever since you introduced gun.js i haven't stopped thinking about it

  • @MrSamkots
    @MrSamkots Год назад +1

    Awesome content!! And what's the badass western theme in the background in the beginning and at the end???

  • @FillypeFarias
    @FillypeFarias 3 года назад +3

    I wonder how it can scale up with millions of users because there would be so much data that to store on each peer that don't seems to be feasible.

  • @joshblf
    @joshblf 3 года назад +1

    Finally!! Thank you for this!

  • @wota_pov
    @wota_pov 3 года назад +1

    Finally u talked about daap!

  • @SumonRayy
    @SumonRayy 3 года назад +3

    Waiting for this 🥰💖

  • @alongoren616
    @alongoren616 3 года назад +1

    Please do more tutorials on web3 like how to generate nfts, auto mint nfts, mass offers!

  • @rejathchandran3289
    @rejathchandran3289 3 года назад +1

    Manh😂 you read people's mind 😂 I was think about this idea yesterday

  • @leonardotarla2723
    @leonardotarla2723 3 года назад +3

    You can also use akash network to build a dapp. It's a decentralized network build in blockchain that accepts any kind of application that uses docker container

  • @CodeWithVlad
    @CodeWithVlad 3 года назад +2

    Awesome video! Question: Where is the relay server stored?

  • @boredduck231
    @boredduck231 3 года назад +3

    :0 you created 4 videos that led to this video noice

  • @THEMithrandir09
    @THEMithrandir09 8 месяцев назад

    If you like the idea, the Berty Project might interest you. It'll take a while still to be ready though.

  • @fev4
    @fev4 3 года назад +3

    But where did you deploy it!? This is so interesting. I'd love to see more for sure

    • @marknadal9622
      @marknadal9622 3 года назад +1

      "it" is the deployment - as a .html you can open from your filesystem, email to people, or put on codepen, jsbin, or github pages, netlify, vercel, anywhere!

    • @fev4
      @fev4 3 года назад +1

      @@marknadal9622 Ohhh, and what about the database and backend? If I were to have a proxy, where could I deploy it? Anywhere where node.js is supported?

    • @marknadal9622
      @marknadal9622 3 года назад

      @@fev4 Yupe!

    • @nhivothianh4030
      @nhivothianh4030 Год назад

      @@marknadal9622 Can you help me answer the question? this youtube clip build a dapps, do i need to use IPFS? Currently, I just build to introduce how decentralized database works between 2 computers.

  • @isheanesunigelmisi8400
    @isheanesunigelmisi8400 3 года назад +1

    I was waiting for this, YES

  • @betoharres
    @betoharres 3 года назад +1

    i remember when the author of gun first introduced this library on hackernews, a bunch of mean comments pointing fingers to him basically telling this is a stupid idea, at least the guy kept straight with the comments

  • @ConfusedAnt
    @ConfusedAnt 3 года назад +1

    this is the kind of content I like :)))))

  • @SundarbansCompanySite
    @SundarbansCompanySite 13 дней назад +1

    would you trust this library for enterprise grade software? probably not?

  • @dovanminhan
    @dovanminhan 3 года назад +1

    Extremely helpful

  • @McDjurhuus
    @McDjurhuus 3 года назад +1

    Please do more web3 specific content.

  • @mritunjay4ever
    @mritunjay4ever 2 года назад +1

    dApp
    the data is not controlled by anyone instead it is decentralized across the entire userbase. Gun stores a small subset of data on each user based on the data that they consumed in the app(peer to peer). when a user makes a query for something a request will be made which will search for other users that have that data and sync it up.

  • @jaysonbunnell8097
    @jaysonbunnell8097 3 года назад +1

    HEY THIS IS SO COOL, AND IT WORKS IN MOBILE

  • @sarthaksehgal2800
    @sarthaksehgal2800 2 года назад +1

    So a decentralised architecture with centralised relay servers. Isn't this back to square one?

  • @TheCodeDealer
    @TheCodeDealer 3 года назад +1

    You should make a video in how create those cool Thumnails hahhaa

  • @goobertnelius
    @goobertnelius 3 года назад

    You could make a online game with this well you would have to optimize it more but the idea is here

  • @richarddees5751
    @richarddees5751 2 года назад +2

    Today, I was thinking that, maybe someday, I wanted to build an application based on blockchain. I think about a blockchain as a giant kurbernete cluster where millions (could be billions) machines connected each other as nodes. And I don't worry about managing the whole cluster/blockchain myself. :DD

  • @AndyChamberlainMusic
    @AndyChamberlainMusic 3 года назад +2

    can you make the scrollbar a bit thicker lol
    so hard to click

  • @deidyomega
    @deidyomega 3 года назад +4

    Is the sync supposed to be this laggy (on the app now), or is that a gun issue? Is it because there is too much "history"? Cool concept, but we had better chat experiences in the 90's with yahoo messenger :P

    • @marknadal9622
      @marknadal9622 3 года назад +4

      This is my fault currently. I take all blame!

    • @antoruby
      @antoruby 3 года назад

      @@marknadal9622 Nice stress test for such an awesome idea!

    • @deidyomega
      @deidyomega 3 года назад +1

      @@marknadal9622 No worries man. Great work. Are you open to contributers?

    • @marknadal9622
      @marknadal9622 3 года назад

      @@deidyomega YES PLEASE.
      @Antonio Ruby, indeed, oye!

  • @007Sylvester007
    @007Sylvester007 3 года назад +1

    Bhahaha I lost it when you started rapping at 00:19

  • @mansourfall2859
    @mansourfall2859 3 года назад

    Thanks @Fireship amazing content as always! Any plan to do "Web 3" video?

  • @theonewhowil
    @theonewhowil 3 года назад +9

    If everything is stored everywhere, how do you implement security logic and prevent others from decrypting this information?

    • @hgghyxo
      @hgghyxo 3 года назад +5

      by using a unique and strong key pair, i guess

    • @marknadal9622
      @marknadal9622 3 года назад +2

      Zsolt is correct! ECDSA/ECDH are used by default.

  • @0l0simon0l0
    @0l0simon0l0 10 месяцев назад

    謝謝!

  • @David-iq1kd
    @David-iq1kd 10 месяцев назад

    With the app getting "swamped" does this mean Gun.js doesn't scale well? Not hating here just trying to get a feel for it's limits. Seems like an amazing project and I'd like to understand it's limitations.

  • @cre8ive65
    @cre8ive65 3 года назад +1

    Woo! More Svelte content!

  • @BeckmannBuda
    @BeckmannBuda 3 месяца назад

    Thanks for the analysis! Just a quick off-topic question: I have a SafePal wallet with USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). How should I go about transferring them to Binance?

  • @karis7539
    @karis7539 3 года назад +2

    Do you work for the Pied Piper?

  • @SisebutoSirois
    @SisebutoSirois 2 месяца назад

    Appreciate the detailed breakdown! A bit off-topic, but I wanted to ask: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How should I go about transferring them to Binance?