Build a real-time terminal chat system with:
- Java backend (TCP server)
- Go client using Bubble Tea TUI
- Multi-user messaging
- Room support (later phase)
- TCP sockets (ServerSocket, Socket)
- Blocking I/O behavior
- Thread-per-client model
- Basic message formats (plain text → JSON later)
- Create ServerSocket on port
- Accept client connections
- Read incoming messages
- Print messages to console (debug)
- Create ClientHandler class
- Run each client in a separate thread
- Maintain list of active clients
- Implement message broadcast to all connected clients
- Exclude sender from echo (optional)
- Detect client disconnects
- Remove dead clients from list
- Prevent server crashes on I/O errors
- Raw text messages
Format: TYPE|USER|ROOM|CONTENT
or JSON: { "type": "message", "user": "", "room": "", "content": "" }
- Map rooms → list of clients
- Route messages only inside room
- Add join/leave room actions
- Bubble Tea architecture (Model / Update / View)
- Goroutines for network listening
- TCP client (net.Dial)
- Connect to Java server via TCP
- Send messages from input
- Receive messages asynchronously
- Message view (scrollable)
- Input field
- Basic layout (chat window style)
- Separate goroutine for receiving messages
- Send updates to Bubble Tea via messages/channels
- Thread pool instead of raw threads (Java)
- Logging system
- Better error handling
- Heartbeat/ping system (optional)
- Authentication (username system)
- Message history
- Encryption layer (AES optional)
- Private messages (DMs)
- Persistence (database)
- Java TCP server (single client)
- Multiple clients
- Broadcast system
- Basic Go TCP client
- Bubble Tea UI
- Rooms
- Protocol upgrade (JSON)
- Stability improvements