Building a Subscription Based SaaS with my Favorite Tech Stack (Next.js, Stripe, Convex, Clerk)

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ค. 2024
  • This is a full stack tutorial video which includes a real time database (Convex) and authentication (Clerk) for helping youtube content creators get feedback on thumbnails. Both of these services helped sponsor this video, but I enjoy using both of them in my side projects as well because they give me a great developer experience and help me move fast.
    Be sure to checkout Convex here: convex.dev/c/wdc
    Be sure to checkout Clerk here: dub.sh/A2JQT7h
    Link to Code as in video: github.com/webdevcody/thumbna...
    00:00 Intro
    03:42 Project Setup + Convex
    06:16 Clerk Setup
    13:02 Create Thumbnails Tests
    22:39 Display Thumbnail Tests
    29:06 Bring in Shadcn
    30:12 Dark Mode Toggle
    33:30 Header
    40:22 Create Test Page
    1:08:01 Thumbnail Page
    1:21:35 Vote on Thumbnail
    1:42:32 Dashboard Page
    1:56:36 Explore Page
    2:06:40 Clerk Webhook
    2:18:01 Stripe Setup
    2:45:24 Check Subscription Status
    2:48:06 Comments
    3:31:09 Footer
    3:32:59 Deploying
    3:43:06 Skeleton Loaders
    My Courses
    📘 T3 Stack Tutorial: 1017897100294.gumroad.com/l/j...
    My Products
    📖 ProjectPlannerAI: projectplannerai.com
    🤖 IconGeneratorAI: icongeneratorai.com/
    Useful Links
    💬 Discord: / discord
    🔔 Newsletter: newsletter.webdevcody.com/
    📁 GitHub: github.com/webdevcody
    📺 Twitch: / webdevcody
    🤖 Website: webdevcody.com
    🐦 Twitter: / webdevcody

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

  • @codinginflow
    @codinginflow 5 หลายเดือนก่อน +19

    A 4-hour tutorial by Cody 🤯

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +4

      trying to get on your level

    • @bigbrain720
      @bigbrain720 4 หลายเดือนก่อน +2

      you both are Legends 🙌🏿

  • @FlorinPop
    @FlorinPop 5 หลายเดือนก่อน +13

    Cody is my favorite youtuber! I hope to be like Cody when I grow up!

  • @mystupidbrain5299
    @mystupidbrain5299 5 หลายเดือนก่อน +1

    Almost 4 hour of video of amazing content. You are killing it.

  • @insensibility
    @insensibility 5 หลายเดือนก่อน +3

    This long form of content is superb. Keep going!

  • @EdwardOrnelas
    @EdwardOrnelas 5 หลายเดือนก่อน +24

    Cody you're going all the way this year man! I can tell by your Thumbnails and Tutorials. This will be your year 🔥

  • @krishnaprasath1589
    @krishnaprasath1589 3 หลายเดือนก่อน +4

    Super impressed with how you built this with [Next.js, Stripe, Convex, Clerk]. Would be cool to see another project in this style!

  • @Omar-vi1vu
    @Omar-vi1vu 5 หลายเดือนก่อน

    More fully built projects tutorial like this pls. thanks for the educational content!

  • @LjupcheVasilev
    @LjupcheVasilev 5 หลายเดือนก่อน +1

    Such a simple idea but very useful! Just starting on this but already getting tons of ideas how to use Convex for my projects

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

    Great content, i look forward trying this on the weekend. 🙏

  • @drprdcts
    @drprdcts 5 หลายเดือนก่อน +1

    Banger thumbnail as always. Ill be waiting for convex to go open source before I get addicted to their typesafe api (gotta give credit - it's pretty nice).

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

    Hell yeah, i have been waiting for this

  • @PhillipLippi
    @PhillipLippi 5 หลายเดือนก่อน +2

    that's SICK MAN! I really love your job and I'll definitely watch this entire video. God bless you!

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

      Thanks man

  • @bro-watch
    @bro-watch 3 วันที่ผ่านมา

    your content, my sir, is absolutly amazing

  • @robwatson826
    @robwatson826 5 หลายเดือนก่อน +3

    This has been a great watch! I feel like I've been pair programming with a mate all day, just on different projects 🤣

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      glad to hear that, that's the vibe I'm going for when I do tutorials

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

    Damnn Cody thank you for this some solid content!!!!

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

    The first time i see 3hr vedio on your youtube, lest'go cody

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

    Great content as usual!

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

    First Time on this channel.
    love it thanks.

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

    i love all ur vids it make it make me understand concept better

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

    You are building like a mad man

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

    Very good. Thanks.

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

    You are amazing teacher,

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

      Thank you!

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

    This is great

  • @vukrosic
    @vukrosic 4 หลายเดือนก่อน +1

    Thank you for your sacrifice of figuring out how to implement stripe + convex so don't have to.

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

    Good job babe!!

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

      thank you my beautiful 😘 I hope you feel better soon!

  • @armaandhanji7151
    @armaandhanji7151 5 หลายเดือนก่อน +1

    Cody you're the best. Thanks for the great content. So since convex can handle the real time features for us, does this mean we can host this on a serverless platform like Vercel without problens? (Since handling web sockets purely in Next leads to problems when hosting on Vercel but this time we're outsourcing that job to convex)

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

      yes, you can host your UI on vercel and connect it to the convex backend.

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

      @@WebDevCody Sweet. You've convinced me to give Convex a try! Thanks.

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

    Replied to every single comment. Damn. You rock.

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

    not to mention the same concept can be carried over to a social media tool that one might wanna build. Suppose you wanna check which first page of an Instagram carousel would perform better and you let your community decide

  • @Vicseverin
    @Vicseverin 5 หลายเดือนก่อน +2

    Great Video! Can you please do one for simple stripe one time payments with the new nextjs app router ?

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

    What is the syntax theme you use for highlighting your typescript?

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

    I don't know if one kind of blurs the other one out, but could you explain when it would be more beneficial to use tRPC (t3 stack) or Convex?

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      t3 doesn't have any real time database support. so if you want your UI to update the moment your data on the backend changes, you'll need to implement your own websocket service or mechanism to get those events sent to your user's browser to update their data.

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

      ​@@WebDevCody Nice. Initially, I was skeptical about the dependency created by this BaaS. However, the multitude of features it offers makes it almost impossible to not consider. Compared to tRPC, setting up mutations is simpler, and I feel like the file structure is more intuitive.

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

    Is convex able to do geo queries? Like nearest point, bounding box, etc? Cause that's a must for many projects

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

    Out of curiosity - what is the difference between using supabase vs convex? Any trade offs?

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      supabase feels like a wrap on top of postgres, convex abstract it's own internal database (they do have plans to go open source soon so people can run convex without needing their service). I find convex a much better developer experience from the very little of supabase I tried out. Supabase has built in auth, but convex is focusing mainly on the database, compute, file storage side of the backend (for auth you'd want a separate service). Convex was built with 100% typescript in mind; I've seen some strange stuff in supabase personally when it comes to typescript.

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

    Hi Cody. Following on this tutorial and would like to ask if you are also having issues with deploying to convex when implementing the clerk webhook? I'm getting a 408 timeout from npx convex dev whenever I include the clerk webhook validation part. By chance, did you also encounter this? Thanks!

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

      Did you put use node at the top of the file? I’d check my repo link against your code

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

      @@WebDevCody I did but it gave the same result. also tried to copy the code on the repo. have sent a question on discord as well. thanks!

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

    hi codey, great job
    need a little help
    i use yarn instaed of npm
    after addin the stripe:listen and trigger to my package.json
    when i run yarn run stripe:listen, it throws an error. 'stripe not recongnized as blah blah blah...'
    what could be the problem. i cant get the stripe webhook secret

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

    I've been appreciating your content and the way you teach concepts more and more @webdevcody keep it going

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

    Hi Cody thanks a lot on stripe based videos especially the subscription model per api use, but i have a use case, which is mostly in learning platforms etc eg udemy, where course owner is someone else and not the website host, i wanted to know how they would distribute the revenue to their teachers (after taking their cut) on purchase of the course by the user. does it happen immediately or does udemy keep a track of sold per day and update teacher's account balance etc. is there something on stripe for this? Wanted your opinion on how you would handle it?

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      Stripe has something called stripe connect you should look into. Basically the course owner connects their own stripe account, and you can pay out their share of profits directly to their account

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

      @@WebDevCody Thanks mate will check it out 👍

  • @fl3x11
    @fl3x11 5 หลายเดือนก่อน +3

    TH-cam is introducing automatic ab testing with your thumbnails. You can simply upload multiple thumbnails and youtube will chose the best one automatically after a couple thousands impressions (based on CTR and other stats). The app you're building will be pretty much useless when this feature becomes available to everybody (right now only some big youtuber has access to it). Great video still.

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +2

      I wouldn't say it's pointless. I've worked with many other creators as we try to build thumbnails, and we often go through 5-6 iterations of thumbnails before we get something decent and we have open discussion about what might work well and what won't work well. TH-cam isn't going to give you any feedback on anything; it'll just show you the thumbnail which works best, but it leaves all of the thumbnail designs up to the creator to figure out by themself. Also, youtube seems to take ages to release features.... so I'm won't be hyped on their feature until I get access.

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

      @@WebDevCody thats true, youtube is usually pretty slow at rolling out new features. I also understand the differerences with your product, but I don't see why I would play for it as a content creator. You could make a community post poll asking your audience which thumbnail they would rather click on, which would probably achieve a similar result for free. This is my personnal opinion, i just give it to you as honest feedback. Not trying to discourage you or anything.

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      @@fl3x11 I appreciate the feedback! I don’t think I’d actually turn this into a real product, I just wanted something interesting for a TH-cam tutorial. If I did turn this into anything I’d maybe just keep it free until I see people found real use for it.

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

      @WebDevCody I think there's also ways to make it more appealing and differentiate from the alternatives I mentioned by adding features, etc. Anyway, I love your content. Keep it up!

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

      @@fl3x11 thanks man, I got a list of features I want to try adding, but we’ll see how it goes

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

    Cody, I've one question despite I haven't watched the entire video yet: is it possible to disable that realtime communication ?

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      I believe they have approaches to turn off the reactivity or a custom hook which can be used to not have everything update all the time if needed.

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

    how can we sync clerk data to convex? and keep them persistence on a custom user form ?

    • @WebDevCody
      @WebDevCody  4 หลายเดือนก่อน +1

      Webhooks

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

    make a video on what are effective some ways to discover new saas ideas

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

    Thanks so much for this tutorial Cody.

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

    is it efficient to upload the images right away and not waiting for the user to hit the submit form? shouldn't you show previews first?

    • @WebDevCody
      @WebDevCody  5 หลายเดือนก่อน +1

      yes that is an approach as well, that would prevent storing the image on my backend unless they actually submit

  • @joker-wr8pt
    @joker-wr8pt 5 หลายเดือนก่อน

    Man May Allah bless you please accpet my thank you for teaching us what really matter, what actual industry uses thanks

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

    I think you should include the title along with the thumbnail, since that goes along with it

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

    Hey cody , while uploading the image in create , it is throwing an error upstream image response failed and it is redirecting to the urlwith the imageId and not the actual link in the data storage url address. Any suggestions of what might be wrong ?

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

      are you able to go to the URL directly in chrome to view the file?

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

      yeah on opening the link it is directing me towards the storage id (i.e the k2f...part) but on downloading it in the convex database it is taking me towards the actual image. Also ,is their someplace where i can share my code with you to reach out for more interaction .@@WebDevCody

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

      yes i am and i am being directed to the url with the storage id and not the actual address which is available in the download in convex database@@WebDevCody

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

      yes but with the unique uuid when i hit 'download' in the convex dashboard@@WebDevCody. but i only have access to the storageId in the next app as response. passing storageId to the src dont work. UUID required to render image doesnt come with the response object.

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

      @@ademolaadewole1288 double check their docs I think they changed how you must download images and must use a storage.getUrl call now

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

    Can you do a stripe connect integration tutorial?

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

    I've been using Clerk lately due to Auth0 making the sign in with Microsoft require a way higher plan which is annoying but Clerk treats it like any other oauth.

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

    4 hour video , Might create a next JS app just to learn how to use convex

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

    Can you use Convex without Typescript?

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

      I think so, they have a JavaScript library I believe

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

    Convex? No one use Apache or ngnix? Of custom server?😊

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

    why do you need next if you have convex?

    • @WebDevCody
      @WebDevCody  4 หลายเดือนก่อน +1

      convex isn't a front end library; you still need either a react spa or next.js for rendering the components. Convex is just a backend as a service (database, file storage, etc)

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

      ​@@WebDevCody Yeah true. While server components might not be useful here (due to convex's reactivity) I guess things like next's nested layouts are nice.

  • @asliddinbozorov2847
    @asliddinbozorov2847 25 วันที่ผ่านมา

    How you'll come to such ideas ?

  • @krishnaprasath1589
    @krishnaprasath1589 3 หลายเดือนก่อน +1

    I'm encountering an error in my Convex application related to image retrieval. The code snippet using the storage ID (kg21098vege77sdjgrbf3gtn4x6ny0hv) is resulting in the following error message:
    {
    "code": "InvalidStoragePath",
    "message": "Invalid storage path: \"kg21098vege77sdjgrbf3gtn4x6ny0hv\" is not a valid UUID string."
    }
    I'm unsure why the storage ID is being treated as invalid. I've double-checked that the ID is copied correctly, but I'm still facing this issue.

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

      See pinned comment and latest commit to my repo

  • @gautampatoliya6872
    @gautampatoliya6872 28 วันที่ผ่านมา

    You need to learn UI/UX a lot, good idea to be honest but not you application 👍🏻