.agents
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
.railway
Automate Railway deployments
.trylle
Probe Stalwart ports over pinned IPv4
app
Keep demo credentials out of production login
components
Load email images automatically
deploy
Automate safe Stalwart production updates
docs
Automate Railway deployments
fixtures
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
lib
Load email images automatically
public
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
scripts
Validate Railway deployment tokens
theme
Add glass treatment to pending send banner
.dockerignore
Raise the shell, delay send, and make the inbox searchable.
.env.example
Merge remote-tracking branch 'origin/main' into stylessh/cloud-agent-1788236378832-mchqw
.gitignore
Raise the shell, delay send, and make the inbox searchable.
AGENTS.md
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
babel.config.js
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
CLAUDE.md
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
CODE_OF_CONDUCT.md
Merge remote-tracking branch 'origin/main' into stylessh/cloud-agent-1788236378832-mchqw
CONTRIBUTING.md
Merge remote-tracking branch 'origin/main' into stylessh/cloud-agent-1788236378832-mchqw
docker-compose.yml
Wire sessions, Stalwart, and live mode so onboarding and mail actually work.
Dockerfile
Automate Railway deployments
drizzle.config.ts
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
eslint.config.mjs
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
LICENSE
Merge remote-tracking branch 'origin/main' into stylessh/cloud-agent-1788236378832-mchqw
next.config.ts
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
package.json
Add glass treatment to pending send banner
pnpm-lock.yaml
Add glass treatment to pending send banner
pnpm-workspace.yaml
Install Railway CLI for deployment jobs
postcss.config.js
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
README.md
Limit tab fades to the tab band
skills-lock.json
Add the Redakt mail POC: inbox shell, demo fixtures, and Stalwart-backed stack.
tsconfig.json
Limit tab fades to the tab band

Redakt

A design-first, open-source mail provider. Add a domain you own, publish DNS, and read mail in a quiet desktop shell.

Redakt is the product layer: onboarding, DNS, accounts, and the inbox. Stalwart is the mail engine (SMTP, JMAP, IMAP, DKIM). This repository is MIT and does not fork Stalwart. Stalwart stays AGPL when you run it.

The project is early (0.1.0). Demo mode is the fastest way to look at the product. Live mode talks to a real mail engine on your machine.

Interface inspiration: Define and Tatem.

Run it

You need pnpm 11 and Node 20+. Live mode also needs Docker.

Demo

No Postgres, no Stalwart, no port 25.

cp .env.example .env
pnpm install
pnpm dev

Open http://localhost:3000. Demo mode keeps a local session and loads fixture .eml files from fixtures/. Seed login is ada@redakt.local / demo.

Live (Postgres + Stalwart)

cp .env.example .env
pnpm install
pnpm dev:live

That starts Postgres and Stalwart, pushes the schema, and runs the app with DEMO_MODE=false.

ServicePort
Redakt3000
Postgres5432
Stalwart HTTP / JMAP8080
SMTP / SMTPS / IMAPS25 / 465 / 993

On first Stalwart boot, finish the wizard at http://localhost:8080/admin (admin / changeme unless you changed .env). Copy the generated admin into .env, close that tab, and use Redakt at http://localhost:3000.

The Stalwart Dashboard on HTTP will loop on a browser sign-in prompt. Cancel it. Redakt talks to Stalwart over JMAP, not that screen.

Step-by-step wizard values: deploy/stalwart/README.md.

docker compose up --build also runs the app in a container. Prefer pnpm dev:live while developing.

Internet mail

Local live mode creates real mailboxes in Stalwart. It does not receive mail from Gmail or other public servers.

Inbound and outbound on the public internet need Stalwart on a host with usable port 25, a matching PTR record, and a warm IP — or an outbound relay. Set MAIL_HOSTNAME to that public MX host (not mail.example.com). The DNS wizard still checks live DNS over Cloudflare DoH.

An HTTP tunnel does not replace SMTP on port 25.

To put this on Vercel, Railway, Coolify, Openship, or a VPS, see docs/self-hosting.md.

How it fits together

  browser  →  Redakt (Next.js)
                 │
                 ├── demo:  fixtures + .data/demo.json
                 └── live:  Postgres (Better Auth, domains)
                            Stalwart over JMAP (mail + DNS zone)

getMailProvider(user) in lib/mail/get-provider.ts is the switch. Both backends implement MailProvider in lib/mail/provider.ts.

Mail views have canonical, refresh-safe URLs. Authenticated route data is loaded on the server; navigation, search controls, pagination, compose, and the persistent tab rail enhance those pages on the client.

RouteView
/mail/:folderInbox, unread, sent, drafts, spam, or archived list
/mail/:folder/thread/:threadIdConversation in its originating folder context
/mail/settings/domainDomain and DNS setup

Folder query state such as search, filters, and sort order is encoded in the URL, so a copied link and a full reload render the same result.

PathRole
app/App Router pages and API routes
components/shell/Login, onboarding, inbox chrome
components/mail/Thread list and reader
components/ui/Shared controls (StyleX + Base UI)
lib/mail/Provider types and routing
lib/demo/Demo store and fixture provider
lib/stalwart/JMAP client and live provider
theme/StyleX tokens
fixtures/Sample .eml files for demo
deploy/stalwart/Stalwart notes and future production config
docs/self-hosting.mdVercel, Railway, Coolify, Openship, VPS

Environment

Copy .env.example to .env. Do not commit .env.

VariableDemoLive
DEMO_MODEtrue (default)false (pnpm dev:live sets this)
BETTER_AUTH_SECRETunusedrequired
BETTER_AUTH_URLunusedhttp://localhost:3000
DATABASE_URLunusedPostgres URL
STALWART_URLunusedhttp://localhost:8080
STALWART_ADMIN_USERunusedwizard admin email after first boot
STALWART_ADMIN_SECRETunusedwizard admin password
MAIL_HOSTNAMEMX host shown in the DNS wizardsame; use your public mail host in production

Mailbox passwords are at least 8 characters (Better Auth).

Keyboard

⌥N compose, j / k move, ⌘W close tab, r reply, c compose.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

MIT. Stalwart remains AGPL when you run it.