Prisma and Nuxt is my new favorite combo

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2024

Комментарии • 93

  • @tobychidi
    @tobychidi 2 года назад +23

    More Nuxt, Prisma content please 🥺?

  • @khaledsanny4817
    @khaledsanny4817 Год назад +7

    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 😂

  • @fourthkim3715
    @fourthkim3715 2 года назад +20

    We need Mooooaarrr nuxt prisma

    • @LearnVue
      @LearnVue  2 года назад +6

      i agree 👀

    • @TheFoxstory
      @TheFoxstory 2 года назад

      yess siiir

    • @pjmanning
      @pjmanning 2 года назад +1

      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.

    • @phinneasmctipper7518
      @phinneasmctipper7518 2 года назад +1

      Yes, I'd love to see a full tutorial that covers Nuxt auth, Prisma, Supabase in depth! Keep up the good work

    • @walkerlaflin4604
      @walkerlaflin4604 2 года назад

      Hope we get how to deploy the same

  • @businessoftechnology
    @businessoftechnology 2 года назад

    Yes, full video on Prisma migration, etc.

  • @mahlatiy5832
    @mahlatiy5832 2 года назад +1

    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

  • @modinput1030
    @modinput1030 Год назад

    You can use supabase cli to automatically generate types for your database

  • @th3n3rdman
    @th3n3rdman 2 года назад +2

    Supabase does have ability to generate TS types from your schema, never used it personally though would be interested in a video covering it

    • @LearnVue
      @LearnVue  2 года назад

      ooh that sounds interesting. im curious if it adds typechecks for queries

    • @VictorDavion
      @VictorDavion Год назад

      It does. It's very nice; You just have to use their CLI to regenerate anytime the schema changes.@@LearnVue

  • @craxtrader
    @craxtrader 2 года назад +1

    More detail please... SSR mode and realtime model

  • @heanglengtaing5127
    @heanglengtaing5127 2 года назад

    glad to see nuxt server with a pure local database like mysql without supabase

  • @juggyoggy623
    @juggyoggy623 2 года назад

    This is the best free software Ive seen. Respect.

  • @dbroche
    @dbroche 2 года назад +1

    Prisms looks awesome - love the vid- thanks for posting!

  • @chikovanreuden
    @chikovanreuden 2 года назад +3

    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.

    • @LearnVue
      @LearnVue  2 года назад +2

      ooh thanks for sharing. i didn’t know that

    • @Michael-dp7by
      @Michael-dp7by Год назад

      Have you had a look at using a raw query? e.g. const result = await prisma.$queryRaw`SELECT * FROM User`

  • @nikodemwicon8260
    @nikodemwicon8260 Год назад

    can you tell me, why useFetch trow an error like this? Error: (404 Cannot find any route matching /api/....

  • @mtzrmzia
    @mtzrmzia Год назад

    Can we use Prisma client to fetch data and Supabase client to auth stuff?

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

    Why we can't make this with local postgres?

  • @chuahziyang5751
    @chuahziyang5751 2 года назад

    Any way we could get a repo of this project? Currently having issues with prismaclient not working properly with HMR

  • @zergzerg4844
    @zergzerg4844 Год назад

    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?

  • @livingroom1381
    @livingroom1381 2 года назад +1

    Would be cool to see a gitlab integration as well

  • @michaelpumo83
    @michaelpumo83 2 года назад

    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.

    • @LearnVue
      @LearnVue  2 года назад +1

      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.

    • @michaelpumo83
      @michaelpumo83 2 года назад

      @@LearnVue That's a very good point! Thanks for making this video. Loving your content.

  • @kissu_io
    @kissu_io 2 года назад +4

    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. 👌🏻

    • @LearnVue
      @LearnVue  2 года назад +2

      i love the types it generate. curious to see if i run into any blockers when building more complicated systems with CI/CD pipelines

    • @davidrobertson6371
      @davidrobertson6371 2 года назад

      @@LearnVue Ping uses Prisma

  • @studiomonty
    @studiomonty Год назад

    Does StoryBlok have a good free tier for small projects?

    • @LearnVue
      @LearnVue  Год назад

      yup! i've built out an entire site (80k+ monthly views) and stayed well within the free tier!

  • @TheFoxstory
    @TheFoxstory 2 года назад +1

    nuxt3 is stuck on "startning nuxt" if i import PrismaClient and stuff from this video; using your previous tutorial-code

    • @LearnVue
      @LearnVue  2 года назад

      hmm are all the .env files setup?

    • @LearnVue
      @LearnVue  2 года назад

      ah crap i should’ve mentioned that. prisma has a BigInt type that has to be customly handled github.com/prisma/studio/issues/756

    • @TheFoxstory
      @TheFoxstory 2 года назад

      @@LearnVue yeah got everything setup correctly but once I implement it just starts loading into infinity, super werid

    • @TheFoxstory
      @TheFoxstory 2 года назад

      @@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

    • @TheFoxstory
      @TheFoxstory 2 года назад

      @@LearnVue but if I build it, it works fine

  • @tobychidi
    @tobychidi 2 года назад +1

    Interesting Stuff for sure. Will finally give Supabase a try

    • @LearnVue
      @LearnVue  2 года назад

      hope you enjoy it!

  • @neoprint3d
    @neoprint3d Год назад

    What is the #supabase/ server package can u link to it please?

  • @jayrrrr4
    @jayrrrr4 2 года назад

    soft is rather complex.. sotNice tutorialngs more than they should be. But you've made a great job explaining it!

  • @theolavaux
    @theolavaux 2 года назад

    Just out of curisosity, what would be the way to instanciate the Prisma client just once in Nuxt 3? A plugin maybe?

    • @MarkoBolliger
      @MarkoBolliger Год назад

      add a server middleware and extend the event context do this npm create sidebase@latest there you will see

  • @nonefvnfvnjnjnjevjenjvonej3384
    @nonefvnfvnjnjnjevjenjvonej3384 2 года назад

    is there a way of having a local database running?

  • @josetannous
    @josetannous 2 года назад

    Please more Nuxt videos!!

  • @jrsamuel1
    @jrsamuel1 2 года назад

    Does Prisma bypass RLS setup in Supabase? Or is there a way to enforce it?

    • @LearnVue
      @LearnVue  2 года назад

      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

    • @jrsamuel1
      @jrsamuel1 2 года назад

      @@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.

  • @okanyldrmop
    @okanyldrmop 2 года назад

    May I learn your theme? It looks like Dracula but it also looks different.

  • @jamesolrog1547
    @jamesolrog1547 2 года назад

    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!

    • @LearnVue
      @LearnVue  2 года назад +1

      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

    • @jamesolrog1547
      @jamesolrog1547 2 года назад

      @@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 :)

  • @Yammyuuu
    @Yammyuuu 2 года назад

    DUDE, I got so frustrated 'cause of that problem, thanks a lot!

  • @ekekw930
    @ekekw930 2 года назад

    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.

    • @NYProDev
      @NYProDev Год назад

      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

  • @flaviusneagos597
    @flaviusneagos597 2 года назад

    Tks for ur msg i though i was alone ❤❤

  • @codestuff3685
    @codestuff3685 2 года назад

    Thanks for the great explanation.

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

    Any other person having the issue of npx prisma db pull going on for ever?

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

      You should copy in supabase the link when it is in the Mode:Transaction

  • @Nekoeye
    @Nekoeye 2 года назад +1

    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

  • @yma813
    @yma813 2 года назад

    Thanks! Nice explanation👍

  • @divcegahbawaslukabpnd4301
    @divcegahbawaslukabpnd4301 2 года назад

    and I will find my way back there too!

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

    Splendid stuff

  • @sebastiantoulier5956
    @sebastiantoulier5956 2 года назад

    dat escalated quickly

  • @angelhdzdev
    @angelhdzdev 2 года назад +1

    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.

    • @LearnVue
      @LearnVue  2 года назад +2

      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.

    • @angelhdzdev
      @angelhdzdev 2 года назад

      @@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.

    • @LearnVue
      @LearnVue  2 года назад +1

      @@angelhdzdev you too!

    • @kissu_io
      @kissu_io 2 года назад +1

      @@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. :)

    • @angelhdzdev
      @angelhdzdev 2 года назад +1

      @@kissu_io thaaank you a lot.

  • @rubensteinhauer2442
    @rubensteinhauer2442 2 года назад +1

    True

  • @DanielTorres-gd2uf
    @DanielTorres-gd2uf 2 года назад

    Nice! I gotta try this soon :)

    • @LearnVue
      @LearnVue  2 года назад

      yeah definitely give it a try. ive been enjoying it so far!

  • @zeeshanjaffer1835
    @zeeshanjaffer1835 2 года назад

    good work king, love you

  • @ahmadal-noufi4331
    @ahmadal-noufi4331 2 года назад

    You are the GOAT

  • @ashron4472
    @ashron4472 2 года назад

    where's the source code?

  • @Legxyng
    @Legxyng 2 года назад

    Thank you sir, in tNice tutorials tutorial I've learnt alot from you!

  • @rafaelsje1
    @rafaelsje1 2 года назад

    Keeps you creating ;)

  • @Paul201192
    @Paul201192 2 года назад

    showed, how do I fix tNice tutorials? I followed exactly what you did.

  • @xadierz1816
    @xadierz1816 2 года назад

    work but so people are but they need to learn first.

  • @greendsnow
    @greendsnow 2 года назад +1

    nuxt still in RC, 3 years after the introduction of the composition api.
    vue is the definition of regret.

    • @kissu_io
      @kissu_io 2 года назад +1

      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).

  • @santptube
    @santptube 2 года назад

    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?

    • @kissu_io
      @kissu_io 2 года назад

      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. :)