Welcome to OnlyChat, a robust command-line chat application built with Rust. It offers seamless real-time communication with support for rooms, direct messages (DMs), typing indicators, and optional end-to-end encryption.
- 🔒 End-to-End Encryption: Secure your messages with optional encryption.
- 🟢 Online Presence: Instantly see who’s active in the chat.
- ✍️ Typing Indicators: Real-time feedback when users are typing.
- 🏠 Room-Based Chat: Engage in group conversations within dedicated rooms.
- 📩 Direct Messages: Communicate privately with individual users.
- 📡 Real-Time Broadcasting: Messages are delivered instantly to all relevant users.
OnlyChat is organized as a Rust workspace with multiple crates, each handling specific functionality:
| Crate | Description | Link |
|---|---|---|
cli |
Main binary CLI entrypoint for running the application | cli |
server |
Core server logic for managing connections and rooms | server |
client |
Client-side connection and event handling | client |
dm |
Direct messaging functionality for private communication | dm |
send |
Sending messages to rooms with optional encryption | send |
status |
Displaying connection and session status | status |
users |
Listing online users globally or in a room | users |
whoami |
Displaying the current user’s identity | whoami |
Get up and running with OnlyChat in just a few steps:
-
Clone the Repository:
git clone https://github.com/ibilalkayy/onlychat cd onlychat -
Build the Project:
cargo build
-
Start the Server:
cargo run -p cli -- server --port 3000
-
Connect a Client:
cargo run -p cli -- client --username alice --server 127.0.0.1:3000
We’re excited to welcome contributions to OnlyChat! Here’s how you can get involved:
- Fork the Repository: Create your own copy of the project.
- Create a Feature Branch:
git checkout -b feature/your-feature
- Make Changes: Implement your feature or bug fix.
- Commit Changes:
git commit -m "Add your feature or fix" - Push to Your Fork:
git push origin feature/your-feature
- Open a Pull Request: Submit your changes for review.
Please adhere to Rust’s code style guidelines and include tests where applicable.
This project is licensed under the Apache License, Version 2.0.