Claude Code for Product Designers
Lesson 18 of 49, 0 of 49 lessons completed
Sign in
Watch on YouTubePlay

Plays from YouTube. Google's privacy policy (opens in a new tab) applies.

Up next

2.4 Design the next feature

Next lesson in 8 s

2.3 Going live with Vercel

Adam explains why he hosts the app on Vercel, then connects Vercel to the course's GitHub repo and deploys it, so the app gets a public address that updates with every push.

What you'll learn

  1. Deploying means building the app on a machine in the cloud (Vercel's) and serving it at a public address.
  2. Vercel is the natural host for Next.js; the free Hobby plan covers personal projects; Pro ($20/month) is for projects that make money.
  3. Connect Vercel to GitHub and give it access to only the repos you choose.
  4. For a Next.js app the defaults are enough: no build settings or environment variables needed here.
  5. Warnings during a deploy are fine as long as they aren't errors.
  6. Every push to GitHub redeploys automatically; the public URL serves main, other branches get different URLs.
  7. The vercel.app subdomain comes from the repo name; you can change it or add your own domain.

Chapters

  1. 00:00Why host on Vercel
  2. 01:06Creating a Vercel project
  3. 02:23Giving Vercel access to GitHub
  4. 03:56Deploying with the defaults
  5. 05:04Your app's public address
  6. 06:08Automatic updates and branches
  1. 00:00Okay, so our repository is officially git tracked and is also pushed to GitHub, which means we are ready to like take that last step before making it possible for
  2. 00:11anyone online to go and visit our application and see it running in their own browser.
  3. 00:18And we're going to use Vercel for that.
  4. 00:20So Vercel is that very popular website right now that allows you to host and deploy your Next.js applications, not just Next.js applications, but like they support many modern frameworks,
  5. 00:33but Next.js in particular because it is actually created and maintained by the creators of Vercel.
  6. 00:39So it makes it like a no-brainer option to host your, you know, hobby projects or even like commercial websites.
  7. 00:48They have a pretty generous free hobby plan and, you know, if you want to take it a step further, you know, they offer their free tier at just $20
  8. 00:58a month, which is only something you're going to need if you actually want to start any earning money from any of your projects hosted on Vercel.
  9. 01:08So I've already opened up vercel.com in my browser.
  10. 01:11I encourage you to do the same.
  11. 01:13We're going to either set up an account if we don't have one yet.
  12. 01:16I already have my Vercel account.
  13. 01:18I'm going to log in right now.
  14. 01:20Okay, I am signed in with my Tonik account.
  15. 01:24Now I already have one project in here.
  16. 01:27If you have a totally fresh setup, you're going to probably see something else like a very prominent empty state.
  17. 01:34What we want to do is we want to create a new project.
  18. 01:37In my case, I'm going to click on this button, create new.
  19. 01:41I'm going to select project and then Vercel actually going to allow me to connect my GitHub account so that it can pull straight from our git repository.
  20. 01:53And the way it's going to work moving forward is because, you know, Vercel project is going to be connected to our repository.
  21. 02:00Every time we push a new commit um to our GitHub repository, Vercel is going to automatically deploy our application uh for us in the background.
  22. 02:10And this is going to make it uh basically always reflect uh whatever we have uh locally on our machine.
  23. 02:17So I'm going to select GitHub as my Git provider.
  24. 02:23Okay. Uh let's see.
  25. 02:27Didn't seem to go through.
  26. 02:28Let me try that again.
  27. 02:29I'm going to click on GitHub.
  28. 02:32Oh, okay. Let me refresh.
  29. 02:34Okay. Uh now my GitHub account has already been uh authenticated or I've already enabled integration between Vercel and GitHub before.
  30. 02:45Um again, if like both GitHub accounts and Vercel accounts are fresh on your end, you'll probably have to go through a flow to authenticate um through GitHub and actually
  31. 02:56allow Vercel to have access to your repository.
  32. 02:59You can select to have access to all of your repositories or just, you know, a small subset of the ones you select.
  33. 03:05I would recommend that second round actually.
  34. 03:07Um with this, I already see a couple of my repositories here which I haven't imported into this Vercel project uh this this Vercel account yet.
  35. 03:16But um in order for me to be able to um open up the like the application we just built or and like to build um off of the repository
  36. 03:25on GitHub which we just created, I'm going to hit over here add GitHub scope.
  37. 03:30And this is going to take me to GitHub.
  38. 03:33I'm going to select my own account and I am going to from the only selected repositories I'm going to open up this list and I'm going to type in
  39. 03:41the name of our repository.
  40. 03:42So Tonik Parking um Parking Course.
  41. 03:48I'm going to hit save.
  42. 03:50Uh so now Vercel has access to this repository.
  43. 03:54I'm going to refresh just to make it uh visible here.
  44. 03:57And I can actually see this repository now listed over here.
  45. 04:00I'm going to hit import.
  46. 04:02Um and then the beauty again of using Next.js with Vercel is that the deployment process or the process of setting up this project is super straightforward.
  47. 04:12We just we can like keep um like all of the defaults here and just hit the deploy button.
  48. 04:18We don't need to configure any environmental variables or anything of that sort.
  49. 04:22Okay, I have a two-step authentication, so I'll need to retype my um retype my uh one-time code.
  50. 04:34Okay. And it's going to start deploying our application.
  51. 04:39Deploying means building this application on a machine out there in the cloud hosted by Vercel.
  52. 04:46Um uh it might throw some warnings uh occasionally.
  53. 04:50As long as they are not errors, we don't really need to worry about anything at this point.
  54. 04:55Um it's going to take um a while depending on how big are your application is.
  55. 05:01In our case, the application is pretty small, so uh the deployment process should take um I guess not longer than a minute.
  56. 05:08And it's actually done right now and it's deployed on production.
  57. 05:12Uh perfect. And um I can actually see a preview of my application.
  58. 05:16The next step would be to either go and visit our application.
  59. 05:20And as you can see, it has already given a unique URL, uh tonic parkingcourse.vercel.app, uh which means if your repo has the exact same name, Vercel will not be
  60. 05:32able to give you that domain name or subdomain name because it's already taken by me.
  61. 05:38Uh no worries. Uh you can always go over here into add domain and you can change your Vercel domain if you want.
  62. 05:47Or if you have an existing domain which you got off of let's say GoDaddy, you can actually buy it over here if you want.
  63. 05:53Uh or like I'm sorry, you can like add the existing domain here or buy it straight through Vercel.
  64. 05:59That is not something we are going to be covering in this course.
  65. 06:02Uh the bottom line is our application is now fully deployed on Vercel, and it's available to anyone out there online.
  66. 06:10You can share this URL with whoever you want, and they will always see the exact same thing.
  67. 06:16And moving on, every time we make a change to our codebase, and every time we push it to GitHub, Vercel is going to be updating this URL to reflect
  68. 06:26the most recent version of the application.
  69. 06:28Now, you might be wondering like how does it connect with branches that we talked about you know, in the one of the previous videos.
  70. 06:37So a key thing to know is Vercel is always going to be looking at that main branch, right?
  71. 06:44And this is what's going to be that that this is the version of the application that Vercel is going to serve anyone who's going to use that main URL.
  72. 06:53Vercel is going to be building and deploying your application from your order branches, but the URLs are going to be different, and we're going to witness all of that
  73. 07:04over the course of the couple of next videos.
  74. 07:07So I'm going to see you in the next video.
  75. 07:09Thank you.

The cheat sheet is for signed-in viewers. Inside: the lesson's prompts ready to reuse, the commands and shortcuts, useful links and what to watch out for.

Sign in to get the cheat sheet

Loading the cheat sheet…