A simple Instagram clone made using a MERN stack. Users can interact with other users by following other users; uploading and liking posts; and commenting. The app features a homepage that displays recommended posts and the posts of the user's following, an explore page where the user can find other users and a profile page where the user can edit their profile.
Here is a simple demo
- React
- Node
- MongoDB
- Express
- Formik & Yup for forms and validation
- Bootstrap & Sass for styling
- Multer for uploading and storing images
To upload the image URLs to the database and store the image files locally on the project, I used this tutorial as a foundation.
NOTE: You will need npm to install the required libraries
- Clone/download the git repo
git clone https://github.com/jchong9/instagram-clone.git
- Install the necessary dependencies for the frontend and backend
For the frontend:
(From the project root directory)
cd frontend
npm i
For the backend:
(From the project root directory)
cd backend
npm i
- Create a .env file in
/backendthat links the backend to your MongoDB database string, i.e
DATABASE_URL = mongodb://localhost:27017/(your collection)
NOTE: You can find this connection string on the MongoDB Compass by connecting with your database and clicking the 3 dots next to the database name.
- Run both the frontend and backend
For the frontend:
(While in the frontend directory)
npm start
For the backend:
(While in the backend directory)
nodemon
OR
node server