T3: TRPC, Prisma and NextAuth Done Right

  Рет қаралды 93,288

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 260
@fev4
@fev4 Жыл бұрын
This is the best implementation of an ad I've seen. Deeply integrated into the content.
@arjundureja
@arjundureja Жыл бұрын
Probably the first time I watched an ad instead of skipping it
@gerelltroche
@gerelltroche Жыл бұрын
Completely watched this ad. It was a great, non annoying ad. Great work!!
@KronosaurusRex
@KronosaurusRex Жыл бұрын
And best of all, seems like something that adds real value to the video itself
@alalalal291
@alalalal291 Жыл бұрын
Great introduction and love how well the ad was presented. One small thing to mention though is that even though T3 stack is popularized by Theo, he has actually not created Create T3 App, it's created by the community.
@jherr
@jherr Жыл бұрын
Fair enough, my bad. Thank you community!
@ToddDunning
@ToddDunning Жыл бұрын
You know that has confused me too. I mean it says all over the place it's created by him, and then it says the community elsewhere. I think Theo is not exactly what we'd call shy and self-effacing.
@huge_letters
@huge_letters Жыл бұрын
@@ToddDunning I believe the idea is Theo is creator of T3 stack(the idea of using typescript, tailwind, trpcs etc), but not the creator of create-t3-app which is a utility to bootstrap a t3 stack project.
@jherr
@jherr Жыл бұрын
@@Winslow_Tech Sounds like in the future I will need more accurate attribution.
@hunterbertoson156
@hunterbertoson156 Жыл бұрын
I appreciate you showing us how to deploy it as well. I feel like so many tutorials dont show how to deploy.
@nazar1744
@nazar1744 Жыл бұрын
Finally this Stack gets more popular. It is so nice to work with it!
@stefankudla809
@stefankudla809 Жыл бұрын
Not only did this example make it easy to understand the T3 stack, but it looks stunning with Daisy UI! Enjoyed being able to focus on the functionality more than the styling.
@JEsterCW
@JEsterCW Жыл бұрын
Higly recommending to avoid daisy tho 💀
@compton8301
@compton8301 Жыл бұрын
@@JEsterCW why??
@pedromenezes4013
@pedromenezes4013 Жыл бұрын
Just starting as a developer and even though I don't get exactly how every tiny bit works under the hood I can appreciate and understand a lot of what was explained. Amazing and super rich content. Thanks again Jack!
@exokristian
@exokristian Жыл бұрын
Condensed and so clearly articulated! Wonderful presenting and teaching skills. Thank you for your great work.
@jakubkurdziel2407
@jakubkurdziel2407 Жыл бұрын
Amazing video, Thank You Jack.👏🏼 in 32:57 instead of creating the Topic type You can inport this like that: import type { Topic } from "@prisma/client";
@jherr
@jherr Жыл бұрын
True in this case. But if the TRPC layer weren't a straight pass-thru, and instead were doing some type of permutation, then you would not have proper sync between the client and the server. Because the client is talking to the server, and not to prisma directly.
@infisspablo8602
@infisspablo8602 Жыл бұрын
Banger video! Definitely helpful stuff for people who are just starting with T3 stack but also for folks who played with it for a bit
@dhavall08
@dhavall08 Жыл бұрын
That's really helpful to hear about keyboard shortcuts, tools and plugins along with tutorial.
@codewithguillaume
@codewithguillaume Жыл бұрын
Amazing setup Jack.
@metacarpo10
@metacarpo10 Жыл бұрын
Omg this couldnt be more perfect in time! I was actually just posting a stack overflow question because I was not able to refresh the page after mutation, I tried a lot of things yesterday, read a ton of documentation but somehow I couldnt and went to sleep angry lol, I guess I missed the onSucess inside the useMutation hook Idk I thought Id alteady tried it. Thanks!
@appuser
@appuser Жыл бұрын
This was 😘👌 Just needed a quick intro to T3 to see if it'll work for my next project, but got a lot of bonus exposure to the likes of DaisyUI, CodeMirror, react-markdown etc.
@kszyh_
@kszyh_ Жыл бұрын
I wish that NestJS supports tRPC officially
@jaany
@jaany Жыл бұрын
T3 video from the legend himself, and he got a sponsor too? Hell yeah
@reveillegaming
@reveillegaming Жыл бұрын
Will be watching this later. I've actually started a generic blog project using the stack. Enjoying it so far. Will see how much I enjoy on something more complex though.
@TheFourthPrince
@TheFourthPrince Жыл бұрын
Thanks Jack...I just learnt about tRPC and was thinking about integrating in next.js...And at that moment your video dropped...Thanks again...
@ismi-abbas
@ismi-abbas Жыл бұрын
I've been searching all day long how to quickly get into this t3app, and for me this is the most quick and precise tutorial. Thanks Jack!
@nishatsayyed8326
@nishatsayyed8326 Жыл бұрын
This is just incredible. Thanks for sharing Jack Waiting for more and more amazing professional quality content.
@riccardopellegrino5447
@riccardopellegrino5447 Жыл бұрын
Having this type of content for free is really a blessing. Thank you so much! 🚀
@samyogdhital
@samyogdhital Жыл бұрын
Jack are you reading my mind?? I was searching tutorial on exact tech stack and this came up!😀😀
@CaleMcCollough
@CaleMcCollough Жыл бұрын
Thank you so much for this tutorial. It's not super long. You have no idea how much you helped me, except that the tutorial you don't pause after you input code and that makes it crazy hard to follow it. I had to drop the speed down to 0.25x to catch the code you entered before it went off screen and that still too multiple tries. The instructions aren't 100% complete for Windows, you must put the API keys in the .env folder, and you need to add the correct API keys for the production GitHub OAuth app. Other than that it's nice to have a short tutorial that doesn't combine a bunch of the same stuff that takes so much time and has nothing to do with my app. Everyone's app is different and none of these tutorials have been good for me due to the bloat.
@crowdozer
@crowdozer Жыл бұрын
tRPC is amazing. When I saw Theo's video I got motivated to port the entire stack over to svelte lol The tRPC part was pretty easy to set up, it feels like magic to use lol
@deathmachine808
@deathmachine808 Жыл бұрын
Another excellent tutorial, cheers Jack
@darelbvcr687
@darelbvcr687 Жыл бұрын
can you make more of these? just started learning t3 stack and its amazing so far, just need to grasp few more concepts regarding trpc
@bigboylkjh
@bigboylkjh Жыл бұрын
I would like also see more works like that 😊
@nated0g745
@nated0g745 Жыл бұрын
Love it. The generated typing is really nice. Wild that useState is already “Good ol’ useState 😂”. JS moves so quickly.
@SanjuKumar-hk8yy
@SanjuKumar-hk8yy Жыл бұрын
Thank you Jack, for make a video on tRPC ☺️☺️
@thecodecatalyst
@thecodecatalyst Жыл бұрын
Great vid and stack I've been working in a personal project for 4 months and this is gold for it. Thanks!!!
@ergusto
@ergusto Жыл бұрын
This channel is incredible, you have a great teaching style. Very pleased to have found this channel, it has already been incredibly helpful.
@albert3120
@albert3120 Жыл бұрын
Hey thanks a lot for this content. I remember doing a project alongside your video and kind of forgot about it. Now I was stuck again with the .query .mutation procedures and I just remembered somewhere in my head about your videos and ta-da... you put me back in track in no time. Thanks, really :)
@clarkhinchcliff7824
@clarkhinchcliff7824 Жыл бұрын
Great video, Jack. Really helped me get ramped up quickly with a CRUD application in a single day. One minor question, Why use RouterOutputs["modelName"]["getAll"][0] against pulling the type directly from '@prisma/client'?
@jherr
@jherr Жыл бұрын
Because what I'm actually doing is calling TRPC, and not Prisma directly, so IMHO I should rely on the TRPC types because the TRPC layer could (but isn't in this case) be doing a little something extra with the Prisma output.
@jjrise
@jjrise Жыл бұрын
this type of content is the best, I really enjoy the code walkthroughs. T3 can be a bit confusing when new, especially relating to trpc and nextauth. One thing I did notice different is using refetch instead of .invalidation. Is there a difference between those two approaches for the onSuccess part of your mutations?
@jherr
@jherr Жыл бұрын
Yeah, I probably should have used the invalidation stuff, whoops.
@szluganaware
@szluganaware Жыл бұрын
How does the invalidation work? Where can I read about it or see some examples?
@jherr
@jherr Жыл бұрын
@@szluganaware tanstack.com/query/v4/docs/react/guides/query-invalidation It's super nice, basically you can say; when this query succeeds then refetch this other query automagically.
@szluganaware
@szluganaware Жыл бұрын
@@jherr Thank you!
@arhamsc9097
@arhamsc9097 Жыл бұрын
Awesome tutorial 👍🏻👍🏻, also would be great if you could share the terminal theme and autocomplete package you are using 😊.
@small_norweg_
@small_norweg_ Жыл бұрын
The only ad I don't want to skip❤
@bassam.2023
@bassam.2023 Жыл бұрын
What can I say? 🤔 The most comprehensive tRPC tutorial out there! 🙌🏻 🙏🏻 Thank you so much! 😁 PS Thanks for bringing attention to daisyUI, a life saver for those of us who are a bit behind on the CSS side of things!
@bassam.2023
@bassam.2023 Жыл бұрын
An interesting follow-up video might be to convert this app to allow for multiple users, each having access to only their own notes.
@faizanahmed9304
@faizanahmed9304 Жыл бұрын
**THE BEST** Tutorial on T3 stack! But sir I struggle with prisma, I think I must see a tutorial on it. Coming from mongoose I think it is overwhelming.
@volkan8583
@volkan8583 Жыл бұрын
Ty for making clear some things that not clear in my mind about how data flows UI to DB .
@yanrussell2015
@yanrussell2015 Жыл бұрын
the background scene of your video is beautiful !
@SuperShivammm
@SuperShivammm Жыл бұрын
Very well explain everything start to end of deployment. Thanks
@laous
@laous Жыл бұрын
Thank you very much! This is the best video to get you started with the t3-stack.
@aghileslounis
@aghileslounis Жыл бұрын
Scribe ! OMG what a great product and great AD Jack, such a master !
@VincentFulco
@VincentFulco Жыл бұрын
this was an extraordinary primer on the combo. thanks!
@hunterbertoson156
@hunterbertoson156 Жыл бұрын
Been looking forwarding to this. Thanks Jack!
@repe0
@repe0 Жыл бұрын
thank you for showing some love for pnpm
@laroikin
@laroikin Жыл бұрын
Yay!!! So glad to see you cover it!
@laroikin
@laroikin Жыл бұрын
Just finished watching the video. Fullstack will never get easier than that!
@abhishekvishwakarma9045
@abhishekvishwakarma9045 Жыл бұрын
Overall really great project to start with T3 stack (tRPC under the hood😌) already loving this stack 🤩, thanks for bringing in
@senkasim
@senkasim Жыл бұрын
Thanks for the tutorial content Jack 😎🖖
@BensTechLab
@BensTechLab Жыл бұрын
You win best sponsor integration! I was all ready to fast forward an off-topic irrelevant product shout out… but this was spot on. Hope you can keep up the sponsor alignment as you continue to grow.
@levantos
@levantos Жыл бұрын
So many gems in this, thanks Jack!
@07Weka
@07Weka Жыл бұрын
This is a super cool and clear tutorial. One thing I noticed when experimenting with this is that there is a significant lag following saving of a topic or note before they display in the list, as it needs to first save and refetch from the database. There are probably many solutions, but what would be the best approach to displaying a newly added tag in the list before syncing it to the database? Does trpc support optimistic updates?
@НаильШайхинуров-п7л
@НаильШайхинуров-п7л Жыл бұрын
I guess useQuery has optimistic result. Try to config the request somehow.
@devagr
@devagr Жыл бұрын
17:22 missed opportunity to show the new copy-paste env file into Vercel dashbaord
@sphesihlemanuel2933
@sphesihlemanuel2933 Жыл бұрын
Finally a video using a T3 Stack thanks
@danielbark
@danielbark Жыл бұрын
Great video Jack! I published almost the exact same video last week :P I also tried out some optimistic UI updates on the tRPC mutation hook if that would be interesting to anyone here. But definitely finish this video first! 💯
@arctiinae
@arctiinae Жыл бұрын
I watched yours first, and it was A+! It was my first intro to optimistic updates and it was great. Thanks!
@danielbark
@danielbark Жыл бұрын
@@arctiinae Thanks a lot! Glad you enjoyed :)
@pointman3352
@pointman3352 Жыл бұрын
Great content as always, learnt a lot. Thanks Jack
@blue_berry_pie64
@blue_berry_pie64 Жыл бұрын
best tutorial for old idea but new tech stack. 🤟🤛🤜
@sujithgnth
@sujithgnth Жыл бұрын
Mmm. I never had any idea on TRPC until I saw this quality video. Thanks Jack, thanks a ton
@Michael-Martell
@Michael-Martell Жыл бұрын
yes! Thank you! This video should be a hit!
@hbela1000
@hbela1000 Жыл бұрын
Thx, the best tutos I must say.
@vrmatt
@vrmatt 8 ай бұрын
really valuable information, thank you jack
@manoj-k
@manoj-k Жыл бұрын
Very well explained, Thank you very much for this video,❤
@brianfarley2723
@brianfarley2723 Жыл бұрын
@+- 25minutes. If your on page top.ts if the .topic is underlined with red showing error, restart your ide. Or CTRL + SHIFT + P then type: restart TS Server Not sure why you need to do this, but it works.
@hwj8640
@hwj8640 Жыл бұрын
A good channel for non-beginners.
@shozdott
@shozdott Жыл бұрын
I'm pretty new, can you elaborate on which env variables were set when deploying to vercel? you sorta just skipped right through them ty :) I know the database , did you change the next-auth url from localhost etc?
@Ellenox147
@Ellenox147 Жыл бұрын
Love your work ! Thanks for the video
@AstralHorse_UA
@AstralHorse_UA Жыл бұрын
Could you please share you configuration for chrome, I like your right tab bar, that’s looking awesome. Also good to see more great extensions. What do you use for creating user friendly diagrams?
@yoz0__
@yoz0__ Жыл бұрын
It’s Arc browser
@tiagoclarenc9911
@tiagoclarenc9911 10 ай бұрын
Hi Jack and thanks a lot for the great content ! I followed along until adding new topics and refetching them on the page. Although it works great in localhost I get a 401 unauthorized in vercel prod environment when trying to create a topic. Any idea what could be causing the discrepancy in prod ?
@zombiefacesupreme
@zombiefacesupreme Жыл бұрын
You can copy/paste your environment variables on Vercel now!
@elenakiseljova2493
@elenakiseljova2493 Жыл бұрын
This is a very cool lesson! Thanks
@beefykenny
@beefykenny Жыл бұрын
I learned a bunch!
@ВладиславШутеев-ф1м
@ВладиславШутеев-ф1м Жыл бұрын
Super content. Thank u!
@cb73
@cb73 Жыл бұрын
I’d love to see a version of create-t3-app using the new server component app folder structure
@mariocarlosrocapenafiel8749
@mariocarlosrocapenafiel8749 Жыл бұрын
I'm use Arc browser too, it's really cool
@karenamicone6591
@karenamicone6591 Жыл бұрын
Hi, Jack! Great video, as always! Thanks. I have a question about Next Js. It is possible to do microfrontends with 13 version?
@karenamicone6591
@karenamicone6591 Жыл бұрын
I mean, something similar to module federation? :)
@seanlawton7681
@seanlawton7681 Жыл бұрын
t3 stack is my new go to
@Zechey
@Zechey Жыл бұрын
Is this a whole lot different with Next 13.4? As it introduced a lot of new stuff, wondering if using TRPC is still a thing. Just got into Next and this looks like yet another great video to cover this but just want to make sure!
@mohammed.haydar
@mohammed.haydar Жыл бұрын
Can you please do a tutorial how to professionally customize terminal to be exactly like that you have?
@alii4334
@alii4334 Жыл бұрын
I can't thank you enough!
@Svish_
@Svish_ Жыл бұрын
19:56 Instead of excluding the whole `tailwind.config.cjs` file, I think you could also just add `// @ts-ignore` on the line above the error?
@pananasik4317
@pananasik4317 10 ай бұрын
If you have a problem with Unsafe return at 24:39, just restart ESLint server (Ctrl + shift + P => ESLint restart server)
@lsxu149
@lsxu149 Жыл бұрын
damn, arc browser looks so cool🥵🥵
@Ikakoo2410
@Ikakoo2410 Жыл бұрын
Thank you sir!
@piyushaggarwal5207
@piyushaggarwal5207 Жыл бұрын
I can feel the difference that is there in the three months since the video released.
@albertosilvaus6417
@albertosilvaus6417 Жыл бұрын
Thank you!
@muaddib3515
@muaddib3515 Жыл бұрын
Knew this video was coming!
@realbigsquid
@realbigsquid Жыл бұрын
This was great!
@bendevweb89
@bendevweb89 Жыл бұрын
Great project, very interesting! 🤯 Even if I'm a little disappointed because I can't export my environment variables. 14:43
@octaviusbytes
@octaviusbytes Жыл бұрын
export GITHUB_CLIENT_ID="YOUR_ID_HERE" export GITHUB_CLIENT_SECRET="YOUR_SECRET_HERE"
@greggord-hume3979
@greggord-hume3979 Жыл бұрын
Thanks for the video. Could you share the plugins you use in vscode that help with the autocomplete of code? Your t3 experience seems so much better then mine!
@jherr
@jherr Жыл бұрын
GitHub Copilot is the primary one. Sorry you've had a rougher time of it.
@realitydesigners
@realitydesigners 9 ай бұрын
wow this is cool
@haack79
@haack79 Жыл бұрын
Why are you migrating to pnpm ? I am too but would love your input as to benefits of it, probalby have a video ? haha
@jherr
@jherr Жыл бұрын
It definitely seems faster to me.
@blue_berry_pie64
@blue_berry_pie64 Жыл бұрын
its really fun when sometimes I heard your high voice, ex: @40:11 , awesomeeeeeeeee 😝
@kroucher3286
@kroucher3286 Жыл бұрын
Welcome to the pnpm gang!
@GustavoLemes121213
@GustavoLemes121213 Жыл бұрын
Hello and thank you for this amazing tutorial! I have a small question the app doing SSR on the pages for the fetched data? I tried to check the source code on the browser and it does not seem to be rendering the fetched content on the server side. Is there a simple way of doing this while preserving the react-query cache? Thanks!!
@souravukil4120
@souravukil4120 10 ай бұрын
ty
@mrSargi7
@mrSargi7 Жыл бұрын
33:37 VS Code auto imported Topic type for me from prisma client hah
@angelcorzo3613
@angelcorzo3613 Жыл бұрын
awesome, wondering how can i add two different methods of providers in the same project as I am struggling a bit with it, is there any video I can see from your net?
@jherr
@jherr Жыл бұрын
What issues have you run into?
@angelcorzo3613
@angelcorzo3613 Жыл бұрын
@@jherr when adding github and google. when it is redirecting to github page, then an error for not a valir GET HTTP message is displayed, that's about the only issue so far. Google works fine but I cant get github to work
@malachiconstant2756
@malachiconstant2756 Жыл бұрын
Been wanting to try T3 for a while now. How does it compare with Blitz (their Next implementation, since now Blitz is “agnostic”)? On the surface they seem quite similar except for Next Auth. They both use Prisma, and Blitz’s RPC is similar to TRPC with less boilerplate
@rpWeb3
@rpWeb3 Жыл бұрын
Foreign key constraint failed on the field: `Note_topicId_fkey (index)` ❌ tRPC failed on note.create: Invalid `prisma.note.create()` invocation:😞
@yasinkavakli
@yasinkavakli Жыл бұрын
Jack, is there a reason why you take the types from RouterOutputs instead of Prisma types?
@jherr
@jherr Жыл бұрын
It more accurately reflects what's coming back from the call.
@yasinkavakli
@yasinkavakli Жыл бұрын
@@jherr got it. I’d still prefer and use the Prisma types in my projects.
@TheJobCompany
@TheJobCompany Жыл бұрын
I love this stack, though I'm super curious to see it work with app directory, one day...
@Thorax232
@Thorax232 Жыл бұрын
Everything this sets up works with app directory. Although tRPC isn't necessary as a Next plugin in that environment. (Maybe as a standalone server.) There's also a PR out right now to pass server functions to the client as a reference. Which will be a much easier interface that having tRPC gen endpoints. Everything t3 sets up for you is really straightforward by itself.
@TheJobCompany
@TheJobCompany Жыл бұрын
@@Thorax232 true, that is actually the part that I've been craving; right now setting up tRPC is not as straight forward in server components, as it is in pages, which is my biggest complaint; that and the beta status of the apis
@Thorax232
@Thorax232 Жыл бұрын
@@TheJobCompany I guess I should mention that the PR to call server functions from the client is on React. Not Next or tRPC. Sebastian Markbage is the one who submitted it. So this is something that will be available to other React frameworks. I think what this means is, by looking at the examples on that PR, we'll be able to have button click and form submissions reference server functions that are called and processed on the server. There's still a security consideration there, you have to explicitly allow a server component to accept this functionality. But the point being, things like tRPC built into Next will probably not be necessary at all in appDir. Because the features will be baked in. If you wanted tRPC as a standalone server that doesn't run at the edge, it's still a good option for medium sized apps imo.
@denissorn
@denissorn Жыл бұрын
Great content. Did you think about creating similar, longer course, with more 'realistic' complete application? I have seen such courses doing pretty well on Udemy for example.
@jherr
@jherr Жыл бұрын
Maybe on the content idea. But I’d rather it be free. Free doesn’t mean bad. It just means free.
@denissorn
@denissorn Жыл бұрын
@@jherr I definitely wouldn't mind a free course! What I meant is there seem to be a huge interest in such content.
@jherr
@jherr Жыл бұрын
@@denissorn Definitely, lots of interest in NextJS and TRPC.
This took us too long, I'm sorry
12:46
Theo - t3․gg
Рет қаралды 55 М.
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 92 М.
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 79 МЛН
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 14 МЛН
ShadCN’s Revolutionary New CLI
12:11
Jack Herrington
Рет қаралды 51 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 501 М.
tRPC + NextJS App Router = Simple Typesafe APIs
19:18
Jack Herrington
Рет қаралды 81 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 220 М.
I HACKED ShadCN to Create Insane React Templates and Installers
14:59
Jack Herrington
Рет қаралды 21 М.
Chris Bautista: Making typesafe APIs easy with tRPC
13:00
Vercel
Рет қаралды 73 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
Next.js App Router Caching: Explained!
25:22
Vercel
Рет қаралды 98 М.
tRPC: Smart and Easy APIs
25:29
Jack Herrington
Рет қаралды 121 М.