# HueByte/EchoHub — Documentation

> Continuously generated, source-verified documentation for **HueByte/EchoHub**, built from branch `master` at commit `40aea9a0`. Every page is derived from the code itself and cross-checked against the source before it ships.

This repository implements a chat and file-sharing server with a desktop client: server-side controllers expose an HTTP API (e.g. `AuthController`, `UsersController`, `FilesController`) while a real-time hub (`ChatHub`) handles live messaging and presence. Background workers and maintenance tasks run as hosted services (for example `FileCleanupService` and `DataMigrationService`), and persistent state is stored in the Entity Framework DbContext (`EchoHubDbContext`). The desktop client communicates with the server via an API client (`ApiClient`) and includes local services like audio playback and message encryption.

## Start here

1. **[Architecture](Synthesis/Architecture.md)** — the system overview: what the components are, how they collaborate, and where to find each one.
2. **[Onboarding](Synthesis/Onboarding.md)** — a curated reading path through the codebase. Start here if you're new to the project.
3. **[Code reference](Code/index.md)** — per-file API documentation mirroring the source tree, one page per documented file.

## Deep dives

Cross-file guides on the themes that shape this codebase:

- [API client authentication](Synthesis/api-client-authentication.md) — A short, focused orientation to how the client authenticates to the server and then uses those credentials when making API calls.
- [Attachments transfer](Synthesis/attachments-transfer.md) — This guide describes how the client UI stages user-provided files and how the application constructs the immutable attachment objects that travel with outgoing chat messages.
- [Clipboard utilities](Synthesis/clipboard-tools.md) — This topic covers small, focused helpers that let the UI treat clipboard contents as first-class attachments: one helper extracts file paths from a file-list clipboard, another canonicalizes whatever image bytes are a…
- [Encryption and room keys](Synthesis/encryption-roomkeys.md) — Client-side message confidentiality is implemented in two cooperating pieces: a runtime encryptor that performs AES-256-GCM on outgoing and incoming message payloads, and a storage protector that keeps per-room conten…
- [Real-time connection and messaging](Synthesis/real-time-connection.md) — A compact overview of the client-side real-time layer: how the connection is created, the runtime surface it exposes to higher layers, and the DTOs used to carry chat and channel data.
- [Slash command handling](Synthesis/command-handling.md) — This guide explains how slash-style chat input is parsed and executed across three collaborating components: a parser/dispatcher, an application orchestrator that implements command behavior and UI coordination, and a…
- [UI theming and theme management](Synthesis/ui-theming.md) — This guide explains the client-side theming pieces: the Theme data model, the ThemeManager that provides built-in and user-provided themes and applies them at runtime, and the AppOrchestrator that coordinates UI behav…
- [Update management](Synthesis/update-management.md) — This topic covers the small set of services and the orchestrator that detect available application updates, snapshot state before an update, and hand off the heavy update work so it happens after the Terminal.Gui main…

## Recurring workflows

Step-by-step templates for the patterns this codebase repeats, each grounded in real examples from the source:

- [Adding a new controller](Synthesis/Workflows/controller.md)
- [Adding a new service](Synthesis/Workflows/service.md)

## By the numbers

- **128** documentation pages covering **128** source files
- **617** symbols documented and validated
- **22,133** lines of code analyzed
- Languages: C# (128)

## How these docs are organized

- **`Code/`** mirrors the repository's source tree one-to-one — `src/Foo.cs` is documented at `Code/src/Foo.cs.md`.
- **`Synthesis/`** holds knowledge derived *across* files: the architecture overview, onboarding path, topic deep-dives, and workflow templates.
- The set is regenerated as the code changes; drift between code and docs is detected and repaired automatically.

---

*Generated by [AurionDocs](https://auriondocs.com) from `master` at commit `40aea9a0` on 2026-07-23 09:35 UTC.*
