Skip to content
Work

Project · 05 / 05

Tern

Mail that never waits on the network

AlphaLinux first, then Windows

Why Tern

local first

Everything on screen comes from a SQLite database on the device, so lists, threads and search never wait on the network. Searching a common word across 50,000 messages takes 2.5 ms. Changes are made locally first: archive, move, star and send wait five seconds before reaching the server, z takes them back, and a send that may already have gone out is never retried on its own.

System Architecture

rust engine & tauri shell

A Rust engine, tern-core, keeps the mailbox in SQLite: the schema, the list, thread and search queries, and an outbox that holds each change through its undo window. One sync worker per account speaks IMAP through io-imap, with IDLE for new mail, QRESYNC so an unchanged folder costs one round trip, and headers before bodies, and sends over SMTP. Both run on rustls; nothing links OpenSSL. A Tauri 2 shell hands the engine to a SolidJS interface: a virtualized list, the conversation view, compose and the command bar. Passwords live only in the OS keyring, and mail HTML renders in a sandboxed frame with no scripts and remote content blocked until you load it.

Interface

9 screens · drag or scroll to preview
PlatesDesktop only
01 · StationThe newest message on stageThe newest message takes the stage with a large subject and its byline. Every earlier one is a single line on a soft panel above it, nothing folded, one click or o away. Reply, Reply all and Forward sit in one row after it.
02 · StationImportant and OtherThe inbox splits in two. Other holds mailing lists, bulk mail and no-reply senders, and Tab moves between the splits. Unread conversations are bold, and threads show how many messages they hold.
03 · StationDesigned mail, in the darkNewsletters and receipts sit in a frame and are darkened in dark mode. Header icons show only when they apply: the book strips the mail to text for Reading view, the envelope unsubscribes. Tracking pixels are removed.
04 · StationEvery action from Ctrl KThe command bar holds every action with its key. Move sender to Other or Important moves a sender's mail, now and later.
05 · StationSearch that doesn't waitFull-text search runs on the local database: a common word across 50,000 messages in 2.5 ms, a rare one in 0.07 ms.
06 · StationSnippets while you writeTyping ; while writing opens your snippets, and ;shortcut then Space puts one in, with the recipient's first name filled in.
07 · StationFiles on the messageAttachments show as cards with a picture preview or a type badge. V opens them inside Tern, from pictures and PDFs to CSV tables, sound and video, with ← and → between files.
08 · StationGmail's keysShortcuts follow Gmail's: j and k to move, e to archive, z to undo, h to snooze. ? lists every one, anywhere, in the list or in a conversation.
09 · StationIt keeps running in the trayClosing the window leaves Tern syncing in the tray, with a notification for new inbox mail. It can start at login and open email links from other apps.
01 / 09

Specifications

stack & status
Source
Public — nedimperva/tern
Built with
Rust, Tauri 2, SolidJS, SQLite, IMAP
Active maintenance