A real-time chat application with direct messaging support, built with Go and WebSocket.
You can see a live demo at https://deiu-chat.onrender.com but you may have to wait up to a minutefor the server to restart after a long period of inactivity.
- Real-time messaging using WebSocket
- Direct user-to-user messaging
- Case-insensitive unique usernames
- Unread message notifications
- Online users list
- Docker support
- Clean disconnection handling
- Message history per conversation
- Open the application in your browser (default: http://localhost:8080)
- Enter a username to login
- Select a user from the online users list to start chatting
- Messages are delivered in real-time
- Unread messages are indicated with (*)
- Use the logout button to disconnect
- Go 1.21 or later
- Docker (optional)
go build -o chat main.go./chat- Clone the repository:
git clone https://github.com/deiu/chat.git
cd chat- Build and run the application:
docker build -t chat .
docker run -p 8080:8080 chat- Access the application in your browser at
http://localhost:8080.
- Clone the repository:
git clone https://github.com/deiu/chat.git
cd chat- Build and run the application:
docker-compose up --build- Access the application in your browser at
http://localhost:8080.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Apache License 2.0 - see LICENSE for details