The One-to-One Chat Application is a robust and feature-rich project designed to facilitate seamless real-time communication between users.
This project provides a comprehensive API for essential functionalities such as user registration, real-time messaging, multimedia sharing, push notifications, user status tracking, and secure authentication.
Key highlights of the One-to-One Chat Application include:
-
🔐 Secure Authentication: Ensures user data privacy and secure access through robust authentication mechanisms using JWT, Cookie management, rate-limiting.
-
📨 Real-Time Messaging: Supports instant communication between users using socket programming and real-time updates. Based on
socket.iolibrary. -
📸 Multimedia Sharing: Allows users to share images, and documents within chats.
-
📱 Push Notifications: Keeps users informed about new messages and updates even when they are not actively using the app. [ yet to be implemented ]
- Connect: Ability to send invitation, accept or reject inorder to establish chat.
- Chat: Chat with connected users.
- Search functionality: Search for specific messages or keywords within chats and also search users in the Chat application.
- Profile Customization: Set a profile photo and status message.
- Message Status: Message delivered (single tick) and read (double tick).
- Backend: Node.js and ExpressJS
- Database: MongoDB
- Message communication: socket.io
- Swagger: OpenAPI spec standard API documentation.
- Data validation using
zod
Clone the repository to your local machine.
git clone https://github.com/vedesh-padal/tal-chat-web.git
cd tal-chat-webSince the project is now just ready with backend API support, the working directory is now backend. Change to the backend directory using cd backend.
npm install- Create a copy of
.env.samplefile and rename it to.env - Put the MongoDB connection URL (either from MongoDB Atlas, or local Docker setup MongoDB URL) in the
MONGODB_URIkey value in.envfile. - Obtain a RESEND (mailing service provider) API key from here, and put the API key into
RESEND_API_KEYkey value in.envfile. - Feel free to change the
envvariables:ACCESS_TOKEN_SECRET,REFRESH_TOKEN_SECRETand others exceptNODE_ENVaccording to your usecase.
- Run the following command to start the Backend:
(assuming that you are in the
backenddirectory)cd src npm start
-
Once, the backend is started, head over to the
BACKEND_HOST_URLURL that was given in. envfile to take a look at the OpenAPI Spec (Swagger Docs). -
If you have not changed the
BACKEND_HOST_URL, click on the following link to access Swagger Docs of this project. -
Since the database is just created, you need to create users and perform other operations. For that, please visit Swagger Docs at your backend URL to understand the routes and test the backend.
