Skip to content

feat: Implement async chat server and CLI client#33

Open
ivikasavnish wants to merge 5 commits intowhamcloud:mainfrom
dev-ops-avnish:feature/stub-websocket-2026-02-17
Open

feat: Implement async chat server and CLI client#33
ivikasavnish wants to merge 5 commits intowhamcloud:mainfrom
dev-ops-avnish:feature/stub-websocket-2026-02-17

Conversation

@ivikasavnish
Copy link

Demo Video

[TODO: Add video demo link here]

Summary

This PR implements a complete asynchronous chat server and CLI client in Rust, meeting all requirements from the README.

  • Async WebSocket server with Tokio for non-blocking I/O
  • CLI client with interactive prompt (send <message>, leave)
  • Single chat room with message broadcasting to all users except sender
  • Unique username enforcement at the repository layer
  • Memory efficient design using channels and shared state

Author

Vikas Avnish (@ivikasavnish)
📧 devops.avnish@gmail.com

Development Approach

This implementation was completed using Agenticide, my own agentic IDE implementation (similar to Cursor). I took this opportunity to demonstrate how modern AI-assisted development tools can be leveraged to efficiently complete complex software engineering tasks.

Features Implemented

Core Requirements ✅

  • Asynchronous server with Tokio
  • Single chat room
  • User join/leave handling
  • Message broadcasting (excludes sender)
  • Unique usernames
  • High concurrency support
  • Memory efficiency

Client Requirements ✅

  • Async CLI program
  • Environment/CLI arguments (host, port, username)
  • Auto-connect on startup
  • Interactive prompt with send and leave commands

Code Quality ✅

  • Unit tests (5 passing)
  • Integration tests
  • Code formatted with cargo fmt
  • Clippy clean (-D warnings)

Bonus Features ✅

  • Pre-commit hook (fmt, clippy, tests)
  • GitHub Actions CI/CD pipeline

Test Results

Check Status
cargo fmt --check ✅ Pass
cargo clippy -- -D warnings ✅ Pass
cargo test ✅ 5/5 passed
Integration test ✅ Pass

Test Plan

  • Run cargo fmt --check - formatting verified
  • Run cargo clippy -- -D warnings - no warnings
  • Run cargo test - all 5 unit tests pass
  • Run ./test_chat.sh - integration test passes
  • Manual testing with multiple terminals

🤖 Generated with Claude Code

vikasavnish and others added 5 commits February 17, 2026 16:49
Generated stub structure for websocket module:
- 15 files created
- Language: rust
- Type: service

[agenticide stub-first workflow]
- Add server binary with WebSocket support
- Add CLI client with interactive commands
- Implement message protocol (Join, Leave, Send, Broadcast)
- Add repository layer for state management
- Add service layer for business logic
- Implement WebSocket connection handler
- Add unit tests for repository and service
- Pass all tests, formatting, and clippy checks
- Add comprehensive usage documentation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add pre-commit hook for formatting, linting, and tests
- Add GitHub Actions workflow for CI/CD
- Include integration tests in CI pipeline
- Update USAGE.md with installation instructions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mentioned that the project was completed using Agenticide, a custom
agentic IDE implementation, to demonstrate AI-assisted development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants