- User Authentication: Sign up, log in, and manage your account.
- Tweet Management: Create, edit, delete, and view tweets.
- Follow System: Follow and unfollow other users.
- Responsive Design: Fully responsive UI for a seamless experience on all devices.
- Frontend: React, Redux, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB, Mongoose
- Node.js (v14 or later)
- MongoDB (local or Atlas)
-
Clone the repository:
git clone https://github.com/meeravanathi/X-clone.git cd X-clone
-
Navigate to the
backend
directory and install dependencies:cd server npm install
-
Create a
.env
file in thebackend
directory with the following environment variables:MONGO_URI=your_mongodb_connection_string JWT=your_jwt_secret
-
Start the backend server:
npm start
-
Navigate to the
frontend
directory and install dependencies:cd client npm install
-
Start the frontend development server:
npm start
The application should now be running at http://localhost:3000
(for the frontend) and http://localhost:8000
(for the backend).
- Register: Create a new account or log in if you already have one.
- Create Tweet: Post new tweets and interact with others' tweets.
- Follow Users: Find and follow users to see their tweets in your timeline.
- Notifications: Stay updated with real-time notifications.
POST /api/auth/signup
- Register a new userPOST /api/auth/signin
- Log in an existing user
GET /api/tweets
- Get all tweetsPOST /api/tweets
- Create a new tweetPUT /api/tweets/:id
- Edit a tweetDELETE /api/tweets/:id
- Delete a tweet
GET /api/users/:id
- Get user profilePOST /api/users/follow/:id
- Follow a userPOST /api/users/unfollow/:id
- Unfollow a user
We welcome contributions to improve this project. Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
ChatGP