This project is a clone of the popular social media platform Twitter. It is built using the MERN stack (MongoDB, Express.js, React.js, and Node.js) along with various other libraries and technologies.
The Twitter Clone application allows users to create accounts, log in, create posts, follow/unfollow other users, view posts from accounts they follow, like/unlike posts, add comments to posts, and perform other actions similar to the real Twitter platform. Users can also upload profile and cover images, update their profile details, and change their passwords.
- React.js: A JavaScript library for building user interfaces.
- Tailwind CSS: A utility-first CSS framework for rapidly building custom designs.
- DaisyUI: A component library for Tailwind CSS.
- react-icons: A library that provides a collection of popular icons for React applications.
- react-hot-toast: A lightweight, customizable, and beautiful React toast library.
- tanstack/react-query: A powerful React library for managing server state with query caching, auto re-fetching, and more.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express.js: A minimal and flexible Node.js web application framework.
- MongoDB: A popular NoSQL database for storing and retrieving data.
- Cloudinary: A cloud-based image and video management service for uploading and delivering media assets.
- bcrypt: A library for hashing passwords to store them securely.
- jsonwebtoken: A library for generating and verifying JSON Web Tokens (JWT) for authentication and authorization.
Follow these steps to run the project locally:
- Clone the repository:
https://github.com/saurabh050302/full-stack-twitter-clone.git
- Navigate to the project directory:
cd full-stack-twitter-clone
- Reset repo to proper commit:
git reset --hard a1af00b4352c705a87692f995de19baffdf5bfcc
- Install the dependencies for the backend:
npm install
- Install the dependencies for the frontend:
cd .\frontend\
npm install
- Create a
.env
file in thebackend
directory and add the following environment variables:
MONGO_URI=<your_mongodb_connection_string>
JWT_SECRET=<your_jwt_secret>
CLOUDINARY_CLOUD_NAME=<your_cloudinary_cloud_name>
CLOUDINARY_API_KEY=<your_cloudinary_api_key>
CLOUDINARY_API_SECRET=<your_cloudinary_api_secret>
- Start the backend server:
npm run dev
- Start the frontend development server:
cd .\frontend\
npm run dev
The application should now be running locally at http://localhost:3000
. Use Ctrl+Click to open the application in browser.