it will be auto-increment if a new post is inserted to the database. The post table will be used to store that information. user_number_of_following - the number of followers that the user is following.Īccording to the requirements, the user can upload their posts, the post could be an image or a video.user_number_of_followers - the number of followers for the user.user_number_of_posts - the number of posts for the user.
REACT REQUIRE INSTAFEED FULL
user_full_name - full name of the user.user_follower: stores the followers for each user.Įach table will be explained in the follow part: user_notification: stores the notification for the individual user.ĥ. post_reaction: stores the information about the users who like the individual post.Ĥ. user_account: stores the user’s information.ģ. The above sql specifies that we need to create the below tables:ġ. To create the database and its table, you need to get the SQL here. Before proceeding, you need to make sure that you have installed the MySQL database on your computer already.
REACT REQUIRE INSTAFEED HOW TO
For this reason, this section describes how to create the database and its table.
REACT REQUIRE INSTAFEED INSTALL
Step 3: Run “npm i” to install the dependencies for the application.Īs mentioned above, we will use the MySQL database.Step 2: Copy dependencies and devDependencies from the package.json file.Step 1: You need to have Node.js installed on your machine.Installing the Instagram Clone Dependencies instagram.sql: contains scripts that you need to use to create the database and its tables.README.md: describes the application and provides steps by steps to run the application.package.json: contains all dependencies of the application.In this case, we do not want to commit the “config.js” file because it contains the secret keys of the Javascript chat application. gitignore: this file contains files that will be ignored when committing the code. env: contains environment variables that will be used in the application. screenshots: this folder contains images that are used for README.md file.routes: contains all files that will be used to handle the API requests.public: contains all html, css, javascript files for the UI.Step 2: create a new project with the name instagram-clone by running the following statement.Įach subfolder and file will be explained in detail in the following section:.Step 1: you need to have Node.js installed on your machine.
This will help you to improve your understanding of this tutorial. To follow this tutorial, you must have a degree of understanding of the general use of React.js, Node.js and MySQL database.
We use a lot of social applications, and chat applications every day, including Facebook, Instagram, Twitter, WhatsApp, and so on. App and web development have come a long way over the last few years.