Threads is a full-stack social media application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). Designed to provide a dynamic and engaging user experience, Threads allows users to connect, share, and interact with each other seamlessly. The application offers a wide range of features to ensure a modern social media experience, with functionalities like real-time chat, post creation, and user interaction. Utilizing the MERN stack ensures a smooth and robust performance, making Threads a reliable platform for social interaction.
Frontend:
Backend:
Deployed On:
- User Authentication: Secure user authentication for account creation and login.
- Profile Management: Logged-in users can edit and update their profile.
- Freeze: Logged-in users can freeze/disable their account.
- Posts: Create, read, delete, and share posts with their followers.
- Follow/Unfollow Users: Discover and connect with new users through the suggestion list, and manage your network by following or unfollowing users.
- Like/Unlike Posts: Engage with posts by liking or unliking them.
- Comment: Comment on posts to interact and share your thoughts with others.
- Search: Easily search user by username to start a conversation.
- Real-Time Messaging: Chat with other users in real-time, with support for both text and image messages.
- Light and Dark Mode: Toggle between light and dark themes for a personalized user interface.
- Responsive Design: Fully responsive design for seamless use on any device.
-
Clone the repository:
git clone https://github.com/rajeevkrS/Threads-Social-App
-
Install dependencies in root folder:
npm install
-
Set up environment
.env
variables:# for port PORT= your port number # for mongo database MONGODB_URI= your mongo url # for password secret JWT_SECRET= your jwt secret # for cloudinary setup CLOUDINARY_CLOUD_NAME= your cloudinary name CLOUDINARY_API_KEY= your cloudinary api key CLOUDINARY_API_SECRET= your cloudinary api secret # for frontend url FRONTEND_URL= your frontend url # for backend url BACKEND_URL= your backend url
-
Run the application:
Build the app:
npm run build
Start the app:
npm start
Here are listed all available API endpoints along with a brief description of each.
POST /api/users/signup
: creating new userPOST /api/users/login
: user logged inPOST /api/users/logout
: user logged outPUT /api/users/update/:id
: update user profilePOST /api/users/follow/:id
: follow & unfollow usersGET /api/users/profile/:query
: get other user's profileGET /api/users/suggested
: get new users suggestionPUT /api/users/freeze
: freeze & unfreeze account
POST /api/posts/create
: create postsPUT /api/posts/like/:id
: like & unlike the postsPUT /api/posts/reply/:id
: reply on postsGET /api/posts/:id
: get any postsDELETE /api/posts/:id
: delete postsGET /api/posts/user/:username
: get user postsGET /api/posts/feed
: get all feed posts
POST /api/messages
: send messages to other usersGET /api/messages/:otherUserId
: get all messages between the userGET /api/messages/conversations
: get all conversation that logged in user has conversed with
If you want to contact me, you can reach me through below handles.
Feel free to contribute to the project by opening issues or creating pull requests. Your feedback and suggestions are highly appreciated.