Welcome to FacingOff Chat App, a real-time messaging application that utilizes AWS S3 for file storage, AWS SES for password resets, and Socket.IO for real-time communication. The chat app can handle multi-picture and file uploads simultaneously. Additionally, it features an integration with ChatGPT for get responses inside the chat and save them as the chat messeges. also there is files to build docker image with two containers one for database and one for the express app server , and action file to deploy the image to AWS EC2 instance as CICD methodology.
- Getting Started
- Prerequisites
- Installation
- Usage
- Endpoints
- Authentication
- WebSocket
- FrontEnd
- Contributing
- License
This project is a Node.js application built with Express, TypeORM, and Socket.IO. It serves as a backend for the application.
Before you begin, ensure you have met the following requirements:
- Node.js installed
- npm or yarn installed
- Docker (optional, for running a database in a container)
-
Clone the repository:
cd yourfolder git clone https://github.com/obaidofj/RealTimeChat_App.git . -
Install dependencies:
run this in the same root folder in your terminal :
npm install -
Set up environment variables:
Create a .env file in the root directory and configure the necessary environment variables. You can use .env.example as a template.
- Starting the App/server:
by runing this in terminal:npm run devand by that also The migration to set up the database is run by itself on first time.
Your server should now be running. You can test it by making requests to the defined endpoints.
/auth: Authentication-related endpoints
/user: User-related endpoints
/chat: Chat group-related endpoints
/messege: Message-related endpoints
/blockmute: Block and mute user-related endpoints
/notify: Notification-related endpoints
/order: Order-related endpoints
/payment: Payment-related endpoints
/product: Product-related endpoints
/connection: Connection and friendship-related endpoints
- Description: Register a new user.
- Description: Log in a user.
- Description: Log out a user.
- Description: Request a password reset.
- Description: Reset password with token.
- Description: Request password reset via email link.
- Description: Verify user credentials.
- Description: Send a message.
- Description: Send a message with S3 file save.
- Description: Get messages.
- Description: Get sent messages.
- Description: Get received messages.
- Description: Search for messages.
- Description: Get ChatGPT responses.
- Description: Mute a user.
- Description: Block a user.
- Description: Unmute a user.
- Description: Unblock a user.
- Description: Get initiated mute/block connections.
- Description: Get received mute/block connections.
- Description: Send a connection request.
- Description: Accept a connection request.
- Description: Reject a connection request.
- Description: Remove a connection.
- Description: Get user connections.
- Description: Search for connections.
- Description: Send a notification.
- Description: Get notifications.
- Description: Create a chat room.
- Description: Get chat room information.
- Description: Create an order.
- Description: Get order information.
- Description: Create a payment to be completed to allow sending link for product and make order and payment for it.
- Description: Get user payments.
- Description: Create a product.
- Description: Get all products.
- Description: Get product information.
- Description: Get a file.
- Description: Get an S3 file.
- Description: Create a user profile.
- Description: Get profile by ID.
- Description: Get profile by name.
- Description: Search for users.
Refer to the source code or API documentation for detailed information on each endpoint.
Here is the link for the documentaion :
The authentication middleware is applied globally, requiring valid authentication for most endpoints. Ensure you include the correct authentication token in your requests.
WebSocket functionality is provided through Socket.IO. WebSocket events are handled by socketHandler.js. Refer to the source code or documentation for WebSocket-related functionality.
Contributions are welcome! Please follow the: contribution guidelines.
This project is licensed under the MIT License.