Experimental AT protocol email hosting
sovrn PRODUCT.md
4.4 kB 49 lines
Markdown
at main

Product #

Platform #

web

Users #

Primary: domain admins (small-business / self-sovereign operators) configuring domains, provisioning mailboxes, and managing users via the admin appview. Admins arrive with an ATProto identity (any DID/PDS or hosted-PDS account) and complete DNS ownership tasks before addresses go live.

Secondary (confirmed, not primary focus): end users who send/receive mail via webmail or native JMAP/IMAP/SMTP clients with translated credentials; cell operators who run their own sovrn cell (PDS + Stalwart + DNS + tenants).

Product Purpose #

Sovrn is hosted email whose identity layer is the AT Protocol. The Go control plane brokers authentication against any ATProto identity provider, gates address claims on DNS verification, provisions mailboxes via Stalwart's Registry API, and projects state into permissioned ATProto spaces. Mail traffic terminates directly on Stalwart, never proxied through the control plane. Success means a small business gets sovereign, portable mail on infrastructure it (or its chosen operator) controls — no big-tech dependency, no lock-in.

Positioning #

ATProto-native mail identity: DID is canonical, handle-as-address derived and DNS-verified. Users bring any DID/PDS; the hosted spaces-capable PDS is convenience only. Postmaster-authored records in tenant+domain spaces drive Stalwart into compliance; the app DB remains operational truth and Stalwart remains mail-data truth. Direct-to-Stalwart data plane keeps native client performance with no proxy in the mail path.

Operating Context #

Workflows: OAuth login (PAR/PKCE/DPoP via indigo) → XRPC intent in app DB (claimed) → DNS ownership probe (verifying → verified) → Registry/set Domain + Account + DKIM task + postmaster-authored space records → active after MX/SPF/DKIM ready. Login mints short-TTL sovrn OIDC tokens Stalwart validates via OpenId directory mode; legacy clients use per-device app passwords. Environments: single-node v1 (sovrnd + SQLite app DB + Stalwart OSS SQLite + spaces-capable PDS); daily/hourly reconciliation sweeps (identity, DNS, Stalwart, space, backfill). Tools/materials: DNS TXT/MX/SPF/DKIM, client-metadata + attestation keys, KMS/vaulted secrets, audit log.

Capabilities and Constraints #

Confirmed functionality: brokered login for any-PDS + hosted-PDS identities; handle-as-address with DNS gate plus hosted-PDS wildcard and service-domain fallbacks; OIDC issuer (ES256, ≤15min TTL) + app-password lifecycle; getServiceAuth verification for third-party clients; member-list space access v1; admin appview (Go SSR templ + HTMX) separate from independently-deployed webmail; invite-code / allowlist / quota abuse gates required before public launch.

Constraints: no secrets ever in ATProto records; least privilege (scoped Stalwart role, never root); DID-keyed mailboxes/aliases/grants; reconciler acts only on postmaster-DID-authored records; control plane never in mail path; revocation must fan out to Stalwart; mail keeps flowing if app DB is down.

Explicitly undecided: paid tiers / subscription enforcement; hosted-PDS handle domain; multi-node Stalwart clustering; Postgres HA migration timing; calendar/mail publication lexicons.

Brand Commitments #

Name: sovrn. Palette pinned in colors.txt (smart-blue / french-blue / light-gold / tangerine-dream / vibrant-coral hex ramps) and documented in DESIGN.md; no binding voice, typography, or assets confirmed; future visual work must not invent brand claims.

Evidence on Hand #

Real sources in repo: docs/00-overview.md through docs/08-security-compliance.md (decisions D1–D13 locked 2026-08-24), docs/adr/0006-data-placement-and-space-topology.md, lexicons/, internal/appview/ui/*.templ (admin UI scaffold). No testimonials, customers, benchmarks, pricing, or production assets on hand — future work must not fabricate them.

Product Principles #

  1. DID is canonical; addresses are verified projections, not identity.
  2. DNS control is the security boundary for address claims.
  3. Sovereignty over convenience: BYO identity first, hosted fallback second, no lock-in.
  4. Keep the mail path direct; the control plane brokers and reconciles, never proxies.
  5. Reputation is a product asset: gate signup, enforce SPF/DKIM/DMARC strict, treat regressions as incidents.