Introduction
Do you know about hack.chat? It’s a minimal, distraction-free, accountless, logless, disappearing chat service which is easily deployable as your own service.
This project is inspired by hack.chat. The only difference is it’s written in Node.js, and you can also share files.
Project Repository: krafi.hack.chat
Key Features of the Chat Application
📖 1. Join Chat Rooms with Custom Links
Users can easily join specific chat rooms via custom URLs. Suppose your friends are in a room called “krafichatroom1” and your name is “Rafi”. Navigating to http://yourdomain.com/rafi/krafichatroom1 will automatically join the chat room 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 there’s a persistent record of all activities.
📖 6. 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.
How to Set Up the Application
📖 Install Dependencies
npm install express http socket.io multer
npm start
# Open your web browser
http://yourdomain.com/
📖 Custom URL Usage
To join a specific chat room directly, use:
http://yourdomain.com/username/roomname
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.
Happy coding!
Discussion
0 commentsJoin the Discussion
Sign in to post comments and join the conversation.
No comments yet. Be the first to share your thoughts!