Wow 🤯! This channel is a gem 💎... Reminds me of Fireship... short, clear, to the point and riiily informative... Definitely one of my favorite channels now... And you dont forget the memes 😂
Siiiiii would love a longer form tutorial/guide of workflow on prisma. Seems epic just want to know it well enough to see if it’s worth the extra layer & time.
Quick Con why i cannot use Prisma in one of my Projects: Prisma does not support SQL Views 100%. Its fiddly. If a Data Model relies on SQL Views, Prisma will give you a lot of Points to check each time some Changes are applied to the Database Structure.
In which directory should I install it? Dependency or devDependency? Because I saw some people in other tutorials installed prisma to Dependency and others to devDependancy. What if I what to create project with using prisma and database and after want to deploy it . Will there be acces to database if I install prisma into devDependansy?
Thanks for the video! Is this a total replacement for the Supabase client? Just wondering what the size differences are / performance, when built for production.
I’ve still been using the supabase client for auth. I think they’re still working on tree shaking, so there’s still some unused libs (especially the real-time stuff) being bundled.
@@LearnVue however it sometimes works sometimes not but when it does if I change something in code it crashes with an error Command failed with exit code 3221225477
@@LearnVue Thanks. I really would love to use Prisma but between that issue and the lack of support for Realtime, I think I would just use the supabase js client. They should probably create a ts client that works more like Prisma.
Looks like Prisma doesn't currently support foreign keys? Is that not going to be a problem moving forward? Or are you just putting the same properties but not marking them as foreign keys to get this working? It feels so wrong!
i've been defining relations and haven't add any issues yet www.prisma.io/docs/guides/general-guides/database-workflows/foreign-keys/postgresql#3-create-a-table-with-a-multi-column-foreign-key-constraint
@@LearnVue Ah sure... It seems to be that cross-schema references are my issue... I wanted to have a column in my notes table link to a user's auth.id but the following error is thrown running `npx prisma db pull`: "The schema of the introspected database was inconsistent: Illegal cross schema reference from `public.notes` to `auth.users`" If you keep keys within the same schema (public), then things work as you have described! Thank you :)
Only thing I dislike about Prisma is that you cannot extend from a BaseModel that has id, created_at, updated_at and deleted_at for example. Also, if you want to use the generated dtos, there is no real easy way to validate them.
why not? you can create interface which will extend prisma's interface. Or at least, you can use typescript utils like Omit, Pick, Extract and other cool staffs
I love your content but i would suggest to not use background music. It's distracting for me and maybe some other users. Other than that, keep doing what you're doing. Really appreciate all the videos and tutorials on the website. Thanks
Is Nuxt backend or it's not backend!? This is starting to get on my nerves. Nuxt has been promoted as a frontend framework, but the word "Server Side Rendering" implies a server being run to render the views, so it should be promoted as both backend and frontend. So I was building a RESTful API with Passport-Steam Auth, and had issues and asked for help and was told that Nuxt it's only frontend and that I shouldn't create an HTTP API. But then I read words like "auth", "strategies" in Nuxt's documentation and it's like "Come on! You are backend! Stop trying to hide it!" I'm so confused.
imo frameworks like nuxt blend the line between frontend and backend so it depends on the type of app your building. for example. you can opt out of ssr and have a full statically generated site. SSR runs the JS on server before to the first load so that the static HTML can have content already. And then hydration turns it into a Vue Single page app after that. so that's where all the frontend comes in. Especially with Nuxt 3, we can build dedicated api routes. So it's definitely not just a frontend framework, but is also definitely not a backend framework.
@@LearnVue hahaha your answer is such a breathe of fresh air!!! You explained it so well in the "nuxt blends the line between FE and BE" part. Now I'm more confident in learning Nuxt 3. Wishing you health and success.
@@angelhdzdev it's tricky but it's also because FE devs try to get a lot of performance out of our apps rather than just sticking to SPAs. Hence why, as a meta-framework, Nuxt brings some BE features while not being fully backend (no real ORM, database connection, models or alike) but something simple similar to Express is totally feasible. So yeah, consider it as 80% FE and 20% BE. :)
Composition API was released on September 18th 2020, so less than 2 years ago to be precise. Some alternatives to Nuxt existed for quite a few months already (like Vitesse) if you needed nice features with SSG/SSR capabilities. And the current RC8 of Nuxt3 may be totally viable for your usage, give it a try! :) People are thinking that something in beta is always broken, while actually you actually probably used some non-stable packages on a daily basis without even knowing it (ie axios).
Why bring type to JavaScript? If someone loves type, they can use crap like Java. Why corrupt pure soul like JavaScript. Also which developer in right mind would add a column that doesn’t exist or pass the unit tests having a wrong column?
More Nuxt, Prisma content please 🥺?
Wow 🤯! This channel is a gem 💎... Reminds me of Fireship... short, clear, to the point and riiily informative... Definitely one of my favorite channels now... And you dont forget the memes 😂
We need Mooooaarrr nuxt prisma
i agree 👀
yess siiir
Siiiiii would love a longer form tutorial/guide of workflow on prisma. Seems epic just want to know it well enough to see if it’s worth the extra layer & time.
Yes, I'd love to see a full tutorial that covers Nuxt auth, Prisma, Supabase in depth! Keep up the good work
Hope we get how to deploy the same
Yes, full video on Prisma migration, etc.
you are not like the others who puts link filled with adds, so u deserve to be subscribed..... thanks for the plugin and all the best for future
appreciate it!
You can use supabase cli to automatically generate types for your database
Supabase does have ability to generate TS types from your schema, never used it personally though would be interested in a video covering it
ooh that sounds interesting. im curious if it adds typechecks for queries
It does. It's very nice; You just have to use their CLI to regenerate anytime the schema changes.@@LearnVue
More detail please... SSR mode and realtime model
glad to see nuxt server with a pure local database like mysql without supabase
This is the best free software Ive seen. Respect.
Prisms looks awesome - love the vid- thanks for posting!
Quick Con why i cannot use Prisma in one of my Projects:
Prisma does not support SQL Views 100%. Its fiddly. If a Data Model relies on SQL Views, Prisma will give you a lot of Points to check each time some Changes are applied to the Database Structure.
ooh thanks for sharing. i didn’t know that
Have you had a look at using a raw query? e.g. const result = await prisma.$queryRaw`SELECT * FROM User`
can you tell me, why useFetch trow an error like this? Error: (404 Cannot find any route matching /api/....
Can we use Prisma client to fetch data and Supabase client to auth stuff?
Why we can't make this with local postgres?
Any way we could get a repo of this project? Currently having issues with prismaclient not working properly with HMR
In which directory should I install it? Dependency or devDependency? Because I saw some people in other tutorials installed prisma to Dependency and others to devDependancy. What if I what to create project with using prisma and database and after want to deploy it . Will there be acces to database if I install prisma into devDependansy?
Would be cool to see a gitlab integration as well
Thanks for the video! Is this a total replacement for the Supabase client? Just wondering what the size differences are / performance, when built for production.
I’ve still been using the supabase client for auth. I think they’re still working on tree shaking, so there’s still some unused libs (especially the real-time stuff) being bundled.
@@LearnVue That's a very good point! Thanks for making this video. Loving your content.
This kind of DX reminds me heavily of Ruby on Rails.
Prisma is needed really powerful, on top of the types the experience is mucho bene. 👌🏻
i love the types it generate. curious to see if i run into any blockers when building more complicated systems with CI/CD pipelines
@@LearnVue Ping uses Prisma
Does StoryBlok have a good free tier for small projects?
yup! i've built out an entire site (80k+ monthly views) and stayed well within the free tier!
nuxt3 is stuck on "startning nuxt" if i import PrismaClient and stuff from this video; using your previous tutorial-code
hmm are all the .env files setup?
ah crap i should’ve mentioned that. prisma has a BigInt type that has to be customly handled github.com/prisma/studio/issues/756
@@LearnVue yeah got everything setup correctly but once I implement it just starts loading into infinity, super werid
@@LearnVue however it sometimes works sometimes not but when it does if I change something in code it crashes with an error Command failed with exit code 3221225477
@@LearnVue but if I build it, it works fine
Interesting Stuff for sure. Will finally give Supabase a try
hope you enjoy it!
What is the #supabase/ server package can u link to it please?
soft is rather complex.. sotNice tutorialngs more than they should be. But you've made a great job explaining it!
Just out of curisosity, what would be the way to instanciate the Prisma client just once in Nuxt 3? A plugin maybe?
add a server middleware and extend the event context do this npm create sidebase@latest there you will see
is there a way of having a local database running?
Please more Nuxt videos!!
Does Prisma bypass RLS setup in Supabase? Or is there a way to enforce it?
there’s some manual workarounds to respect RLS that i found, but i haven’t gotten a chance to try it github.com/prisma/prisma/issues/5128
@@LearnVue Thanks. I really would love to use Prisma but between that issue and the lack of support for Realtime, I think I would just use the supabase js client. They should probably create a ts client that works more like Prisma.
May I learn your theme? It looks like Dracula but it also looks different.
dracula pro
Looks like Prisma doesn't currently support foreign keys? Is that not going to be a problem moving forward? Or are you just putting the same properties but not marking them as foreign keys to get this working? It feels so wrong!
i've been defining relations and haven't add any issues yet www.prisma.io/docs/guides/general-guides/database-workflows/foreign-keys/postgresql#3-create-a-table-with-a-multi-column-foreign-key-constraint
@@LearnVue Ah sure... It seems to be that cross-schema references are my issue... I wanted to have a column in my notes table link to a user's auth.id but the following error is thrown running `npx prisma db pull`:
"The schema of the introspected database was inconsistent: Illegal cross schema reference from `public.notes` to `auth.users`"
If you keep keys within the same schema (public), then things work as you have described! Thank you :)
DUDE, I got so frustrated 'cause of that problem, thanks a lot!
🔥
Only thing I dislike about Prisma is that you cannot extend from a BaseModel that has id, created_at, updated_at and deleted_at for example.
Also, if you want to use the generated dtos, there is no real easy way to validate them.
why not? you can create interface which will extend prisma's interface. Or at least, you can use typescript utils like Omit, Pick, Extract and other cool staffs
Tks for ur msg i though i was alone ❤❤
Thanks for the great explanation.
Any other person having the issue of npx prisma db pull going on for ever?
You should copy in supabase the link when it is in the Mode:Transaction
I love your content but i would suggest to not use background music. It's distracting for me and maybe some other users. Other than that, keep doing what you're doing. Really appreciate all the videos and tutorials on the website. Thanks
Thanks! Nice explanation👍
and I will find my way back there too!
Splendid stuff
dat escalated quickly
Is Nuxt backend or it's not backend!? This is starting to get on my nerves.
Nuxt has been promoted as a frontend framework, but the word "Server Side Rendering" implies a server being run to render the views, so it should be promoted as both backend and frontend. So I was building a RESTful API with Passport-Steam Auth, and had issues and asked for help and was told that Nuxt it's only frontend and that I shouldn't create an HTTP API.
But then I read words like "auth", "strategies" in Nuxt's documentation and it's like "Come on! You are backend! Stop trying to hide it!"
I'm so confused.
imo frameworks like nuxt blend the line between frontend and backend so it depends on the type of app your building. for example. you can opt out of ssr and have a full statically generated site.
SSR runs the JS on server before to the first load so that the static HTML can have content already. And then hydration turns it into a Vue Single page app after that. so that's where all the frontend comes in.
Especially with Nuxt 3, we can build dedicated api routes. So it's definitely not just a frontend framework, but is also definitely not a backend framework.
@@LearnVue hahaha your answer is such a breathe of fresh air!!! You explained it so well in the "nuxt blends the line between FE and BE" part. Now I'm more confident in learning Nuxt 3. Wishing you health and success.
@@angelhdzdev you too!
@@angelhdzdev it's tricky but it's also because FE devs try to get a lot of performance out of our apps rather than just sticking to SPAs.
Hence why, as a meta-framework, Nuxt brings some BE features while not being fully backend (no real ORM, database connection, models or alike) but something simple similar to Express is totally feasible.
So yeah, consider it as 80% FE and 20% BE. :)
@@kissu_io thaaank you a lot.
True
Nice! I gotta try this soon :)
yeah definitely give it a try. ive been enjoying it so far!
good work king, love you
You are the GOAT
no thats you
where's the source code?
Thank you sir, in tNice tutorials tutorial I've learnt alot from you!
Keeps you creating ;)
showed, how do I fix tNice tutorials? I followed exactly what you did.
work but so people are but they need to learn first.
nuxt still in RC, 3 years after the introduction of the composition api.
vue is the definition of regret.
Composition API was released on September 18th 2020, so less than 2 years ago to be precise.
Some alternatives to Nuxt existed for quite a few months already (like Vitesse) if you needed nice features with SSG/SSR capabilities.
And the current RC8 of Nuxt3 may be totally viable for your usage, give it a try! :)
People are thinking that something in beta is always broken, while actually you actually probably used some non-stable packages on a daily basis without even knowing it (ie axios).
Why bring type to JavaScript? If someone loves type, they can use crap like Java.
Why corrupt pure soul like JavaScript.
Also which developer in right mind would add a column that doesn’t exist or pass the unit tests having a wrong column?
You can't really make FE/mobile/desktop/embedded apps in a short amount of time and for any device size hence why JS is a needed evil. :)