ClusterTalk is a production-grade, distributed real-time messaging platform engineered with a microservices architecture. It demonstrates mastery of distributed systems, cross-platform engineering, and applied AI integration.
Designed for high-throughput and low-latency, it seamlessly orchestrates a Go websocket engine, Python AI moderation service, Rust analytics consumer, and React/Mobile clients.
graph TD
subgraph Clients
Web[React Web Client]
Android[Android App (Kotlin)]
iOS[iOS App (Swift)]
end
subgraph "Core Cluster"
LB[Load Balancer / Gateway]
Hub[Go WebSocket Hub]
end
subgraph "Microservices"
AI[Python AI Service]
Analytics[Rust Analytics Engine]
end
Web <-->|WebSocket| Hub
Android <-->|WebSocket| Hub
iOS <-->|WebSocket| Hub
Hub -->|HTTP Sync| AI
Hub -.->|HTTP Async| Analytics
-
π High-Performance Core: Go-based event loop using lightweight goroutines handling thousands of concurrent connections.
-
π‘οΈ AI-Powered Moderation: Real-time toxicity detection using a Python Microservice. Automatically censors spam and offensive content before broadcast.
-
πΎ SQLite Persistence: ACID-compliant chat history storage using a pure Go driver. Replays recent messages upon joining a room.
-
π Rust Analytics: Zero-overhead event ingestion pipeline implemented in Rust for analyzing chat throughput.
-
π Multi-Room Clustering: logical partitioning of chat streams (
#general,#tech,#random). -
π± Cross-Platform Architecture: Unified protocol supporting Web, Android, and iOS clients.
-
π¨ Cyberpunk UI: Modern, glassmorphism-based interface with responsive design.
| Component | Technology | Role |
|---|---|---|
| Backend | Go (Golang) | WebSocket Hub, Concurrency, Routing |
| Frontend | React + Vite | SPA Client, State Management |
| AI Service | Python (FastAPI) | NLP, Toxicity Detection, Filtering |
| Analytics | Rust (Actix) | High-speed Event Logging |
| Mobile | Kotlin / Swift | Native Client Scaffolding |
| Protocol | JSON/WebSockets | Real-time bidirectional communication |
- Go 1.19+
- Node.js 16+
- Python 3.9+
- Rust (Cargo)
The heart of the system.
cd backend-go
go mod tidy
go run cmd/server/main.go
# π’ Server listening on :8080The brain of the system.
cd ai-python
# Create virtual env
python -m venv venv
./venv/Scripts/activate
pip install -r requirements.txt
# Start Service
uvicorn main:app --reload --port 8000
# π’ AI Service online at :8000The face of the system.
cd client-web
npm install
npm run dev
# π’ Client ready at http://localhost:5173The memory of the system.
cd analytics-rust
cargo run
# π’ Analytics ingestion at :9000- Open Client: Navigate to
http://localhost:5173. - Join Room: You are automatically placed in
#general. - Test Chat: Send a message. It appears instantly.
- Test AI: Send the message
"This is spam". It will be intercepted and replaced with[CENSORED BY AI]. - Multi-Room: Open a second tab, switch to
#tech. Messages are isolated between rooms.
ClusterTalk/
βββ backend-go/ # Go WebSocket Server
βββ ai-python/ # Python AI Microservice
βββ analytics-rust/ # Rust Data Consumer
βββ client-web/ # React Frontend
βββ client-android/ # Native Android Project
βββ client-ios/ # Native iOS Project
βββ infra/ # Docker & Kubernetes Configs
Distributed under the MIT License. See LICENSE for more information.