Taylor Lindores-Reeves
Taylor Lindores-Reeves
  • Видео 11
  • Просмотров 64 394
Ultimate Guide: Function Calling with Vercel’s AI SDK RSC & NextJS 14
Join me in this comprehensive tutorial where I guide you through building a powerful crypto chatbot and stats interface with NextJS using Vercel’s AI SDK RSC package. This allows you to stream generative user interfaces to the browser using React Server Components & Server Actions.
I guide you through everything from setting up your environment, installing and configuring tools like TypeScript and Tailwind, and implementing code formatting with BiomeJS. You’ll learn how to handle API keys, manage environment variables, and stream various UI components for a truly unique user experience.
We incorporate tool calling in our AI integration which gives the LLM the ability to decide when and how...
Просмотров: 13 166

Видео

NextAuth v5 for Beginners: Simple Server-Side Auth in NextJS
Просмотров 1,4 тыс.6 месяцев назад
In this video, learn how to set up AuthJS v5 beta for authentication on the server in NextJS 14. This tutorial covers configuring sign-in and sign-out processes, email-only authentication with sessions, and setting up NextAuth to handle everything on the server. We'll use a database for session management, and explore essential configurations, Prisma ORM integration, and securing pages and API ...
The Easiest Way to Generate Clean NextJS API Documentation
Просмотров 5926 месяцев назад
First of all, sorry for the audio quality... This beginner-friendly tutorial guides you through the process of building a Todo List app using NextJS API Routes with the Next REST Framework package, which automatically generates clean API documentation for each API request. Throughout the video, you'll gain hands-on experience as we code the app's functionality including create, read, update, an...
Mastering Fetch API and Caching in NextJS
Просмотров 2,2 тыс.10 месяцев назад
In this video, I guide you through a useful approach to managing the Fetch API and caching in NextJS. I demonstrate how the Fetch API by default caches data, which can be beneficial for reducing server resource load, but may also present obstacles when trying to display real-time data updates. I reveal a workaround that involves setting the cache on a global level, which allows for setting cach...
How to Build an AI Assistant using NextJS (Vercel)
Просмотров 3,2 тыс.Год назад
Throughout this in-depth tutorial, we’ll learn how to build a research paper summariser using OpenAI's Assistants API. The summariser takes in a document as form data and returns a summary of the document as the response. I will walk you through handling file data, form submissions, and responses from the API. We’ll also learn some of the limitations of the current version of the API. If you ar...
NextJS Server-Side Product Modals using URL, Suspense & Fetch
Просмотров 14 тыс.Год назад
Discover how to set up pop-up modals on the server! In this tutorial, learn how to build modals that are fully server-side rendered using Next.js. The video guide walks through how to create a product page by fetching data from a public API, manipulating URL state and using React Suspense for handling loading states. Attention is also given to building a loading UI and demonstrating a convenien...
New React Hooks with NextJS Server Actions (2024)
Просмотров 1,6 тыс.Год назад
Dive into my latest tutorial on the experimental useFormStatus and useFormState hooks! Discover how to enhance your web applications with server-side capabilities, enabling features like comment systems. This comprehensive guide walks you through the installation of these new hooks and demonstrates their potential with a practical example. I tackle the nuances of creating a comment system, show...
Database Session Authentication with Prisma & NextJS App Directory
Просмотров 16 тыс.Год назад
In-depth tutorial on Next-Auth login authentication - you will learn how to protect your pages with authentication using advanced strategies like NextAuth database sessions and Prisma client extensions. Plus, passwordless login for a seamless user experience! 🔥 🔑 Key Takeaways 1. How to set up NextJS app in 2 minutes 2. How to set up a new database and Prisma query layer 3. How to set up NextAu...
Server-side Pagination with NextJS 13 Server Actions
Просмотров 12 тыс.Год назад
Welcome to this in-depth tutorial on setting up SEO-optimised, server-side rendered pagination in Next.js 13.5 using Prisma ORM as the database querying layer. If you're looking to create a listing page or e-commerce shop, this guide is tailored for you. Pagination helps search engines understand your site structure and ensures all your pages are crawled and indexed, which is particularly impor...
NextJS 14 Image Optimisation using Imgix (2024)
Просмотров 678Год назад
In this comprehensive tutorial, we'll dive deep into the world of image loading by leveraging NextJS's Image component, Imgix, and AWS S3. You'll learn how to create an Imgix Source, set up an S3 bucket, and create an IAM user with the necessary permissions and access keys. You'll also learn how to beautifully integrate these elements using NextJS's Image component with the loader prop and load...

