Introduction

Do you know about hack.chat .hack.chat is a minimal, distraction-free, accountless, logless, disappearing chat service which is easily deployable as your own service. This project is inspaired by hack.chat only diffrence is its only written in nodejs you can also share files.

Key Features of the Chat Application

https://gitlab.com/krafi/krafi.hack.chat

Users can easily join specific chat rooms via custom URLs, allowing them to immediately connect with others.No sign up, No account, only write a username each time you go. suppose your friends are in a room called krafichatroom1 and your name is Rafi For instance, navigating to http://yourdomain.com/rafi/krafichatroom1 will automatically join the chat room named krafichatroom1 under the username rafi. If a custom link isn’t provided, users can manually enter their username and room name on the landing page.

2. Real-Time Messaging

The chat app provides real-time messaging, ensuring instant communication between users. Messages display the sender’s username and the exact time of the message.

3. File Sharing

With built-in file-sharing capabilities, users can easily upload and share files within the chat. Images can be directly viewed within the chat via a convenient “View” button.

4. User List

The application keeps track of active users in each chat room, displaying a real-time list. This feature allows users to see who is currently online and engaged in the conversation.

5. Message Replay

All messages exchanged in the chat are logged and saved in files named after the respective chat rooms. This ensures that there’s a persistent record of all activities, which can be useful for reference or auditing purposes.

Enabling Invisible Mode

Activate invisible mode by clicking the “Toggle Invisible Mode” button. The chat screen will turn blank, and you can return to the chat by typing the secret key sequence zx.

7. Image Viewer

The built-in image viewer allows users to open and view shared images directly within the chat. By clicking the “View” button on image links, users can see the images in an overlay, which enhances the user experience.

How to Set Up the Application

Running the Application

  1. Install Dependencies:

    npm install express http socket.io multer
  2. Start the Server:

    npm start
  3. Access the Application: Open your web browser and navigate to http://yourdomain.com/ to access the landing page, or use a custom URL to join a specific chat room.

Conclusion

This chat application is a versatile tool designed to facilitate real-time communication and collaboration. With features like custom chat rooms, file sharing, and invisible mode, it meets a wide range of user needs, making it an excellent choice for both personal and professional use.

For more tutorials and tips on building powerful web applications, stay tuned to our blog. Happy coding!