https://github.com/litg-zen/chat_app
An Async Bidirectional Chat app using gRPC and Golang
https://github.com/litg-zen/chat_app
cli golang grpc
Last synced: 3 months ago
JSON representation
An Async Bidirectional Chat app using gRPC and Golang
- Host: GitHub
- URL: https://github.com/litg-zen/chat_app
- Owner: litG-zen
- License: mit
- Created: 2025-09-24T17:09:34.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-04T16:08:08.000Z (9 months ago)
- Last Synced: 2025-10-10T09:45:54.799Z (9 months ago)
- Topics: cli, golang, grpc
- Language: Go
- Homepage:
- Size: 229 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 💬 Go gRPC ChatApp
A **real-time chat application** built in **Golang** using **gRPC bidirectional streaming** and **Protocol Buffers**.
Supports **direct messaging** between users and **broadcast messages** to all connected clients.

---
## ✨ Features
- 🚀 **gRPC Bidirectional Streaming** – clients can send and receive messages over a single stream.
- 👤 **Direct Messaging** – chat with a specific user.
- 📢 **Broadcast Mode** – send messages to all connected users with a single `*`.
- 🟢 **Online Status Check** – verify if a user is online via `IsOnline` RPC.
- 🔗 **Concurrent Clients** – multiple clients can connect and chat simultaneously.
- 🛡️ **Extensible Design** – ready for auth, persistence, and scaling with Redis/NATS.
- 📤📥 **Async Communication** - communication that happens with independent timing, allowing flexibility and non-blocking interactions.
- 📡 **Domain Name support** - Chat with a friend far far away, using centralised hosted server and its domain name.
---
## 📦 Tech Stack
- **Language**: Golang 1.22+
- **RPC Framework**: gRPC
- **IDL**: Protocol Buffers (`proto3`)
- **Transport**: TCP
---
## **How to spin up your own server and chat.**
**Step 1**: Run the Server from one terminal. type go run server/main.go from root directory.
**Step 2**: Open two terminals
`Terminal 1` : go run client/main.go USERID1 localhost:50051 USERID2
`Terminal 2` : go run client/main.go USERID2 localhost:50051 USERID1
**To become a broadcaster**
pass the target client userid as *