This project primarily focuses on the backend component of a messaging application developed using Node.js, Express.js, MongoDB, and Socket.IO. It contains necessary APIs and functionality to support real-time messaging between users, group chats, message encryption, user management.
-
User Management:
- User registration with username and password.
- User login/authentication with JWT.
- User profile management (update profile, profile picture).
-
Messaging:
- Sending and receiving messages between users.
- Real-time messaging using WebSockets with Socket.IO.
- Support for text, images, videos, and attachments.
-
Group Chats:
- Creating, joining, and leaving group chats.
- Sending messages to group chats and receiving messages from other participants.
-
Message Encryption:
- End-to-end encryption for messages using AES.
- Encryption and decryption of messages to ensure privacy and security.
index.js
: Entry point of the application.routes/
: Contains route definitions for different API endpoints.controllers/
: Contains controller functions for different API endpoints.models/
: Contains MongoDB schema definitions for user profiles, messages, and group chats.middlewares/
: Contains middleware functions, including authentication middleware.config/
: Contains configuration files, including JWT secret key and database connection settings.
-
Clone the repository:
git clone <repository_url>
-
Install dependencies:
npm install
-
Set up environment variables:
PORT=3000 MONGODB_URI=<mongodb_url> JWT_SECRET_KEY=<jwt_token>
-
Start the server:
npm start
-
Access the API at http://localhost:3000.
The API documentation is available in the docs/
directory. It includes details about each endpoint, its requests/responses, and postman collections.
This project is licensed under the MIT License.