Комментарии

  • @aamishahmadbeg6813
    @aamishahmadbeg6813 11 дней назад

    What would you really use AI generated UI for exactly? Not sure how useful this paradigm would be, amazing tutorial on the topic tho!!!

  • @Péter--2222
    @Péter--2222 17 дней назад

    I got an error "Error: PrismaClient is unable to run in Vercel Edge Functions.", despite that I copied your code. What version of next-auth are you using?

  • @xardasu3646
    @xardasu3646 17 дней назад

    how do you update session with NextAuth V5

  • @ArjunCodess
    @ArjunCodess Месяц назад

    great video!

  • @sammsiska
    @sammsiska Месяц назад

    Why did you using bum instead of npm?

  • @foundationweb1123
    @foundationweb1123 Месяц назад

    Could you guide us how can we store these chats in our mongodb database? This is the best and the only tutorial exists on vercel ai rsc. Ver well and amazing no doubt about it.

  • @voie420
    @voie420 Месяц назад

    Props is undefined for me? I have the middleware and everything?

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

    This mf just copy pasting the code with no explanations…

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

    Hey bro, You're a good developer, but it was just hard to follow, I couldn't understand it. Just a feedback from my side. Great Efforts though!!!

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

    More content please! That was probably one of the best tutorial out there: Clear with room for real life mistakes so that we can know how to go about debugging stuff.

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

      Thank you so much for you kind words, means a lot. I will be releasing another video soon, schedule has been so busy as of late but I do indeed have something coming 🎉

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

    Thanks

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

    when we get a session within the layout, is it considered best practice? is there any security issue there? Layout not able to change the state i think.

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

      Possibly yes. I've since learned it's probably not best practice to include the session in the layout. Would recommend using it in page or Server Component instead.

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

      @@taylorlindoresreeves I'm still confused on how to integrate database session with nextjs middleware. I found that we can do the session strategy jwt (using the next auth library, but need to split authConfig), but if we do this still we are using jwt not database. What's so far i found that according to the official nextjs doc about authentication, we can use the session management library. But I'm still not knowing how to do this with middleware. Perhaps we can share this info

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

      ​​⁠there are only 3 ways you can get the database sessions working with middleware: 1. You need to set up an edge compatible database. Personally I've tried setting Prisma up but it's a hassle, I've always resorted to the following; 2. Set up a redirect based on the cookie existing in the middleware. You are able to use nextjs cookies() method to get the cookie, and use that as the session. In other words, redirect if the cookie exists. However, production cookies are prefixed with Secure__ so you need to account for that in a production environment. 3. Use nextJS redirect method on the layout or page level, effectively redirecting when the session doesn't exist. Only #1 wraps the middleware in auth(). #2 is just standard nextJS middleware. And #3 does not require middleware. Hope this helps!

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

      @@taylorlindoresreeves yeah might be good to do 1# and 2# i think.

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

    Awesome content. Thanks mate. please stripe subscriptions and stream sdk video calling. for a paid zoom service saas project

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

      That's very specific, but I'll defo do more streaming and also stripe integrations, something I'm very familiar with 👌

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

      @@taylorlindoresreeves Thank you so much

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

    2 months nothing posted 😒

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

      Bro thanks for the prompt, I've been a bit useless. Video editing is insanely time consuming and alongside my business I'm trying to manage it. The next video is going to be worth the wait 💪

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

    Bro make more videos on vercel ai. plzz

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

      Got a massive video coming soon, it includes Vercel AI structured outputs - keep your eyes peeled 👀

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

      @@taylorreeves3642 looking forward to it.

  • @Aaronmoreno
    @Aaronmoreno 4 месяца назад

    this is by far the best tutorial I've seen on this topic. Great pace and well explained. Thanks!

  • @baqirnekfardev
    @baqirnekfardev 4 месяца назад

    Amazing content! so cool and straight forward to the topic liked it 💗

  • @waltwaltz
    @waltwaltz 4 месяца назад

    this is an amazing tutorial

    • @waltwaltz
      @waltwaltz 4 месяца назад

      did you deploy your code to vercel? I make my own and seem to run into timing out errors when deploying

    • @taylorlindoresreeves
      @taylorlindoresreeves 4 месяца назад

      What are the errors? I've often found issues with the AI packages when deploying to vercel. Was able to solve it by adding longer timeouts and force dynamic. Let me know what issues you're facing and I may be able to help.

  • @oscarresonable2008
    @oscarresonable2008 4 месяца назад

    This a real gem content.👌 Hoping for more nextjs video. Thank you so much.❤

  • @JayconMadrid
    @JayconMadrid 4 месяца назад

    Where can I get the callback url after submitting an email?

  • @gamescope2607
    @gamescope2607 4 месяца назад

    Fantastic video! I really appreciate it. Thanks a lot!

  • @ab_naved1362
    @ab_naved1362 4 месяца назад

    Using this tutorial i convert this code into recipe finder bot ?? What I can change?

    • @waltwaltz
      @waltwaltz 4 месяца назад

      the actions.tsx is the best place to start and then create new UIs in the components folder

  • @user-bsksoen2133
    @user-bsksoen2133 4 месяца назад

    Korean windows 11 cannot run bunx it seems endcoing problem. please use npm when you teach tutorial..

  • @sivasirigiri6616
    @sivasirigiri6616 4 месяца назад

    Hey can you please make a same video using trpc or t3 stack

  • @zak_porat
    @zak_porat 5 месяцев назад

    Hey, I really like your UI settings. If you can make a video on them or share the json code, that would be amazing!

  • @trndsettrlabs
    @trndsettrlabs 5 месяцев назад

    What vscode theme are you using?

  • @srenhyer3895
    @srenhyer3895 5 месяцев назад

    Few more questions. After implementing it this way I noticed that my page in the background did a rerender when the searchParams changed, even if I did router.replace instead of pushing the params. Also I wonder what are the pros of doing it this way (besides the js bundle size difference of a single client/server component), instead of just toggling the modal with a provider and passing in the server components by prop? I'd assume a modal would be the ideal usecase for keeping the modal a client component and passing in the server components? I'm asking because I'm not entirely sure.

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      You could try using window.history.replaceState as this replaces the URL without browser refresh. The main benefit I think is SEO - pretty sure the search engines can pick up the URLs for each product modal when they're server rendered, but not with client components because it uses JavaScript to render the modal.

    • @srenhyer3895
      @srenhyer3895 5 месяцев назад

      @@taylorlindoresreeves Thanks. Doesn't seem like you can "wait" executing/fetching from a server component child component until the parent modal client component is opened. It seem as if the modal is a client component, and ServerComponentThatFetches is passed as child/prop it starts fetching its data immediately and does not wait for the modal to show its content. So server modals might be our only option if we have serer components inside the modal that needs to fetch some data upon display.

  • @srenhyer3895
    @srenhyer3895 5 месяцев назад

    Around thee 4.10 mark you mention that it's a bit of a technical challenge but definitely still doable to implement server side modals for global modals, but I'm curious how you'd do that let's say for a modal you trigger from clicking a button/icon in a global header, since you have no way of knowing whether search params changed from the root layout? :-)

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      You can achieve this using middleware to capture the search parameters, storing them in a cookie. This same cookie can then be accessed in the layout at load time and during server‑side rendering.

    • @srenhyer3895
      @srenhyer3895 5 месяцев назад

      @@taylorlindoresreeves don't you mean setting them in a header and not a cookie? Just like you do for the pathname? That will opt all routes into dynamic rendering, but that might be acceptable.

  • @riponsoum
    @riponsoum 5 месяцев назад

    github link not working

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      My bad, it was the incorrect link. Have updated it now!

  • @GuriLudhiana
    @GuriLudhiana 5 месяцев назад

    knowledgeable

  • @nasko235679
    @nasko235679 5 месяцев назад

    There's 0 documentation on credentials provider + database session. When I asked the creator of AuthJS he told me there never will be because he doesn't like it and I should just use JWT. You seem well versed in what is undoubtedly the worst documented auth library in the world lol, so it would be extremely helpful if you could make a video about credentials + database session setup. It's really hard for me to understand as a newer developer since it's all abstracted away and I don't know how to implement the session logic.

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      Yeah, I've set up credentials across multiple projects so I certainly will create a video on that. It requires a few workarounds because as you said, the author doesn't want you to use credentials and it's obvious when trying to configure it, you have to implement a few hacks. Video will come soon. Thanks!

    • @nasko235679
      @nasko235679 5 месяцев назад

      @@taylorlindoresreeves No man, THANK YOU! Coming from Laravel where everything is batteries included, setting up an actually useable nextJS environment with authentication is tough. So far I've had great success using lucia auth for database sessions + credentials, but I'd like to learn how to do the same in authJS.

  • @varunmehra5
    @varunmehra5 5 месяцев назад

    Love this kinda content which is so natural that you didnt even bother editing the part where you missed importing Zod. Inspired me haha to not take my mistakes very seriously and get discouraged as a beginner

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      Absolutely 👍 I make mistakes all the time 😅 it's part of being a programmer! Enjoy the journey 👨‍💻

  • @NitroBrewbell
    @NitroBrewbell 5 месяцев назад

    Great Tutorial Taylor ! Thank you. Hope you continue with more guides. Has anyone run into bun issue halfway through with error message: "ReferenceError: Can't find variable: TextDecoderStream" ? with with streamUI() function in actions file . It seems to work on Node but not on Bun. The workaround seemed complicated to me on Bun

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      Thanks, no I haven't unfortunately. Hopefully someone else knows about this issue 🤔

  • @kyujong93
    @kyujong93 5 месяцев назад

    You have an apple keyboard :

  • @prashlovessamosa
    @prashlovessamosa 5 месяцев назад

    Wow thanks very helpful

  • @prashlovessamosa
    @prashlovessamosa 5 месяцев назад

    Great thanks for sharing

  • @tastefulthickness
    @tastefulthickness 5 месяцев назад

    To the moon 🤘H

  • @leo-phiponacci
    @leo-phiponacci 5 месяцев назад

    Thank you, great video! Can you please do a video about Credentials Provider with database sessions?

  • @StephenRayner
    @StephenRayner 5 месяцев назад

    Thumb down, too slow. Might be right for some junior devs. But for me this is so slow, watching you install packages and remove icons 😮😢.

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      Yeah man, I felt feedback on my previous videos was I was too fast, not running through each step of the code. But I guess I could try a balance. Try on 2x 👍

    • @DoingCoding
      @DoingCoding 4 месяца назад

      As a senior dev do you know there is 2x speed for videos too

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

      @@taylorlindoresreeves I think the video does not need to be cropped and accelerated, everything is clearly explained

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

      It is slow but you can just look at the source code or forward 2x. I think still a great job!

  • @gamingwolf3385
    @gamingwolf3385 5 месяцев назад

    Thank you for the video . Keep going bro !

  • @ericintech
    @ericintech 6 месяцев назад

    great tutorial💯...is it possible to do a recursive function call with this? for instance it calls the get_crypto_price function and then uses the result to call a different function? thanks for the content

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      Hmm you might be able to do it by updating the AI state with another system message that asks the LLM to run another function. What’s the use case out of curiosity?

  • @salieflewis
    @salieflewis 6 месяцев назад

    My understanding was Next.js does optimization inherently within its Image component, is Imgix more effective at compression?

    • @taylorlindoresreeves
      @taylorlindoresreeves 6 месяцев назад

      For sure, NextJS does indeed do some optimisation. But with the loader prop for the image component you get the benefit of handing off your images to an external source such as S3 bucket, which is always beneficial in terms of performance. But with Imgix as an additional caching and compression layer, you get fine grained control of your images, all while having them stored in an external source. Technically you could store 20mb images and not have to worry about how to handle compression and optimisation in the business logic or frontend layer image component (I think NextJS uses Sharp). You simply use the imgix URL and provide it with format and compress query parameters.

    • @salieflewis
      @salieflewis 5 месяцев назад

      @@taylorlindoresreeves That makes sense! Do you know if there is a similar workflow that can be used alongside Expo’s Image component?

    • @taylorlindoresreeves
      @taylorlindoresreeves 5 месяцев назад

      @@salieflewis hmm I’m not sure honestly, I don’t have experience with Expo. Good luck 🤞

  • @karamguliyev7803
    @karamguliyev7803 6 месяцев назад

    Hey, I have noticed your code shows source in every paragraph. But I couldn’t understand how you managed to do that. Would you explain it to me or tell me when did you code that part?

  • @fixesdev
    @fixesdev 6 месяцев назад

    Excellent video! keep em coming, cheers

  • @MeowRanger007
    @MeowRanger007 6 месяцев назад

    Beautiful Content🔥🔥 Deserve a lot more subs❤❤

  • @helciofranco6134
    @helciofranco6134 6 месяцев назад

    Is this cache for a specific user-session or shared between every user? I'd like to understand if another user have accessed your site if he would trigger a new request or not

    • @taylorlindoresreeves
      @taylorlindoresreeves 6 месяцев назад

      For a REST API it’s cached globally for all users. However, if using a server action, fetch requests are not cached.

  • @ShaneCrenshaw
    @ShaneCrenshaw 6 месяцев назад

    Do you have an updated version by any chance for Vercel's latest versions?

    • @taylorlindoresreeves
      @taylorlindoresreeves 6 месяцев назад

      Yeah I do, I’m just re-publishing. I forgot to add the intro to the final edit. Will be released in 1-2 hours. I think it’s the best video I’ve done. Hope you like it.

  • @snbwcs
    @snbwcs 6 месяцев назад

    Thank you, this is great content ! ;)

  • @megabanzaj
    @megabanzaj 6 месяцев назад

    thanks for tuto. No offence, hovewer some code looks overwhelmed. For example this: const currentPage = Math.min(Math.max(Number(page), 1), totalPages); Why can not you just use "page" variable instead, why you doing those calculations (I know that it's edge case handling)? Would be nice if you would explain those parts in your videos as well because it is not obvious at the first look. Now the biggest part of your video you just copy pasting some code that makes me feel that you just reusing someone else solution. It just my thoughts that maybe can improve your content :)

    • @taylorlindoresreeves
      @taylorlindoresreeves 6 месяцев назад

      No worries. I am definitely going to spend more time in future videos explaining things a bit better (I am new to this). With regards to the copy pasting, I will try to do more coding on the fly - it just takes significantly longer so my concern is that people will get bored watching me code easy frontend stuff. Thanks for the feedback.

  • @destinygames3449
    @destinygames3449 7 месяцев назад

    This server sided thingy is out of hand. What next ,server sided client browser