Threads Clone is a social media platform aiming to replicate features for user interaction, including posts, comments, and following functionalities.
The base URL for the backend API: http://localhost:8080/
Threads-Demo.1.mp4
- React.js
- Express.js
- MongoDB
- Node.js
- bcryptjs
- jsonwebtoken
- Redux
- Tailwind CSS
- React Icons
- Clone the repository:
git clone <repository_url>
- Navigate to the backend directory:
cd backend
- Install backend dependencies:
npm install
- Run the backend server:
npm start
For authentication and accessing protected routes:
- Obtain a token by signing up or logging in via
/auth/signup
or/auth/login
. - Include the obtained token in the Authorization header:
Bearer <token>
POST /auth/signup
: Create a new user, returns user details with a tokenPOST /auth/login
: Login an existing user, returns user details with token
GET /users/
: Get all usersGET /users/:id
: Get user details by IDPUT /user/:id
: Update user details by IDDELETE /user/:id
: Delete user by IDGET /user/:userId/followers
: Get all followers of a userGET /user/:userId/followings
: Get all followings of a userPOST /user/:userId/followers/add
: Add a follower in the user's dataPOST /user/:userId/following/add
: Add a following in the user's data
GET /posts/
: Get all posts sorted by recently uploadedGET /posts/:id
: Get post by IDPOST /posts/
: Create a new postPUT /posts/:id
: Update a post by IDDELETE /posts/:id
: Delete a post by IDPUT /posts/:postId/likes
: Add or remove a like from a post
POST /comments/:postId
: Create a new comment on a post by IDDELETE /comments/:id
: Delete a comment by ID
For questions, support, or feedback, reach out to the maintainers: