Menu

Tree [de11bf] main /
 History

HTTPS access


File Date Author Commit
 .github 2026-02-21 Vincent Yang Vincent Yang [c36c07] fix: Simplify deployment process by replacing S...
 client 2026-03-26 Vincent Yang Vincent Yang [de11bf] feat: Enhance client modes with avatar support ...
 common 2026-03-26 Vincent Yang Vincent Yang [7ce842] feat: Introduce CDIR v1 message protocol with e...
 gradle 2026-02-21 Vincent Yang Vincent Yang [b1bcc4] Update CommuniDirect version to 1.3.0 and optim...
 scripts 2026-03-26 Vincent Yang Vincent Yang [7ce842] feat: Introduce CDIR v1 message protocol with e...
 server 2026-03-26 Vincent Yang Vincent Yang [de11bf] feat: Enhance client modes with avatar support ...
 .gitignore 2026-02-20 Vincent Yang Vincent Yang [0d087d] Updated gitignore
 CONTRIBUTING.md 2026-03-10 Vincent Yang Vincent Yang [091cdb] Updated build to specify update Gradle JVM version
 LICENSE 2025-09-06 VINCENT4486 VINCENT4486 [7af9ee] Create LICENSE
 README.MD 2026-03-10 Vincent Yang Vincent Yang [091cdb] Updated build to specify update Gradle JVM version
 build.gradle 2026-02-21 Vincent Yang Vincent Yang [7eafd1] fix: Update aggregated Javadoc destination dire...
 gradlew 2026-02-09 Vincent Yang Vincent Yang [50e350] Update Gradle configuration to support Java 24 ...
 gradlew.bat 2026-02-09 Vincent Yang Vincent Yang [50e350] Update Gradle configuration to support Java 24 ...
 settings.gradle 2026-03-26 Vincent Yang Vincent Yang [7ce842] feat: Introduce CDIR v1 message protocol with e...

Read Me

# CommuniDirect
**A secure, peer-to-peer, terminal-based messaging system.**

CommuniDirect is a lightweight P2P communication tool designed for users who live in the terminal. It uses modern elliptic-curve cryptography (Ed25519) for identity and a performance-optimized XOR-stream for message encryption.

## Features
* Nano-Style TUI: A familiar keyboard-driven interface built with Lanterna.
* Ed25519 Identities: Cryptographically secure identity verification for every message.
* External Editor Integration: Write your messages using your system's $EDITOR (Vim, Nano, etc.).
* Message Staging: Draft messages locally in ~/.communidirect/staged/ before sending.
* Multi-Platform Daemons: Background server support for macOS (launchd), Linux (systemd), and FreeBSD (rc.d).
* Symmetric Avatars: Visual identity verification using 5x5 ASCII avatars.

## Project Structure
The project is built with Java 24 and organized into a clean multi-module Gradle structure:
* :communidirect-common: Shared logic, configuration management, and the Ed25519 crypto engine.
* :communidirect-server: The background daemon that listens for, verifies, and archives messages.
* :communidirect-client: The interactive TUI for drafting, staging, and sending messages.

## Quick Start

### 1. Build from Source
```bash
./gradlew updateDaemonJvm --jvm-version YOUR_JDK_VERSION
./gradlew clean build aggregatedJavadoc
```

### 2. Install
Run the universal installer to set up directories, binary wrappers, and background services:
```bash
chmod +x install.sh
./scripts/install.sh
```

### 3. Generate Your Identity
On first run, the client will generate your Ed25519 key pair and initialize your keys.toml.
```bash
cd-client
```

## Client Keybindings
| Key | Action                                                     |
|:----|:-----------------------------------------------------------|
| ^N  | New Message: Opens your $EDITOR to draft a new message.    |
| ^T  | Staged Messages: Browse and select drafts to be sent.      |
| ^W  | Send: (In Staged View) Dispatches the selected message.    |
| ^V  | View Received: Browse your archived conversation history.  |
| ^X  | Exit: Gracefully close the Lanterna TUI.                   |
| ^R  | Reload: Forces the message receiver to update the messages |

## Configuration
All configuration and data are stored in ~/.communidirect/:
* identity.key: Your private Ed25519 key (Permissions: 600).
* keys/: Directory for trusted peer public keys (*.pub).
* msg/: Archive of all received and decrypted messages.
* config.toml: Port and network settings.

## Documentation
Project-wide Javadocs are automatically aggregated and available in the root /docs directory or can be generated via:
```bash
./gradlew aggregatedJavadoc
```

## Security Note
CommuniDirect uses Ed25519 for digital signatures to ensure the sender is who they claim to be. Messages are encrypted via an XOR stream with a unique session key sealed using the recipient's public key. Always ensure your identity.key is kept private.

## Contributing
If you are interested in improving the networking layer, adding new TUI windows, or optimizing the crypto engine, please see our [CONTRIBUTING.md](CONTRIBUTING.md) for local development guidelines and pull request standards.
MongoDB Logo MongoDB