Building an email client with the Next.js App Router & Postgres

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

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

  • @vimtor
    @vimtor 9 หลายเดือนก่อน +134

    Great video! As feedback, I think the screen studio effects are excessive for this type of video. I feel a bit dizzy after watching it.

    • @leerob
      @leerob  9 หลายเดือนก่อน +24

      Yeah I think I agree, first time I've tried using this out but don't know if I love it for longer videos

    • @crampssss
      @crampssss 9 หลายเดือนก่อน +26

      ​@@leerob Also the delay between the animated cursor vs the highlights when hovering is jarring 😵‍💫

    • @aryan.prince
      @aryan.prince 9 หลายเดือนก่อน +9

      @@leerobit’s the delayed cursor that’s most jarring. and it would’ve been nice if the screen zooms were a little more slower and steady for longer videos like this

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

      What software is that?

    • @aryan.prince
      @aryan.prince 9 หลายเดือนก่อน +3

      @@danielbark It’s called Screen Studio. I don’t think I can post links here but it’s made by this guy called Adam Pietrasiak

  • @gokulkrishh
    @gokulkrishh 9 หลายเดือนก่อน +16

    Good to see server actions in action. I am planning to use server actions in my new nextJS project. This was a good walk through.

  • @roberth8737
    @roberth8737 9 หลายเดือนก่อน +14

    Great video - interesting idea placing some components into layout to prevent the refresh/revalidation. This makes me think server side is more viable for dashboard like interfaces than I previously thought - more examples in this line would be great.

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

      Yeah, normally it has been hard to get that "SPA like" behavior, but with the App Router this becomes really easy. Plus, you can stream in your UI + send less JS to the client, so it's faster too :)

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

    Love this high level overview video format, with the most interesting bits explained! As opposed to full tutorial which could have been long and not too exciting.

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

    [00:00] 📧 Building an email client with Next.js and Postgres
    - Building an email client with Next.js and Postgres.
    - Taking advantage of caching for improved performance.
    [00:57] 🏗 Starting with Create Next App and layout setup
    - Initiating the project with Create Next App and configuring Tailwind and pnpm.
    - Designing the initial layout with three columns: folders, email list, and email view.
    [02:42] 🔄 Implementing shared layout and server component
    - Using shared layout to maintain scroll position between route changes.
    - Utilizing server component for the email column to improve performance.
    [04:29] 📬 Fetching and displaying emails in folders
    - Retrieving emails from the database based on folder name.
    - Displaying emails with conditional rendering for special folders.
    [05:41] 📝 Creating a new email with server-side validation
    - Designing a form for composing emails with type-ahead functionality for recipients.
    - Implementing client and server-side validation for form inputs.
    [08:19] 🗃 Handling database transactions for email composition
    - Managing database transactions for sending and receiving emails.
    - Updating data and redirecting after successful email creation.
    [10:35] 🚀 Progressive enhancement with Server Actions
    - Demonstrating Server Actions without JavaScript dependency for sending emails.
    - Showcasing the application's functionality without JavaScript enabled.
    Made with HARPA AI

  • @Shawn-Mosher
    @Shawn-Mosher 9 หลายเดือนก่อน

    Great video Lee! Awesome to see it all come together! Gotta love Nextjs

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

    It was an informative video. Would love to see more like this, explaining concepts and features by projects.

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

    i haven't played with Next13 in a while, since Next14 was released lately i was like why not building this small app with you. Had lot of fun and learned lot thanks Lee for those fun and useful tutos as usual keep it up

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

    As good as the animations looked they were a little distracting for me personally. For the demo it was fine but for the code review maybe just a regular viewing with slightly zoomed in would be nice. Just my opinion, thank you for introducing to me v0 it looks very interesting.

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

    Dope video, loved the effects and presentation style

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

    more content like this!
    it was a great video and very educational even for those who write Next every single day!🥳 (blazing fast too)

  • @nick-ui
    @nick-ui 9 หลายเดือนก่อน

    Lee, Make more videos like this, thats amazing

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

      Thanks!

  • @real-oppenheimer
    @real-oppenheimer 9 หลายเดือนก่อน +3

    I am really curious how we're going to use *real* (and not the native) client-side validation with useFormState. Without it, you'll always have to wait for the server action response to know your field is valid. What if it is invalid (e.g. "min. 2 characters"), you add some characters to make it valid? Without client-side validation, you only see your validation status after a submit request - and I bet you don't want to send a request for every keystroke. Sure, you have to validate in the server action anyways, but I have yet to see a solution for how to ALSO do the validation on the client (especially for re-validation on input) with React's new form hooks.

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

    Thanks for sharing this, helps tremendously! Might add though, that the code linked isn't the same structure though so its a little difficult to follow, e.g. the layout files aren't doing what you say in the video.

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

    aaaaaaaaaand I have motion sickness 🫠 Great run down, thank you. Perhaps a little less cursor chasing/panning though?

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

    Hi Lee, can make a video specifically about the four caching strategies that NextJS 14 offers, with examples? It’d be great if you can also explain the different invalidation techniques and their pros and cons.

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

    I like the Mickey Mouse glove cursor you got there

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

      Thank you I made it myself (jk it's Screen Studio)

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

    Hello, I have a similar app to this but with animation and when I click for example an email in your app the FirstColumn Component re-renders which is annoying to have the animation happen on FirstColumn on every email click. I use parallel route instead of component and Optional Catch-All Segments.

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

    Love your videos. Just wanted to echo some of the other comments on the animation flying around. I found it really quite difficult to watch.

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

    on github repo there is no layout component inside f/[name]

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

    Regarding the scroll position niceity: Rerending would not be a problem regarding the scroll position. Remounting would be a problem 🤓.

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

    Hey Lee, great vid as usual. May I ask, what mic and camera setup you're using or recommend for someone interested in doing some amazing videos like yours, thank you!

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

    Fantastic video! And yeah please make some more videos ❤❤❤❤

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

    Great vid, Lee!
    Can’t wait to use v0 😅

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

    I have been having big problems finding a postgres to nextjs project that dosen't use a ORM. Thanks!

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

    Hi Lee. Can we use server action (not form action) to mutate data on the server? something like setting a loading state to true inside a form submit handler and then calling the server action mutation and await it, then setting the loading state again to false. I thought it's cool because I have a full type safety of whatever the server action mutation is returning. That way I can return some error object and show it in the client

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

    Thank you for the content 🙌 quick question, why did not you prefer parallel routes?

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

    What software do you use for video editing? Great video btw

  • @yunglee.
    @yunglee. 9 หลายเดือนก่อน

    Nice video! Could you go through Server Actions in more detail? Especially how to implement error handling

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

    Hi just curious, is this also possible with Remix or just React? Or its a unique feature of nextjs or is it just way easier in nextjs? Really looking for motivation to learn nextjs/remix

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

    Great video! Is it true that as soon as you add any authentication, the automatic cache doesn't work anymore? Eagerly awaiting more docs on unstable_cache (and for it to get stable :D), or does sql`` from vercel postgres use fetch under the hood?

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

      Vercel Postgres uses fetch, but for non-fetch based things, we're working on other caching improvements next to simplify that story. unstable_cache is okay but we can do better :) And it's fine to have authentication and dynamic rendering, while still having cached data. If you wanna see a tutorial for that, we have a new course on nextjs.org/learn

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

    That was something so incredible, man

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

    Great job! Love your videos.
    Btw how would you reset the scroll if the layout is not re-rendered?
    Like on a regular website, I have a header & footer in the layout so when navigating between pages the scroll stays the same. Ideally it should reset to the top after new page is rendered isn't it?

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

    hello, a question what does revalidatePath('/', 'layout') mean ? is the 'layout' a path ?

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

      It's refreshing all the data, I could also do cache tags if I wanted

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

    I am interest to see how you would handle file and screenshot attachment

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

    Great video!

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

    Really cool. Can you do file attachments with Vercel Blob next?

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

    Why would you be joining users to obtain recipient data in Sent folder? That should just be a part of the email itself, otherwise it means you're adding everyone I ever send emails to as users. Same goes for Inbox, fetching sender details from users? Everyone that ever sends me an email is saved as a user? Unless I'm missing something, this makes little sense...

  • @dan-powell
    @dan-powell 9 หลายเดือนก่อน

    Is pretty fantastic stuff!
    Was toying around with some concepts today. Would be slick if server-fetched data like vercel/postgres queries could be linked to a tag in cache instead of "just" the route
    Hoping that I'll be writing fetch("/api/xxxx") less and less often

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

      Yeah we're working on making this easier than today where you need to use unstable_cache to add tags nextjs.org/docs/app/api-reference/functions/unstable_cache

    • @dan-powell
      @dan-powell 9 หลายเดือนก่อน

      Not tryna be an ungrateful gimme-more guy! The feature sets y'all are pumping out are fantastic! Will check out unstable_cache as it seems like what I was after.
      For my current use case (a baby admin zone website builder w/ only a few tables) it isn't too tricky to know where data is out-of-date. I would expect that with bigger projects this would be a great add as it becomes near-impossible to remember where all data is being used.

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

    would be great if you would have connected gmail or outlook and get those emails.

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

    Nice video. Thanks for sharing.
    Quick question. Ive seen alot of those intros with the same style of editing to showcase the application/webpage. How did you create that, if you dont mind me asking? :)

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

      Curious about the same question, since I do a lot of tutorials :)

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

      Screen Studio

  • @0xtz_
    @0xtz_ 9 หลายเดือนก่อน

    😮 we want more of those videos please
    Just one thing the I can't focus on the video bc it keeps following the mouse hhhh 😅

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

    Great video. Quick question, what did you use to disable JavaScript? It always take me some time finding it in the devtools.

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

      Command + Shift + P

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

      @@leerob waaat. So much time would have been saved if I knew about this before 😆. Thanks!

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

    What do you use yo récord and make the camera zoom follow the cursor? I would love to know, thank you!

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

      Screen Studio

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

      thanks @@leerob

  • @user-ld1de1mc4h
    @user-ld1de1mc4h 9 หลายเดือนก่อน

    Can you please make a tutorial for that? Including the backend, I would love to see this with Nest.js for a backend.

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

    Hi there nice vid, although I must say the effect makes me feel nauseous. I like the zoom on the code, but it’s too many transitions

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

    The caching benefits you mentioned, are they Vercel specific things Or any VPS NodeJS env can have as well?

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

      Works when self-hosting, too!

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

    but the caching works because there is no authentication right? reading headers would remove the default cache

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

      If you wanted to read headers, the page would render dynamically, but you can still have the *data* be cached. So page transitions can still feel fast. We're also working on optimizing to make as much of the page static as possible in Next.js 14 nextjs.org/14.

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

      If you wanted to read headers, the page would render dynamically, but you can still have the *data* be cached. So page transitions can still feel fast. We're also working on optimizing to make as much of the page static as possible in Next.js 14 nextjs.org/14.

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

    Great video, what about windows users for the command + enter ? would it just be ctrl + enter ?

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

      Yeah that sounds correct

  • @ray-lee
    @ray-lee 9 หลายเดือนก่อน

    why use onSubmit with the deleteEmail action?

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

    What is the cache mechanism used here (for data fetching)? I see in NextJS there are different cache mechanisms (Request Memoization, Data Cache, Full Route Cache, Router Cache) but since 'fetch' wasn't used in the code, I wasn't sure how the code cache the data.

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

      Vercel Postgres is using `fetch`. So it would work the same if you were using `fetch` directly. If you're not using `fetch`, you could use this nextjs.org/docs/app/api-reference/functions/unstable_cache

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

      @@leerob got it. thanks for the info

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

    who edits your video, too smooth is this ai, or high paying editor

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

    What's the difference between using router.refresh and revalidatePath? could you explain the use cases please :)

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

      You shouldn't need to use router.refresh, in general revalidateTag is going to be the best option for the most granular caching, and then revalidatePath would be the next choice.

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

    When is v0 out of private access?

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

    Thnx

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

    Thanks for the share. But could you please keep your screen stable while moving the cursor, my eyes are really hurt after finish watching your video!

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

    Pl. update the github code

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

    Please add socket support to next js

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

    What? How are you using await in a component?!

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

      nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating

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

    couldve just used php

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

      this tbh

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

    hi Lee don’t mean to be critical and hope you this feedback ina positive sense -if you could build simple app which shows how to login using email and password ., with email verification and two factor auth - it would be much more useful - and no i don’t want to use an external auth service - nor use next auth - which frankly looks like a hobby project - next js badly needs the kind of dev ex that laravel provides

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

      next-auth isn't a hobby project :) Our official tutorial teaches user/pass login this way! nextjs.org/learn

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

    hi leo 🖐️

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

    Can you please when you demo things stop zooming in and out all the time. My head hurts watching this zoom action :S.
    Thanks :D

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

    i thought it was email system 💀

  • @rohithn-76
    @rohithn-76 8 หลายเดือนก่อน

    Next js router is too fast ..

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

    Can’t people reply? 😂

  • @mr.anonymous7184
    @mr.anonymous7184 9 หลายเดือนก่อน

    Test 123 abc

  • @user-ieffc
    @user-ieffc 9 หลายเดือนก่อน

    video is hard to watch

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

    Instead of running postgres on frontend, why are not there simple things since the dawn of internet like sitemaps indexes and i18n path routing? Sloppy versions, half baked features and useless things.

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

      Sitemap: nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap
      i18n: nextjs.org/docs/app/building-your-application/routing/internationalization

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

    Can wait for v0