You can think of each model as a special type of JavaScript object with special properties that we are creating in our schema. In the first column of each model are the different fields or individual properties that each model consists of, such as the id or unique identifier or createdAt timestamp when the database created a given entry. SubscribedTo User fields:, references: )Įach of these models includes various properties with their associated data types. Subscribers Subscription Subscription View You can see the final version of our schema below: // prisma.schemaĮmail String String String String Video Our app will consist of six primary data models: User, Comment, Subscription, Video, VideoLike, and View data. It does the work of managing how our data is structured in our database, including the relationships all of our data shares with each other through models. Prisma is what's known as an ORM or an object relational mapper. A tool called Prisma is going to be responsible for modeling that data (for telling our database what data it is going to store). The database that we're going to be using is the SQL database Postgres. The backend is going to do all these things by interacting with our database. It will also be responsible for providing our video data (like the video itself and whether we have liked or disliked it) and user-related data (like each user's profile). Our backend is going to be responsible for things like authentication and authorization to log in users and make sure they can access the right content. Our application consists of two major parts, our Node backend and our React frontend. Step 1: Model our Data and Create our Database
Quilting software programs how to#
In it, you'll learn how to build an impressive, full-stack React project every month from scratch. Join the real-world React app course series.
Let's get started! Want to build amazing apps with React like this one? Through this guide, we will cover how to build powerful web apps with React and Node using a stack of essential technologies, along with how each tool contributes to creating our overall app functionality. I will lay out how I built a clone of the YouTube web app and the concrete steps you can take in order to build your own along with other video-based apps like it. In this tutorial, you will get an in-depth overview of how you can build a complete YouTube clone using React in 10 steps.