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.
- Introduction
- Features
- Technologies Used
- Installation
- Usage
- API Endpoints
- Database Schema
- Contributing
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.
- 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. 📰
-
Frontend:
- ReactJS
-
Backend:
- NodeJS
- ExpressJS
-
Database:
- MongoDB
- Clone the repository:
git clone https://github.com/nischay-code/MERN_Instagram.git
cd MERN_Instagram
- Install dependencies for the frontend and backend:
cd frontend
npm install
cd ../backend
npm install
-
Set up the MongoDB database and update the connection string in the config.js file.
-
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.
- Register: Create an account or log in if already registered.
- Explore: Navigate through the follow other users and interact with posts.
- Share: Upload your images to share with followers.
- 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.
The MongoDB database is structured with collections for users, posts, likes, and comments. Refer to the schema documentation for a detailed structure.
Feel free to contribute by submitting bug reports, feature requests, or pull requests. Follow the guidelines outlined in the CONTRIBUTING.md file.
🚀 Happy Coding! 🚀