Terminal Chat is a minimal command-line chat application written in Go, built to explore core Go concepts like goroutines, channels, and WebSockets.
It’s a lightweight project for learning how concurrent communication and real-time networking work in Go.
- ✅ Set a custom username
- 💬 Create or join multiple chat rooms
- 📁 Send files directly to another user
- 🧠 Learn by exploring Go concurrency (goroutines & channels)
| Command | Description |
|---|---|
/list |
List all available chat rooms |
/join <ROOM> |
Join a chat room (creates it if it doesn’t exist) |
/file:<filename>:<receiver> |
Send a file to a specific user |
-
Clone the repository
git clone https://github.com/humankernel/chat cd chat -
Install dependencies
go mod tidy
-
Run the server and client
go run server.go go run client.go
-
Start chatting! You can open multiple terminal windows and connect different clients to simulate a real chat environment.
This project is intended for Go learners who want to understand:
- How goroutines handle concurrency
- How channels synchronize communication
- How to use WebSockets for real-time data exchange
- How to build a simple client–server architecture in Go
