nischay-code / MERN_Instagram

Created a fully featured Instagram clone using ReactJS, NodeJS, ExpressJS and MongoDB.

Home Page:https://mern-instagram-gbe2.onrender.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MERN_Instagram πŸ“Έ

Project Overview

This repository contains the source code for a fully featured Instagram clone developed using ReactJS for the frontend, NodeJS and ExpressJS for the backend, and MongoDB as the database.

Table of Contents

  1. Introduction
  2. Features
  3. Technologies Used
  4. Installation
  5. Usage
  6. API Endpoints
  7. Database Schema
  8. Contributing

Introduction

This Instagram clone replicates the core features of the original platform, providing users with the ability to register, post images, follow other users, and interact with posts through likes and comments. The frontend is built using ReactJS to ensure a responsive and dynamic user interface, while the backend, powered by NodeJS and ExpressJS, handles authentication, data storage, and retrieval through MongoDB.

Features

  • User Authentication: Users can register and log in securely. πŸ”
  • Image Upload: Users can upload images to share with their followers. πŸ“€
  • Follow System: Users can follow and unfollow other users. βž•βž–
  • Like and Comment: Users can interact with posts through likes and comments. β€πŸ’¬
  • Followed Users Feed: A personalized news feed displaying posts from followed users. πŸ“°

Technologies Used

  • Frontend:

    • ReactJS
  • Backend:

    • NodeJS
    • ExpressJS
  • Database:

    • MongoDB

Installation

  1. Clone the repository:
git clone https://github.com/nischay-code/MERN_Instagram.git
cd MERN_Instagram
  1. Install dependencies for the frontend and backend:
cd frontend
npm install

cd ../backend
npm install
  1. Set up the MongoDB database and update the connection string in the config.js file.

  2. Run the application:

# Start the backend server
cd backend
npm start

# Start the frontend development server
cd frontend
npm start

The application will be accessible at http://localhost:3000.

Usage

  1. Register: Create an account or log in if already registered.
  2. Explore: Navigate through the follow other users and interact with posts.
  3. Share: Upload your images to share with followers.

API Endpoints

  • POST /api/users/register: Register a new user.
  • POST /api/users/login: Log in an existing user.
  • GET /api/posts: Retrieve all posts.
  • POST /api/posts: Create a new post.
  • POST /api/posts/:postId/like: Like a post.
  • POST /api/posts/:postId/comment: Add a comment to a post.
  • POST /api/users/:userId/follow: Follow a user.
  • DELETE /api/users/:userId/unfollow: Unfollow a user.

For detailed request and response formats, refer to the API documentation.

Database Schema

The MongoDB database is structured with collections for users, posts, likes, and comments. Refer to the schema documentation for a detailed structure.

Contributing

Feel free to contribute by submitting bug reports, feature requests, or pull requests. Follow the guidelines outlined in the CONTRIBUTING.md file.

πŸš€ Happy Coding! πŸš€

About

Created a fully featured Instagram clone using ReactJS, NodeJS, ExpressJS and MongoDB.

https://mern-instagram-gbe2.onrender.com/


Languages

Language:JavaScript 81.6%Language:CSS 16.2%Language:HTML 2.2%