Cod-e-Codes / marchat
Lightweight terminal chat with server/client binaries, real-time WebSocket messaging, optional end-to-end encryption, plugins, file sharing, admin panel, and code snippets. Built in Go with Bubble Tea and SQLite; ideal for developers and small teams.
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing Cod-e-Codes/marchat in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewmarchat A lightweight terminal chat with real-time messaging over WebSockets, optional E2E encryption, and a flexible plugin ecosystem. Built for developers who prefer the command line. Latest Updates v0.9.0-beta.6 (Current) • **Security**: Rebuilt with Go 1.25.8 to address CVE-2026-25679, CVE-2026-27142, CVE-2026-27139 • **Dependencies**: Bumped from 0.48.0 to 0.49.0, to 1.46.1 Recent Releases • **v0.9.0-beta.5**: Automated release workflow, PBKDF2 keystore key derivation, JWT secret auto-generation, race condition fixes, Docker optimizations • **v0.9.0-beta.4**: Fixed admin metrics, restored plugin commands in encrypted sessions, dependency updates • **v0.9.0-beta.3**: Added :q quit command, improved theme handling, ESC behavior tweaks, and better database backups • **v0.9.0-beta.2**: Database performance improvements, documentation enhancements, dependency updates • **v0.9.0-beta.1**: Enhanced notifications, custom themes, plugin ecosystem, test coverage improvements • **v0.8.0-beta.11**: Encryption UI, hotkey alternatives, command encryption fix, username validation • **v0.8.0-beta.10**: Plugin persistence, state management, auto-discovery, deadlock fixes Full changelog on GitHub releases. Features • **Terminal UI** - Beautiful TUI built with Bubble Tea • **Real-time Chat** - Fast WebSocket messaging with SQLite backend (PostgreSQL/MySQL planned) • **Plugin System** - Remote registry with text commands and Alt+key hotkeys • **E2E Encryption** - X25519/ChaCha20-Poly1305 with global encryption • **File Sharing** - Send files up to 1MB (configurable) with interactive picker • **Admin Controls** - User management, bans, kick system with ban history gaps • **Smart Notifications** - Bell + desktop notifications with quiet hours and focus mode (guide) • **Themes** - Built-in themes + custom themes via JSON (guide) • **Docker Support** - Containerized deployment with security features • **Health Monitoring** - and endpoints with system metrics • **Structured Logging** - JSON logs with component separation and user tracking • **Cross-Platform** - Runs on Linux, macOS, Windows, and Android/Termux Overview marchat started as a fun weekend project for father-son coding sessions and has evolved into a lightweight, self-hosted terminal chat application designed specifically for developers who love the command line. Currently runs with SQLite, with PostgreSQL and MySQL support planned for greater scalability. **Key Benefits:** • **Self-hosted**: No external services required • **Cross-platform**: Linux, macOS, Windows, and Android/Termux • **Secure**: Optional E2E encryption with X25519/ChaCha20-Poly1305 • **Extensible**: Plugin ecosystem for custom functionality • **Lightweight**: Minimal resource usage, perfect for servers | Cross-Platform | Theme Switching | |---------------|----------------| | | | Quick Start • Generate Admin Key • Start Server **Option A: Environment Variables (Recommended)** **Option B: Interactive Setup** • Connect Client Database Schema Key tables for message tracking and moderation: • **messages**: Core message storage with • **user_message_state**: Per-user message history state • **ban_history**: Ban/unban event tracking for history gaps Installation **Binary Installation:** **Docker:** **From Source:** **Prerequisites for source build:** • Go 1.25+ (download) • Linux clipboard support: (Ubuntu/Debian) or (RHEL/CentOS) Configuration Essential Environment Variables | Variable | Required | Default | Description | |----------|----------|---------|-------------| | | Yes | - | Admin authentication key | | | Yes | - | Comma-separated admin usernames | | | No | | Server port | | | No | | Database file path | | | No | - | TLS certificate (enables wss://) | | | No | - | TLS private key | | | No | - | Base64 32-byte global encryption key | | | No | | Max file size in bytes (1MB default) | | | No | | Max file size in MB (alternative to bytes) | | | No | - | Username allowlist (comma-separated) | **Additional variables:** , , , **File Size Configuration:** Use either (exact bytes) or (megabytes). If both are set, takes priority. **Interactive Setup:** Use flag for guided server configuration when environment variables are missing. Admin Commands User Management | Command | Description | Hotkey | |---------|-------------|--------| | | Permanent ban | (with user selected) | | | 24h temporary ban | (with user selected) | | | Remove permanent ban | | | | Override kick early | | | | Force disconnect user | (with user selected) | | | Clean stale connections | - | Database Operations ( or menu) • **Clear DB** - Wipe all messages • **Backup DB** - Create database backup • **Show Stats** - Display database statistics User Commands | Command | Description | Hotkey | |---------|-------------|--------| | | Switch theme (built-in or custom) | (cycles) | | | List all available themes | - | | | Toggle 12/24-hour format | | | | Clear chat buffer | | | | Quit application (vim-style) | - | | | Send file (or open picker without path) | | | | Save received file | - | | | Open code composer with syntax highlighting | | | | Set notification mode (none/bell/desktop/both) | (toggle desktop) | | | Toggle bell notifications | - | | | Toggle mention-only notifications | - | | | Enable focus mode (mute notifications) | - | | | Set quiet hours (e.g., ) | - | > **Note**: Hotkeys work in both encrypted and unencrypted sessions since they're handled client-side. > > **Notifications**: See NOTIFICATIONS.md for full notification system documentation including desktop notifications, quiet hours, and focus mode. Plugin Commands (Admin Only) Text commands and hotkeys for plugin management. See Plugin Management hotkeys for keyboard shortcuts. | Command | Description | Hotkey | |---------|-------------|--------| | | Browse plugin store | | | or | List installed plugins | | | or | Install plugin | | | or | Uninstall plugin | | | or | Enable plugin | | | or | Disable plugin | | | | Refre…