🔴 Let’s build Dropbox Clone with NEXT.JS 14! (React, Clerk, Shadcn, Firebase, Drag/Drop, CRUD, TS)

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ส.ค. 2024
  • 🔥 Save Big this Cyber Week with Hostinger using code SONNY here 👉 www.hostinger.com/sonny
    🚨 Join the world’s BEST developer community & course Zero to Full Stack Hero: www.papareact.com/course
    🫂 Join my Community, "University of Code" for FREE: www.universityofcode.com
    📩 Want coding problems (with solutions!) delivered to your inbox daily? www.papareact.com/dailycoding...
    🔴 LOOKING FOR THE CODE? 🛠️
    links.papareact.com/github
    Join me as show you how to build a Dropbox clone from scratch with the newly released Next.js 14. You'll learn the following in this build:
    👉 How to upload all File types to Firebase storage just like the real Dropbox!
    👉 How to integrate full CRUD Functionality for the files
    👉 Create a Beautiful UI & UX for our Dropbox clone using the highly Popular Shadcn!
    👉 Learn how to use NextAuth Middleware to protect unauthorised access
    👉 How to build a Login and Logout Authentication flow using Clerk Authentication!
    👉 How to use Loaders whilst data is being fetched!
    👉 Learn to implement a file sorter feature to sort all files based on various properties!
    👉 Learn to implement a table view for all files with File Metadata display!
    👉 How to leverage Global State Management with Zustand!
    👉 How to build a beautiful UI design with Tailwind CSS!
    👉 Learn how to download any uploaded file straight to your device!
    👉 Learn how to implement the React DnD Library to Upload files via Drag and Drop!
    👉 Learn how to implement Dark Mode toggling to update the UI based on user preference!
    👉 How to use TypeScript to reduce the overall number of Bugs and Errors
    👉 How to deploy the final build on Vercel!
    🎵 WANT TO LISTEN TO THE EXCLUSIVE PAPAFAM PLAYLIST?
    Sign up for the PAPAFAM Newsletter here 👉 links.papareact.com/newsletter
    🕐 TIMESTAMPS
    00:00 Introduction
    01:07 Build Showcase
    04:45 Hostinger Sponsorship
    07:51 Initialising the Build (1/2)
    09:06 Build Tech
    11:27 Implementing Node Version Manager
    13:01 Initialising the Build (2/2)
    16:55 VS Code Extensions
    18:28 Building the Home Page (1/2)
    19:47 Build Plan
    21:13 Implementing Authentication Functionality with Clerk Authentication
    26:30 Implementing Middleware
    28:40 Creating the User Button Component
    29:43 Building the Header Component
    39:42 Implementing Shadcn/ui
    45:35 Implementing Light & Dark Mode
    51:03 Building the Home Page (2/2)
    1:00:33 Building the Dashboard Page
    1:03:21 Implementing Drag & Drop Functionality with React Dropzone
    1:13:17 Implementing the File Upload Functionality (1/2)
    1:20:07 Setting Up Firebase & Cloud Firestore
    1:24:02 Implementing Firebase & Cloud Firestore
    1:26:09 Implementing the File Upload Functionality (2/2)
    1:37:01 Implementing Skeleton Loader (1/2)
    1:38:59 Setting Up Type Definitions
    1:39:26 Implementing Skeleton Loader (2/2)
    1:42:33 Building a Table View for All Files
    1:46:58 Building the Columns for the Table View
    1:54:52 Building the Table Wrapper Component (1/2)
    1:58:28 Implementing the Sort Functionality
    2:03:46 Building the Table Wrapper Component (2/2)
    2:08:40 Implementing Different Edge Cases
    2:15:14 Setting Up Rename & Delete Modals
    2:16:00 Implementing Zustand for State Management
    2:23:33 Implementing File Delete Functionality
    2:33:15 Implementing File Rename Functionality
    2:38:21 Implementing Toast Notifications with React Hot Toast Library
    2:44:37 Final Build Demo
    2:47:26 Deploying to Vercel
    2:50:13 Implementing a Custom Domain Name with Hostinger
    2:54:56 Zero to Full Stack Hero
    2:58:41 Final Deployed Build Demo
    2:59:42 Outro
    Let’s get it PAPAFAM 🔥.
    DISCLAIMER: This Video is made for informational and educational purposes only. We do not own or affiliate with Dropbox and/or any of its subsidiaries in any form. Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for “fair use” of this video for education purposes.
    #nextjs #nextjs14 #react #firebase #typescript #reactjs #dropbox #fileupload #coding #javascript #tailwindcss #tutorial #nosql #reactjstutorial #coding #tutorial #beginner #programming

