Video by Code With Antonio · streamed from YouTube. All rights remain with the creator.
Lesson 4: A Video-Sharing Platform with Next.js 15
About this lesson
This long project tutorial from Code With Antonio builds the first part of a video-sharing platform in the style of a well-known site, using Next.js 15 and React with Tailwind CSS, the Drizzle database toolkit and tRPC for type-safe communication between server and client. After a demonstration and some notes on the project, it sets up the codebase and builds the basic layout of the site, with its navigation bar and sidebar. Authentication is added next, followed by the database setup and a webhook that keeps the app's own users table in sync with the authentication service. A substantial part of the tutorial sets up and configures tRPC, so that the front end can call server procedures with full type checking. Video categories are then added and displayed for browsing. The tutorial goes on to build the creator studio: its layout, a list of the creator's own videos and infinite loading so that long lists load more items as the user scrolls. Video handling comes next, integrating the Mux video service for uploading and streaming and handling the webhooks Mux sends as each video is processed. A video form lets creators edit the details of each video, and video thumbnails are added. The final sections introduce background jobs powered by artificial intelligence and use them to generate thumbnails, before the video ends at the close of part one of the project. Afterwards, read Chapter 4 of the course book, which works through cursor pagination and the life of an uploaded video by hand.