A full-stack Twitter clone application with real-time updates, user authentication, and core Twitter functionalities.
- User authentication (signup, login, logout)
- Create, read, update, and delete tweets
- Like and retweet functionality
- User profiles with avatar and bio
- Follow/unfollow users
- Real-time updates for new tweets and notifications
- Responsive design for mobile and desktop
- React.js
- TypeScript
- Tailwind CSS for styling
- React Router for navigation
- Context API for state management
- Node.js
- Express.js
- MongoDB for database
- JWT for authentication
- Socket.io for real-time updates
- Node.js (v14 or higher)
- npm or yarn
- MongoDB
- Clone the repository
git clone https://github.com/gurusintechlabs/twitter-clone.git
cd twitter-clone- Install dependencies for frontend and backend
# Install frontend dependencies
cd frontend
npm install
# Install backend dependencies
cd ../backend
npm install-
Set up environment variables
- Create a
.envfile in the backend directory - Add the following variables:
PORT=5000 MONGODB_URI=mongodb://localhost:27017/twitter-clone JWT_SECRET=your_jwt_secret
- Create a
-
Run the application
# Run backend
cd backend
npm run dev
# Run frontend (in a separate terminal)
cd frontend
npm starttwitter-clone/
├── frontend/
│ ├── public/
│ └── src/
│ ├── assets/
│ ├── components/
│ ├── context/
│ ├── hooks/
│ ├── pages/
│ ├── App.tsx
│ └── index.tsx
├── backend/
│ ├── src/
│ │ ├── config/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ ├── models/
│ │ ├── routes/
│ │ ├── utils/
│ │ └── index.js
│ └── package.json
└── README.md
This project is licensed under the MIT License.