LinkUp is a real-time chat application that allows users to create chat rooms and communicate with others in real-time. Users can create accounts, log in, create and join chat groups, and share messages and media. The application is built using MongoDB, Express, React, Node.js, and Socket.io.
- User Authentication: Create an account with email/password or social login.
- Real-time Messaging: Chat with friends in real-time using WebSockets.
- Chat Groups: Create and join chat rooms to communicate with groups.
- Responsive Design: Optimized for both desktop and mobile devices.
Ensure that you have the following installed on your local machine:
-
Clone the repository:
git clone https://github.com/AhmadYousif89/linkup.git cd linkup
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in backend directory and add the following variables:PORT=5000 MONGO_URI=mongodb://localhost:27017/linkup JWT_SECRET=<your-secret-key>
Create a
.env
file in client directory and add the following variables:VITE_CLERK_PUBLISHABLE_KEY=<your-publishable-key> VITE_SERVER_API=http://localhost:5000/api
-
Start the application:
Start the backend server from backend directory:
npm start
Start the frontend server from client directory:
npm run dev
-
Navigate to
http://localhost:5173
in your browser to start using the application.
- Friend System: Add friends and see their online status.
- Multi-media Files Sharing: Share images, videos, and other files.
- Voice Calling: Make voice calls with friends in real-time.
- Video Calling: Make video calls with friends in real-time.
- Screen Sharing: Share your screen with friends in real-time.
- Push Notifications: Get notified when friends send new messages.
- Dark Mode: Switch to a dark theme for better readability.
This project leverages modern technologies to deliver real-time communication:
- Frontend: React with state management and dynamic UI.
- Styling: Tailwind CSS for responsive and modern UI design.
- Backend: Node.js + Express for RESTful APIs and routing.
- Database: MongoDB for storing user data, chats, and rooms.
- Real-time Communication: Socket.io for WebSocket-based real-time messaging.
- Security: JWT + Clerk for secure authentication and authorization.
- Testing: Postman for API testing
- Sign up/Login: Create an account or log in with existing credentials.
- Create/Join Chat Groups: Create a new chat groups or join an existing one.
- Send Messages: Chat in real-time with friends or group members. Share images, files, and other media.
-
User Endpoints:
-
POST /api/user/clerk
Function: Sign-up or Sign-in a user with clerk.
Request Body: { id, email, fullName, image } -
GET /api/user?search=Joe
Function: Search for user using query
Request Query: { query.search }
-
-
Chat Endpoints:
-
POST /api/chat/
Function: Views chat with a certain user, requires userId.
Request Body: { userId } -
GET /api/chat/
Function: Search for private chats for the user. -
GET /api/chat/group
Function: Search for group chats for the user. -
POST /api/chat/group
Function: Create a new group chat, requires name of the group and user IDs (minimum 3 including the current user).
Request Body: { users, name } -
PUT /api/chat/rename
Function: Rename group chat, requires chatId and chatName.
Request Body: { chatId, chatName } -
PUT /api/chat/groupadd
Function: Add a user to the group, requires chatId and userId (must be in the group).
Request Body: { chatId, userId } -
PUT /api/chat/groupremove
Function: Remove a user from the group, requires chatId, userId, and must be groupAdmin.
Request Body: { chatId, userId } -
DELETE /api/chat/groupdelete
Function: Delete a group, requires chatId and must be groupAdmin.
Request Body: { chatId } -
PUT /api/chat/groupquit
Function: Quit a group, requires chatId.
Request Body: { chatId } -
PUT /api/chat/close
Function: Close a chat for a certain user, requires chatId.
Request Body: { chatId }
-
-
Message Endpoints:
-
POST /api/message/
Function: Send a message to a user, requires content and chatId.
Request Body: { content, chatId } -
GET /api/message/:chatId
Function:Get all messages in a chat, requires chatId.
Request Param: { chatId }
-
Contributions are welcome! Here's how you can get involved:
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
Please make sure your code follows the project's code style guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.