Skip to content

DhirajTsx/InstagramClone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

173 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ธ Instagram Clone (Full-Stack Web App)

A full-featured, mobile-first Instagram Clone built using React.js, Firebase, MongoDB, Tailwind CSS, Socket.io, and Express.js. It replicates the core features of Instagram, including image posting, commenting, real-time chat, and both email and phone authentication, all within a clean, responsive UI.

While features like real-time messaging using Socket.io are part of future updates, this project represents more than just a clone. It is a personal journey and a foundation for building my own unique social media platform inspired by Instagram. Over time, I aim to transform this into a fully customized application and website that reflects my individual creativity, ideas, and innovations.

If anyone is interested in contributing or collaborating on this project, feel free to reach out - I'd be happy to welcome meaningful contributions that align with the project's goals.


๐Ÿ”— Live Demo

๐ŸŒ Live Website
๐Ÿ›† Deployed with: Vercel (Frontend) & Railway.com (Backend)


๐Ÿ“ท Output Screenshots

๐Ÿ–ฅ๏ธ Desktop Output

๐Ÿ“ฑ Instagram Clone - Desktop UI

Instagram Clone - Desktop UI

๐Ÿ“ฑ Mobile Output

๐Ÿ“ฑ Instagram Clone - Mobile UI

Instagram Clone Mobile UI

โœจ Features

๐Ÿ” Authentication (via JWT)

  • Email & password registration/login
  • Phone number OTP login (In Update) (In Update)
  • Email verification after signup (In Update)
  • Protected routes (auto-redirect for unauthorized users)

๐Ÿ“ธ Post System

  • Upload image with caption
  • Like/unlike posts
  • Add/delete comments (In Update)
  • Delete your own posts (In Update)
  • Fully responsive feed

๐Ÿง‘โ€๐Ÿ’ผ User Profiles

  • View personal profile and all uploaded posts (In Update)
  • View other usersโ€™ public profiles (In Future update Private Profiles)
  • Optional (Follow/Unfollow system โ€“ to be added)

๐Ÿ’ฌ Real-Time Chat (Socket.io + MongoDB)(This Feature Will Be In Future)

  • One-to-one messaging system
  • Live message updates
  • Chat history stored in MongoDB
  • Displays selected userโ€™s name at top of chat window
  • Scrollable, timestamped messages
  • Typing indicator

๐ŸŽจ UI/UX

  • Tailwind CSS for beautiful, responsive design
  • Mobile-first layout, desktop optimized
  • Framer Motion for subtle animations

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
React.js Frontend
Tailwind CSS Styling
JWT Auth Authentication
MongoDB + Mongoose Database
Express.js Backend APIs
Cloudinary For Storing Images
Socket.io in Future Real-time messaging
Framer Motion Animations
Vercel/Railway.com Deployment

Folder Structure

.
โ”œโ”€โ”€ instagram-clone/
โ”‚   โ”œโ”€โ”€ backend/
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ requireLogin.js
โ”‚   โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ model.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ profileModel.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ userPost.js
โ”‚   โ”‚   โ”œโ”€โ”€ node_modules/       # Backend dependencies
โ”‚   โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ createPost.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ profile.js
โ”‚   โ”‚   โ”œโ”€โ”€ .env                # Backend specific .env
โ”‚   โ”‚   โ”œโ”€โ”€ app.js
โ”‚   โ”‚   โ”œโ”€โ”€ package-lock.json   # Backend specific lock file
โ”‚   โ”‚   โ””โ”€โ”€ package.json        # Backend specific package.json
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ frontend/
โ”‚   โ”‚   โ”œโ”€โ”€ node_modules/       # Frontend dependencies
โ”‚   โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ vite.svg
โ”‚   โ”‚   โ””โ”€โ”€ src/
โ”‚   โ”‚       โ”œโ”€โ”€ components/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ ExplorePage/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ HomePage/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ Loaders/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ Logout/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ MessagePage/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ NotificationPage/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ Reels/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ UserProfilePage/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ UserSearch/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ UserUpload/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ Error404.jsx
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ LoginForm.jsx
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ ProtectedRoute.jsx
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ SignUpForm.jsx
โ”‚   โ”‚       โ”œโ”€โ”€ Data/
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ dataButtons.js
โ”‚   โ”‚       โ”œโ”€โ”€ img/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ Error404
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ LoginPage
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ InstargamSquare.png
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ noImageProfile.jpg
โ”‚   โ”‚       โ”œโ”€โ”€ pages/
โ”‚   โ”‚       โ”‚   โ”œโ”€โ”€ LoginPage.jsx
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ MainPage.jsx
โ”‚   โ”‚       โ”œโ”€โ”€ utils/
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ config.js
โ”‚   โ”‚       โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚       โ”œโ”€โ”€ index.css
โ”‚   โ”‚       โ””โ”€โ”€ main.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ .env                # Frontend specific .env
โ”‚   โ”‚   โ”œโ”€โ”€ eslint.config.js
โ”‚   โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”‚   โ”œโ”€โ”€ package-lock.json   # Frontend specific lock file
โ”‚   โ”‚   โ”œโ”€โ”€ package.json        # Frontend specific package.json
โ”‚   โ”‚   โ”œโ”€โ”€ postcss.config.js
โ”‚   โ”‚   โ”œโ”€โ”€ tailwind.config.js
โ”‚   โ”‚   โ”œโ”€โ”€ vercel.json
โ”‚   โ”‚   โ””โ”€โ”€ vite.config.js
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ .gitignore              # Root .gitignore for the monorepo
โ”‚   โ””โ”€โ”€ README.md               # Main README for the entire project

๐Ÿ”ง Installation & Setup

๐Ÿ”น Frontend (React + Firebase)

git clone https://github.com/Dhirajbhavsar9900/InstagramClone
cd InstagramClone
npm install

Create a .env file in the root of your frontend project with the following content:

VITE_BACKEND_URL = Your Backend LocalHost URl
VITE_CLOUDINARY_CLOUD_NAME= Your Couldinary CouldName
VITE_CLOUDINARY_UPLOAD_PRESET= Your Cloudinary Upload_Preset

After setting up .env, start the development server:

npm run dev

๐Ÿ”น Backend (Express + MongoDB + Socket.io)

cd backend
npm install

Create .env file inside /backend folder:

JWT_SECRET = Generate Your Own JWT_TOKEN 
MONGO_URI = Your MONGO.DB Url
PORT = Your Backend PORT example : (5000)
FRONTEND_URL = Your Frontend LocalHost Url

Run backend server:

npm run dev

๐ŸŒ Deployment

Frontend: Deployed on Vercel

Backend: Deployed on Railway.com

๐Ÿ”ฎ Future Roadmap

Follow/Unfollow system

Search User

User Login Email Alert

Realtime Chating System

๐Ÿง‘โ€๐Ÿ’ป Author

Dhiraj.jsx Connect Me On Instagram

DhirajBhavsar9900 Connect Me On ๐Ÿ‘ฅ GitHub

Releases

No releases published

Packages

 
 
 

Contributors