Skip to content

I've developed a MERN-based Instagram clone, offering users a platform to sign up, post pictures, follow others, like, comment, and explore a feed, mirroring Instagram's key functionalities.

License

nisabmohd/Instagram-mern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram-mern

This Instagram clone is made with React, Node, MongoDB .

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

Cloning The GitHub Repository

The recommended way to get this repo clone is to use git to directly clone the repository:

$ git clone https://github.com/nisabmohd/Instagram-mern.git

Environment variables React setup

create .env file in frontend/src

REACT_APP_API_URL=http://localhost:8000
REACT_APP_GOOGLE_OAUTH_REDIRECT_URL=http://localhost:8000/auth/google/oauth
REACT_APP_GOOGLE_CLIENT_ID= {google auth client id}

Environment variables Node setup

create .env file in backend

PORT = {port number}
Mongo_URI= {your mongo uri}
JWT_Secret= {jwt secret}
JWT_Refresh_Secret= {jwt refresh secret}
CLIENT_URL=http://localhost:3000
email=userzyx01@xyz.com
password=1skjsnksdsd
clientid={google auth cclientid}
clientsecret={google auth client secret}
redirect_url=http://localhost:8000/auth/google/oauth

Running Your Application

open terminal/bash in this repo and enter below commands to start the application

→ To start the server

$ cd frontend
$ node server.js

→ To start the client app

$ cd client
$ npm start
  • Your client application should run on port 3000 with the development environment configuration, so in your browser just go to http://localhost:3000

  • Your server application should run on port 8000, so in your browser just go to http://localhost:8000