ความคิดเห็น • 87

  • @patientson
    @patientson 8 หลายเดือนก่อน +13

    When legend like Sonny is on, your job is to pay close attention. He is literally helping you support your dream by explaining and coding at the same time. This is rare.

  • @nemeziz_prime
    @nemeziz_prime 8 หลายเดือนก่อน +9

    When Next.js 14 dropped, Sonny was the first channel that came to mind for an amazing new tutorial

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน +1

      Thank you I appreciate you!

  • @aboronilov
    @aboronilov 8 หลายเดือนก่อน +5

    Sonny you are on of the best teachers on TH-cam. Believe me I've been a professor for 5 years. You do have a talent to teach

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน +1

      Thank you so much! This means a lot!! #PAPAFAM 💯🙏🏽

  • @rennan9891
    @rennan9891 8 หลายเดือนก่อน +7

    This guy helped me got my brand new first job, and i'm always looking forward to see his stuff, i'm going to my third week in the job and still using everything he taught us, thx a lot

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน +2

      This is an AWESOME Comment thank you i'm so glad I could help you land your job!

  •  8 หลายเดือนก่อน +10

    I have good memories in this channel. Last year I followed the live actions and learnt React a little. And as a data scientist I can build my own services now. Although Django and Flask are fine, this is just another level of awesomeness. Thank you.
    When you build it for the first time it feels dumb and you are just repeating and copying. After 3-4 builds you slowly start understanding. So beginners shouldnt frustrate and give up.

    • @rohanwandre2389
      @rohanwandre2389 8 หลายเดือนก่อน

      So true! Even I learnt the same way

  • @kolyaharutyunyan3035
    @kolyaharutyunyan3035 7 หลายเดือนก่อน +1

    Thank you Sonny for an amazing video!
    To avoid "@ts-ignore" we can do the following:
    import { type DefaultExtensionType, FileIcon, defaultStyles } from "react-file-icon";

  • @garikmelqonyan6011
    @garikmelqonyan6011 7 หลายเดือนก่อน

    I could never imagine your tutorials could be this good man. Thank you

  • @DigitalAlchemyst
    @DigitalAlchemyst 8 หลายเดือนก่อน +7

    If you opted to use the component from Next instead of the tag this will cause an error with hot reload down the road when you go to test in dropping a new file at about 2:07:00 for the instant file loading, you will either need to swap back to or find a work around.

    • @Crypt2349
      @Crypt2349 หลายเดือนก่อน +2

      Thanks so much man

    • @DigitalAlchemyst
      @DigitalAlchemyst หลายเดือนก่อน

      @@Crypt2349 If you find a work around or run into any issues let me know happy to help. This may no longer be an issue with new versions of next.

    • @Crypt2349
      @Crypt2349 หลายเดือนก่อน +1

      @@DigitalAlchemyst thanks so much man

  • @wowpixels_dev
    @wowpixels_dev 6 หลายเดือนก่อน

    Such a great project to follow, thanks!

  • @silva8215
    @silva8215 8 หลายเดือนก่อน

    Thanks Sonny that was awesome!

  • @AbdulxoliqOdiljonov
    @AbdulxoliqOdiljonov 7 หลายเดือนก่อน

    Thank you so much Sonny !!
    You are best teacher !!!

  • @user-ur2xe1br4g
    @user-ur2xe1br4g 7 หลายเดือนก่อน

    Loved your video bro learned a few new things :) found it (this vid) looking for a shawncn tuto. You got a new sub.

  • @DigitalAlchemyst
    @DigitalAlchemyst 8 หลายเดือนก่อน +7

    If you are using /src folder in your projects, the middleware.ts file needs to go in the /src folder not the root
    If it is in the wrong place you will see the following error in your terminal
    ○ Compiling /_error ...
    ✓ Compiled /_error in 654ms (921 modules)
    and the dashboard will show up just fine.

    • @DigitalAlchemyst
      @DigitalAlchemyst 8 หลายเดือนก่อน

      sidenote this also caused an issue with tailwind.

    • @jamestuttle
      @jamestuttle 8 หลายเดือนก่อน

      What I did too as per the Docs, then found this... Confirmed on my end too!

    • @DigitalAlchemyst
      @DigitalAlchemyst 8 หลายเดือนก่อน +1

      @@jamestuttle Yeah i did see that in the docs later on after making this comment.

  • @muhammaduseram9405
    @muhammaduseram9405 2 หลายเดือนก่อน

    Yoo sunny you are inspirations💕

  • @kulvirsingh4568
    @kulvirsingh4568 8 หลายเดือนก่อน

    Awesome Sonny 🎉🎉

  • @youssefmahmoud6268
    @youssefmahmoud6268 8 หลายเดือนก่อน

    From the best best best on TH-cam, thanks.

  • @sujayrajesh5505
    @sujayrajesh5505 13 วันที่ผ่านมา

    FIRE STREAM 🔥🔥🤩

  • @mrsingh5351
    @mrsingh5351 8 หลายเดือนก่อน

    Dope 🔥

  • @ioannhide3355
    @ioannhide3355 8 หลายเดือนก่อน

    This guy are amazing programmer 🎉

  • @RABWA333
    @RABWA333 7 หลายเดือนก่อน

    Great job , watching from Libya

  • @siddharthpadwal9649
    @siddharthpadwal9649 8 หลายเดือนก่อน +1

    Hey sonny i really like your videos, i know it’s irrelevant at the time but can you make a short series or clones working with vue js / nuxt js too.
    It would be a great help!

  • @chiedozieezidiegwu1592
    @chiedozieezidiegwu1592 8 หลายเดือนก่อน

    Nice one bro, Weldone... 👍

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน

      Thank you so much 😀

  • @crim-son
    @crim-son 8 หลายเดือนก่อน

    is there a way to use Firebase only on the server and still get to use storage and have Realtime updates on the client, or must firebase always completely be on the client? I see Sonny didn't add firebase keys to the env file, is that wrong or is it completely fine?

  • @agadaFrancisLouis
    @agadaFrancisLouis 8 หลายเดือนก่อน +1

    Sonny, I love the fact that you used Shadcn, Zustand and Clerk😍😍😍👏🏾. It’s like you read my mind. You’re the best, bro 🫶🏾

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน

      Maybe I have a super power to read minds.... muhahahaha thanks for the support!!! #PAPAFAM all the way!

    • @agadaFrancisLouis
      @agadaFrancisLouis 7 หลายเดือนก่อน

      @@SonnySangha#PAPAFAM all the way!!!😄🔥❤️❤️❤️
      One day when I make it, I’ll do well to hit you up and support whatever you’re doing. Not all superheroes wear capes. You’re my hero, bro🫶🏾

  • @chinmaysawant1343
    @chinmaysawant1343 8 หลายเดือนก่อน

    I was trying to move the firebaseConfiguration to env file. But it is giving bucketNotFound error. I tried to debug and found out that projectId and storageBucket are the culprits. If they are passed directly, it's working as expected. How to fix this?
    Also the rename and delete modal are lagging in performance. how to optimize it?

  • @chinmaysawant1343
    @chinmaysawant1343 8 หลายเดือนก่อน +1

    Totally agree with you about the live debugging. Keep it going!!

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน

      🙏🏽💯

  • @chessrecap5462
    @chessrecap5462 5 หลายเดือนก่อน

    hello sonny can i build nextjs app showing pdf page but not allowed the viewer to downlaods it using react-pdf pdfjs and i store the file in the any database.

  • @billwhite515
    @billwhite515 8 หลายเดือนก่อน

    I know react/nextjs are your forte but have you ever thought of having a build using angular, vue or svelte kit?

  • @yohansamuditha
    @yohansamuditha 8 หลายเดือนก่อน

    🔥🔥💖

  • @GavHTFC
    @GavHTFC 8 หลายเดือนก่อน

    36:34 bro was hurt by the very suggestion!

  • @GiggleGalaxy0.14
    @GiggleGalaxy0.14 4 หลายเดือนก่อน

    I m facing problem when i add on clerk .. please help me out and how I can I reach out you to show error

  • @jamestuttle
    @jamestuttle 7 หลายเดือนก่อน

    @Sonny, you mentioned at 1:21 in video about your going to do. Firebase videos - any ETAs? I am very interested in it, also on their messaging/nootificaitons services too..?

  • @ardianhotii
    @ardianhotii 8 หลายเดือนก่อน +1

    In you next video when you have to use files and uploads can you use uploadthing , if more people agree with me I want you to use it pls, your videos are soo good keep going

  • @crim-son
    @crim-son 8 หลายเดือนก่อน

    Please what is the point of the file reader at 1:16:20? why do we not just call upload file directly with the file?

  • @hassannasir1222
    @hassannasir1222 6 หลายเดือนก่อน

    hi i hope you are well
    Plz tell me that dropbox paid version has token usage time option i.e i want token can not be expire so please guide me i am waiting for your reply.

  • @JosesHamptona
    @JosesHamptona 8 หลายเดือนก่อน

    very good but it so cool

  • @lokindradangi
    @lokindradangi 7 หลายเดือนก่อน

    Minimum Asset should be provided to start such a video url, images url, (images used) so that it will be easy.

  • @nooneknowsme1370
    @nooneknowsme1370 8 หลายเดือนก่อน

    if the skeleton files (server loaded files) are available without any delay then why are calling files again in the client side and causing more delay? i didn't understand the logic behind it. was it just for the skeleton effect? or any other logic behind it?

    • @shubhamdhage96
      @shubhamdhage96 3 หลายเดือนก่อน

      I believe to get files from server/firebase should alway be a network call. if not next.js will cache the page and we may not see latest updates. so this delay is acceptable.

  • @moreshwardalavi
    @moreshwardalavi 8 หลายเดือนก่อน +1

    Hi Sonny,
    If we added the following line,
    publicRoutes: ["/"];
    then to redirect to a route `/dashbaord` but it's not working as excepted.
    in the terminal getting following message:
    INFO: Clerk: The request to /dashboard is being redirected because there is no signed-in user, and the path is not included in `ignoredRoutes` or `publicRoutes`. To prevent this behavior, choose one of:
    1. To make the route accessible to both signed in and signed out users, add "/dashboard" to the `publicRoutes` array passed to authMiddleware
    2. To prevent Clerk authentication from running at
    all, pass `ignoredRoutes: ["/((?!api|trpc))(_next.*|.+\.[\w]+$)", "/dashboard"]` to authMiddleware
    3. Pass a custom `afterAuth` to authMiddleware, and replace Clerk's default behavior of redirecting unless a route is included in publicRoutes

  • @crisreyes1630
    @crisreyes1630 8 หลายเดือนก่อน

    When i drop and drag the file it doesn't push through firebase i did exactly the same you did maybe it was the import ?

    • @crisreyes1630
      @crisreyes1630 8 หลายเดือนก่อน

      NVM haha ijust forgot to pass the onDrop on DropzoneComponent thanks

  • @AuRoN344
    @AuRoN344 8 หลายเดือนก่อน

    2:07:13 How is that possible it refreshes de table after uploading another file? I really dont see the part of code where he rettriggers the call to get all the files again. After uploading a file the application should not rerender anything since it is not changing its state.

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน

      React Firebase hooks uses a realtime listener, this is why it’s always listening and updating due to changes in the database!

    • @AuRoN344
      @AuRoN344 8 หลายเดือนก่อน

      @@SonnySangha Didnt know that. Thank you very much for your fast answer and all the content you make :)

  • @chinmaysawant1343
    @chinmaysawant1343 8 หลายเดือนก่อน

    Issues faced and their solution:
    1)Error: Clerk: auth() was called but Clerk can't detect usage of authMiddleware() - I was using node version 18, updated to 20 and it got resolved

    • @gokulkandasamy4952
      @gokulkandasamy4952 7 หลายเดือนก่อน

      same error came for me,i updated to node version 20 but not working

  • @sayandutta2038
    @sayandutta2038 8 หลายเดือนก่อน

    Did anyone get the same error: `Error: Clerk: auth() was called but Clerk can't detect usage of authMiddleware()`

    • @HarshvardhanGaikwad6969
      @HarshvardhanGaikwad6969 8 หลายเดือนก่อน

      Maybe you're using node version 18, update it to v20 and it will get resolved

    • @sayandutta2038
      @sayandutta2038 8 หลายเดือนก่อน

      @@HarshvardhanGaikwad6969 doesn't work, bruhhh

  • @usmanmarkaz
    @usmanmarkaz 8 หลายเดือนก่อน

    Am waiting for some React native App Projects please make 3 to four apps like your long NEXT JS video please

  • @chasedemaster6888
    @chasedemaster6888 8 หลายเดือนก่อน

    track id for 50:00 ?

  • @SupremeDriveTV
    @SupremeDriveTV 8 หลายเดือนก่อน

    clerk did not work for me
    do you have solution

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน +3

      Need more info, nobody will be able to help with little info! :D

    • @SupremeDriveTV
      @SupremeDriveTV 7 หลายเดือนก่อน

      thanks but i was able to pull it off it had @@SonnySanghato do with the middleware not placed correctly.​

  • @kelechihilary1270
    @kelechihilary1270 8 หลายเดือนก่อน

    Please does anyone have the constant.ts file ?

    • @raamlaaa
      @raamlaaa 8 หลายเดือนก่อน

      i created this one:
      export const COLOR_EXTENSION_MAP: { [key: string]: string } = {
      txt : "#C0C0C0",
      doc : "#0000FF",
      docx : "#00008B",
      pdf : "#FF0000",
      ppt : "#FFA500",
      pptx : "#FF8C00",
      xls : "#008000",
      xlsx : "#006400",
      jpg : "#00FFFF",
      png : "#008B8B",
      gif : "#FFFF00",
      mp3 : "#800080",
      mp4 : "#4B0082",
      zip : "#A52A2A",
      rar : "#8B4513",
      html : "#FFD700",
      css : "#FF4500",
      js : "#FF6347",
      json : "#2E8B57",
      xml : "#9932CC",
      svg : "#800000",
      php : "#8A2BE2",
      java : "#F08080",
      py : "#FF69B4",
      cpp : "#B22222",
      c : "#A0522D",
      md : "#4B0082",
      csv : "#2F4F4F",
      log : "#4682B4",
      exe : "#8B0000",
      dll : "#800000",
      bat : "#A52A2A",
      sh : "#808000",
      sql : "#008080",
      };

    • @raamlaaa
      @raamlaaa 8 หลายเดือนก่อน

      after implementing the skeleton Loader (2/2) i get an empty array when i consol log the skeletonFile , do you have any idea why?

  • @marcosviniciusmoreira9115
    @marcosviniciusmoreira9115 8 หลายเดือนก่อน +2

    "I'm encountering an issue when declaring 'open' with 'isDeleteModalOpen'. I'm getting an error saying 'Type '(open: boolean) => void' is not assignable to type 'boolean | undefined.' Could you provide guidance on resolving this issue? It's happening around the 02:26:00 mark of the tutorial."

    • @amandacaroline488
      @amandacaroline488 8 หลายเดือนก่อน

      I have the same bug @sonny save us 😢

  • @codelucky
    @codelucky 8 หลายเดือนก่อน +2

    Background music was too loud and unnecessary.

    • @SonnySangha
      @SonnySangha  8 หลายเดือนก่อน +1

      Feedback noted

  • @mabdurrafeyahmed9256
    @mabdurrafeyahmed9256 8 หลายเดือนก่อน

    please add timeline of video. very hard to view video

  • @vittoriomorellini1939
    @vittoriomorellini1939 8 หลายเดือนก่อน

    Good video. Why did you select clerk for auth and you do not select firebase as you already used firebase for storage?

    • @lawrencemacharia2182
      @lawrencemacharia2182 7 หลายเดือนก่อน

      To explore or use a new/different library. Yes, firebase can do the same, but it's always good to learn something new. To increase options when you will building. My opinion!

  • @vittoriomorellini1939
    @vittoriomorellini1939 8 หลายเดือนก่อน

    Are you located in Dubai??