Discover our feature-rich MERN-based chat app offering seamless communication. Enjoy chat history, message scheduling, personalized profiles with display pictures and emoticons, and the immersive experience of real-time voice messaging.
- URL:
/api/v1/register
- Method:
POST
- Description: Allows users to register by providing necessary credentials.
- Authenticated: No
- Request Body:
username
: User's usernamepassword
: User's password
- URL:
/api/v1/login
- Method:
POST
- Description: Logs in registered users by verifying their credentials.
- Authenticated: No
- Request Body:
username
: User's usernamepassword
: User's password
- URL:
/api/v1/logout
- Method:
POST
- Description: Logs out the authenticated user.
- Authenticated: Yes
- URL:
/api/v1/refresh
- Method:
POST
- Description: Refreshes the user's access token.
- Authenticated: Yes
- URL:
/api/v1/
- Method:
GET
- Description: Retrieves all users' information.
- Authenticated: Yes
- URL:
/api/v1/user/
- Method:
PUT
- Description: Updates the user's profile information.
- Authenticated: Yes
- URL:
/api/v1/user/
- Method:
GET
- Description: Retrieves the user's profile information.
- Authenticated: Yes
- URL:
/api/v1/
- Method:
GET
- Description: Retrieves all chats available to the user.
- Authenticated: Yes
- URL:
/api/v1/
- Method:
POST
- Description: Accesses and posts chats.
- Authenticated: Yes
- URL:
/api/v1/:chatId
- Method:
GET
- Description: Retrieves all messages for a specific chat.
- Authenticated: Yes
- URL:
/api/v1/
- Method:
POST
- Description: Sends a message to a chat.
- Authenticated: Yes
- URL:
/api/v1/group
- Method:
POST
- Description: Creates a new group chat.
- Authenticated: Yes
- URL:
/api/v1/renameGroup
- Method:
PUT
- Description: Renames an existing group chat.
- Authenticated: Yes
- URL:
/api/v1/removeFromGroup
- Method:
PUT
- Description: Removes a user from a group chat.
- Authenticated: Yes
- URL:
/api/v1/addToGroup
- Method:
PUT
- Description: Adds a user to an existing group chat.
- Authenticated: Yes
This repository contains a Node.js API project that provides functionalities for managing users, chats, and groups.
-
Clone the repository:
git clone https://github.com/your-username/nodejs-api-project.git
-
Navigate to the project directory:
cd nodejs-api-project
-
Install dependencies:
npm install
-
Set up environment variables by creating a
.env
file based on.env.example
. Include necessary configurations (e.g., database connection, tokens). -
Start the server:
npm start
-
Use API endpoints by sending requests to the provided routes. Refer to the API documentation for available endpoints and functionalities.
The API documentation is available in the API.md
file in this repository. It contains detailed information about the available endpoints, their descriptions, methods, and authentication requirements.
- Node.js
- Express.js
- MongoDB (or your database of choice)
- Other dependencies listed in
package.json
Contributions are welcome! If you find any issues or want to add new features, please open an issue or create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.