docs(chat): adopt existing SilverVPN.Client.Chat as SilverChat — promote to v1

Inspection of ../SilverVPN/clients/SilverVPN.Client.Chat reveals a mature,
production-grade SilverChat implementation:

- Cross-platform MAUI client (Windows / macOS / Android / iOS)
- 13 ViewModels + 13 Views — feature-complete UX (contacts, conversations,
  group chat, invites, safety numbers, settings, login)
- Signal Protocol crypto: Double Ratchet, X3DH (PreKey + Identity stores),
  Safety Numbers, encrypted attachments
- VpnChatTransport — chat carried over the SilverVPN tunnel itself,
  eliminating third-party metadata exposure
- Server-side already in SilverVPN.Api: ChatHub (SignalR), ChatController,
  ChatAttachmentController, ContactsController
- Windows MSI installer wired (installer/silverchat/SilverChat.wxs)

Decision: adopt-as-is, do not duplicate. SilverChat is more advanced than
the v1.1 plan (which considered Matrix / Signal-fork) — three wins:
1. Signal Protocol natively, not a tentative fork
2. Chat over the VPN tunnel — better metadata hygiene
3. Cross-platform on day one

Changes:
- stack/chat/README.md rewritten as integration pointer (mirror of stack/vpn/)
- stack/README.md status table updated; SilverChat promoted v1.1 → v1
- docs/roadmap.md: new milestone 1.9 (Chat integration into Linux v1);
  Phase 1.1 alignment-review milestone removed (resolved by this finding);
  remaining 1.1 milestones renumbered
- root README.md: Stack table + Status table updated

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 03:38:45 +01:00
parent 0a0075ce66
commit acd3ebe7f2
4 changed files with 90 additions and 36 deletions

View File

@@ -1,32 +1,82 @@
# SilverChat
# SilverChat — Integration Pointer
**Status**: v1.1 (planning)
> **The SilverChat component already exists as a mature implementation inside the SilverVPN repo.**
> This directory does not re-implement it; it tracks the integration of the existing SilverChat into SilverMetal OS images and Enhanced packages.
End-to-end encrypted messenger. Ships post-MVP.
## Where SilverChat lives
## Approach (tentative — to be finalised before v1.1)
- **Client**: [`SilverLABS/SilverVPN/clients/SilverVPN.Client.Chat`](https://git.silverlabs.uk/SilverLABS/SilverVPN) — local checkout typically at `../SilverVPN/clients/SilverVPN.Client.Chat/`
- **Server**: part of `SilverVPN.Api``Hubs/ChatHub.cs`, `Controllers/ChatController.cs`, `Controllers/ChatAttachmentController.cs`, `Controllers/ContactsController.cs`
- **Windows installer**: `../SilverVPN/installer/silverchat/` (WiX-based MSI)
- The brand "SilverChat" is already in use in shipped artefacts
Two candidate paths:
## What's already built
1. **Matrix-based** — Synapse or Dendrite homeserver, custom client per platform. Pros: federated, mature, large existing ecosystem. Cons: metadata leakage in federation, complex protocol.
2. **Signal-protocol-based** — fork the Signal codebase, run own server. Pros: gold-standard cryptography, simpler client. Cons: forking the Signal protocol is socially fraught; less feature-rich than Matrix.
**Client (MAUI cross-platform — Windows / macOS / Android / iOS / Linux)**:
- 13 ViewModels covering: contacts, conversations, group chat, invites, safety numbers, settings, login, contact details
- 13 XAML Views — feature-complete UX
- **Signal Protocol** crypto layer (the gold standard for E2EE):
- `DoubleRatchet.cs` — Signal's Double Ratchet algorithm
- `SignalSessionManager.cs`, `IdentityKeyStore.cs`, `PreKeyStore.cs`, `SessionStore.cs` — full identity / prekey / session machinery
- `SafetyNumber.cs` — Signal-style verification
- `ChatAttachmentCrypto.cs` — encrypted attachments
- `GroupChatEventService.cs` — group chat
- **`VpnChatTransport.cs`** — chat is carried over the SilverVPN tunnel itself, eliminating third-party metadata exposure
- `MauiSecretKeyProvider.cs` — platform key storage abstraction
- Token refresh, routing prefs, inbound policy enforcement
Decision documented in `docs/decisions/` once made.
**Server (in `SilverVPN.Api`)**:
- `Hubs/ChatHub.cs` — SignalR realtime hub
- `Controllers/ChatController.cs` — REST API
- `Controllers/ChatAttachmentController.cs` — attachment handling
- `Controllers/ContactsController.cs` — contacts API
## Non-negotiables
This is **more mature than SilverMetal's original v1.1 plan** in three ways:
1. Signal Protocol natively, not a Matrix/Signal-fork tentative
2. Chat transported over the SilverVPN tunnel — better metadata hygiene than otherwise possible
3. Cross-platform via MAUI on day one — covers all SilverMetal flavours
- Account-number-based identity (not phone, not email)
- E2EE by default, no opt-out
- Self-hostable server
- No telemetry from client
- Forward secrecy
- Backup keys remain on user devices
## Decision
## Per-platform clients
**Adopt-as-is, do not duplicate.** SilverChat is no longer a v1.1 effort; it is alpha-ready today and ships in **SilverMetal OS — Linux v1**.
To be defined post-decision. Likely Tauri-based or per-platform-native depending on protocol choice.
This supersedes the earlier (deferred) plan to evaluate Matrix vs. Signal Protocol forks.
## Out of scope (for now)
## SilverMetal's responsibility
- Voice/video calling — v1.2+
- Group sizes >100 — Matrix supports, but we may cap at 100 for v1.1 simplicity
Like `stack/vpn/`, this directory tracks **integration**, not development.
### SilverMetal OS — Linux v1
- [ ] Build `SilverVPN.Client.Chat` for Linux (MAUI on Linux is constrained — likely a Linux-native Avalonia/WPF-port branch may be needed; or fall back to web client until MAUI Linux support firms up)
- [ ] Package as `silverchat` `.deb` from a `build-deb-chat.sh` (mirror of `build-deb.sh`)
- [ ] Include in `linux/packages/include.list`
- [ ] Configure to pair via SilverVPN account number — single-sign-on across VPN + Chat
### SilverMetal OS — Pixel / Samsung / Motorola
- [ ] Bundle SilverChat MAUI Android client as system app in ROM
- [ ] First-run wires SilverChat to the user's account-number-derived identity
### SilverMetal Enhanced — Windows
- [ ] Use existing `installer/silverchat/SilverChat.wxs` MSI as-is or roll into the Enhanced installer
- [ ] Auto-launch on first login
### SilverMetal Enhanced — macOS
- [ ] Bundle MAUI macOS build into setup `.pkg`
### SilverMetal Enhanced — iOS
- [ ] App Store listing referenced in iOS setup guide
- [ ] MDM profile pre-configures SilverChat
### SilverMetal Enhanced — Android (generic)
- [ ] APK referenced as required install in profile
## Coordination
Changes to chat protocol, server APIs, or transport that affect SilverMetal integration should be flagged in this directory's CHANGELOG (to be created when first integration milestone starts).
Cross-repo issues that touch both projects should be opened in whichever repo owns the change, with a back-reference in the other.
## Not in scope here
- Voice / video calling — out of scope for v1; revisit post-Linux-v1
- Federation with Matrix / XMPP / etc. — not planned; SilverChat is a closed-network E2EE messenger by design (account-number-based, no public federation)