About
dotwire is a free, open-source, self-hosted chat layer built for privacy law. It handles realtime delivery, message persistence and ordering. From day one it ships the tooling that GDPR, CCPA and PIPL requests demand: access and export, erasure, legal holds, recipient notification, retention and encryption at rest. All of it sits behind a tamper-evident audit trail.
It is infrastructure a host application plugs in, not a chat product. dotwire ships APIs and SDKs, not a UI, so teams build the interface their product needs.
Early release (v0.6). APIs and deployment guidance may still change, and dotwire is not yet used in production.
Host-owned identity
dotwire keeps no user table. The host application already knows its users, so it signs RS256 JWTs and dotwire verifies them, then cross-checks roles and room membership in the database. Unlike Stream, Sendbird or PubNub, there is no second user system to keep in sync, and no extra copy of personal data held by a third party. Integrating means pointing dotwire at a public key, not migrating user records.
Compliance-ready, not "compliant"
No software is GDPR compliant or SOC 2 certified on its own. Compliance belongs to a deployment and the organization running it. dotwire's job is to ship the technical controls that make privacy requests and audits answerable, and to state plainly what it cannot do.
dotwire's compliance documentation maps every control to GDPR, CCPA, PIPL, SOC 2 and ISO 27001 Annex A. Each mapping says what remains the host's responsibility. It also includes a list of accepted limitations.
Privacy rights, covered
| Right | GDPR | CCPA | PIPL | dotwire mechanism |
|---|---|---|---|---|
| Access and copy | Art. 15 | §1798.100, §1798.110 | Art. 45 | DSAR export: decrypted messages, memberships, roles, audit references and access records |
| Portability | Art. 20 | — | Art. 45 | The same export, as machine-readable JSON |
| Deletion | Art. 17 | §1798.105 | Art. 47 | Account erasure (anonymize or delete), message redaction, JetStream copies removed |
| Exceptions to deletion | Art. 17(3) | §1798.105(d) | Art. 47 | Legal holds and minimum keep periods; a blocked erasure completes automatically when they end |
| Notifying recipients | Art. 17(2), Art. 19 | — | — | Signed, durable erasure-notice webhook listing every affected message |
| Security of processing | Art. 25, Art. 32 | — | — | AES-256-GCM at rest by default, hash-chained audit log |
These mappings are dotwire's reading of each clause, and counsel should confirm them. Request intake, identity verification, deadlines, consent, restriction and objection stay in the host's own process. A privacy-notice template and compliance presets are included as starting points.
The hard cases
A user asks for deletion, and legal asks to keep the data
The host decides which wins. dotwire carries the decision out:
- Account erasure either anonymizes messages, re-attributing them to a reserved pseudonym, or deletes them.
- Legal holds on rooms or users block erasure and pause retention. An erasure blocked by a hold finishes on its own once the hold is released, so no request is forgotten.
- Erasure notices tell downstream systems exactly which messages changed, so copies held elsewhere can be fixed too.
- Emergency deletion with a required reason code covers content that must go immediately.
- A write-once mode keeps redaction and erasure from ever altering a message, for record-keeping regimes that forbid it.
The audit trail survives erasure. Audit events carry ids, never message content, so erasing a person does not break the chain.
How long is chat kept?
Exactly as long as configured. Retention drops whole TimescaleDB chunks, with no vacuum bloat, and JetStream copies expire on their own schedule. A minimum keep period sets a floor that redaction and erasure cannot go under, and legal holds pause retention while they last.
What does a stolen disk or database dump expose?
Ciphertext. Message content is encrypted with AES-256-GCM at the gateway before it is published to NATS JetStream, so neither JetStream's files nor Postgres holds plaintext. Encryption is on by default, and dotwire refuses to start without a key. Key ids travel with each envelope, so keys rotate without downtime. Logs, metrics and traces never carry message content.
Has anyone tampered with the records?
Admin and compliance actions go into an append-only audit log, hash-chained with SHA-256. That covers role and membership changes, redactions, erasures, holds and exports. Daily checkpoints anchor the chain, and GET /audit/verify checks its integrity. The database enforces append-only with revoked grants and guard triggers. The auditor role does not grant room access: auditors can prove what happened without reading conversations.
Who accessed this conversation?
An opt-in, append-only access log records what dotwire serves to each member. That means every realtime subscription and stream from open to close, and every page of history with its exact range. Reads made by the host on a member's behalf are tagged with the service that made them. The log holds ids only, never content. It fails closed: access that cannot be recorded is refused. Querying the log is itself recorded in the audit trail.
The access log supports SOC 2 CC7.2 and ISO 27001 A.8.15. For healthcare hosts, it also covers HIPAA's audit-controls safeguard (§164.312(b)); the full HIPAA mapping is in the compliance documentation.
Fast enough to leave the controls on
Benchmarked on 2× Hetzner CCX33 (v0.4.1, open-loop load, three repetitions):
- About 10× the sustained throughput of Tinode at default durability
- 6 ms p99 at 100 msg/s across 100 rooms of 10 members
- 50,000 concurrent connections with zero failures
- Zero messages lost, even when saturated at about 7,500 msg/s
The methodology and raw data are public and archived under DOI 10.5281/zenodo.24406317.
Architecture
- Single binary, Native AOT. One .NET 10 executable runs the whole system, or splits into gateway and API nodes when one machine is no longer enough.
- Two dependencies. PostgreSQL 17 with TimescaleDB, and NATS JetStream. No Redis, no second database.
- Self-hosted. Personal data stays on infrastructure the host controls, in the region it chooses.
- Decoupled persistence. Sends are acknowledged once JetStream holds the message. A background writer batch-inserts into TimescaleDB.
- Ephemeral stays ephemeral. Presence, typing and read receipts travel over NATS core only and are never stored.
- Realtime and resumable. SignalR/WebSockets for clients, plus a resumable Server-Sent Events stream for agents and backends.
- Moderation hooks. Presend and postsend webhooks let the host moderate content with its own policy.
- Observability. OpenTelemetry metrics and opt-in traces, scrubbed of ids and content, plus an optional Grafana dashboard.
SDKs
| Package | For |
|---|---|
@dotwire/client |
Browser and Node.js: realtime rooms, history, typing, presence |
@dotwire/react |
React hooks: DotwireProvider, useRoom, useTyping, usePresence |
@dotwire/host |
Node.js backends: token minting, rooms, roles, moderation, audit, compliance |
Dotwire.Host |
.NET backends: the same host surface in C# |
Every compliance operation is available in both host SDKs under matching names. Clients receive erasures as they happen, and the React hooks apply them automatically.
Try it
- Live demo: demo.dotwire.pasztormark.dev
- Source: github.com/pasztor-mark/dotwire
- Documentation: dotwire.pasztormark.dev/docs
dotwire is licensed under Apache 2.0. Issues, feedback from real integrations, and pull requests are welcome.
dotwire provides technical controls, not legal advice. Whether a deployment meets GDPR, CCPA, PIPL or any other regime is for its operator and their counsel to decide.

