Skip to content

A simple multi-user chat application built in Go (Golang). Supports multiple clients over TCP with username-based messaging, broadcast system, and real-time communication directly in the terminal.

Notifications You must be signed in to change notification settings

israil-fakir/group_chat_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

group_chat_go

A simple multi-user chat application built with Go (Golang). This project demonstrates Go's concurrency features (goroutines, channels, mutex) by creating a real-time terminal-based chatroom over TCP.


Features

  • Multi-client support (chatroom style)
  • Username registration
  • Real-time messaging
  • Broadcast system to all connected users
  • Join/leave notifications
  • Ignores empty messages for clean output

Project Structure

group_chat_go/
│── server.go   # Chat server
│── client.go   # Chat client

Getting Started

1. Clone the repo


git clone https://github.com/your-username/group_chat_go.git
cd group_chat_go

2. Run the server


go run server.go

3. Run a client


go run client.go

You can start multiple clients in different terminals, all connecting to the same server.


📸 Example (Terminal Screenshot)

# Terminal 1 (server)
Chat server started on :8080
New client joined: Alice
New client joined: Bob

Terminal 2 (Alice)

Enter your username: Alice Bob joined the chat Bob: Hello Alice! Alice: Hi Bob!

Terminal 3 (Bob)

Enter your username: Bob Alice: Hi Bob! Bob: Hello Alice!


Built With

  • Go 1.23+

About

A simple multi-user chat application built in Go (Golang). Supports multiple clients over TCP with username-based messaging, broadcast system, and real-time communication directly in the terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages