Airpost
Overview

Repository layout

What lives where in the Airpost monorepo: apps, Rust crates, TypeScript packages and supporting directories.

Airpost is one repository at github.com/airpost-mail/airpost. Deployables are in apps/, Rust libraries in crates/, and TypeScript libraries in packages/. One Cargo workspace at the root covers apps/engine, apps/backend, apps/cli, apps/mcp, apps/gateway, the crates and the sample service.

Apps

PathContents
apps/desktop/Electron client (TypeScript, React 17), forked from Mailspring
apps/engine/Rust sync engine, airpost-engine, and its Python test harness in apps/engine/test/
apps/cli/The airpost command
apps/mcp/The MCP server, airpost-mcp
apps/gateway/airpost-gateway: authenticated remote access to an engine, and the server for the web client
apps/web/Web client (Vite)
apps/backend/airpost-backend, the multi-user server

Rust crates

Most crates are the engine, split up. airpost-ipc, airpost-client, airpost-compose and airpost-activation are also used by the programs that talk to the engine, and airpost-wire is shared by the engine and the backend.

CrateContents
airpost-coreErrors, ids, constants, logging, the clock, account and identity, header and flag types, UID sets
airpost-storeThe engine’s SQLite store: schema, migrations, models, queries, the delta stream
airpost-providersServer and provider quirk profiles, folder roles, OAuth endpoints
airpost-imapThe IMAP session (translated in part from mailcore2 and libetpan)
airpost-smtpSMTP sending
airpost-mimeMIME parsing, body rendering, snippets, the outgoing message builder
airpost-netHTTP helpers, OAuth token refresh, metadata backends, the Google People client
airpost-davCalDAV and CardDAV: XML, vCard, iCalendar fields, discovery
airpost-pimCalendar and contact editing: ICS edits, recurrence, RSVP, vCard mapping, VCF import and export
airpost-syncSync workers: background scans, IDLE, mail processing, metadata and calendar threads
airpost-tasksThe local and remote phases of every task a client queues
airpost-ipcThe socket protocol: JSON-RPC envelope, method types, the query allowlist, the JSON Schema
airpost-clientClient side of the socket: discovery, profile resolution, typed calls, task builders
airpost-composeDrafts: new, reply, forward and mailto, quoting, signatures, send warnings
airpost-activationSocket activation and build info for programs run by launchd or systemd units
airpost-secretsThe engine’s secret store: OS keychain, Secret Service, or an AES-256-GCM file
airpost-aiModel providers (OpenAI-compatible, Anthropic, Ollama) for summaries, replies and triage
airpost-integrationsTranslation, grammar checks and contact enrichment providers
airpost-wireWire types shared by the backend and the engine’s HTTP metadata backend

airpost-core is at the bottom of the dependency graph; airpost-sync depends on the protocol crates, and airpost-tasks on airpost-sync.

TypeScript packages

Each package ships TypeScript source and is linked into an app with a file: dependency.

PackageContents
packages/client (@airpost/client)The shared engine client: protocol types generated from crates/airpost-ipc, the JSON-RPC session, the WebSocket transport, and the Unix socket transport in @airpost/client/node
packages/email-dark (@airpost/email-dark)Renders HTML email in a dark colour scheme

Inside the desktop app

Path in apps/desktop/Contents
src/Core source, one directory per domain (main/, engine/, data/, mail/, components/, packages/, intl/, …)
src/features/Built-in features that always load (composer, thread list, preferences, calendar, …), listed in src/features/index.ts
src/components/kit/The UI kit
src/packages/The plugin system: package manager, registries, extension base classes, the plugin API version
plugins/Bundled optional plugins, such as send-later, translation, thread-snooze
themes/Bundled ui-* themes
static/styles/Core CSS, theme token defaults, kit stylesheets
lang/Translation files
tests/Jasmine specs

Other directories

PathContents
examples/service-plugin/A complete service plugin
deploy/Compose files and units: dev (the local stack), server, backend, systemd
packaging/Homebrew, AUR, Nix, Linux packages, the install script
fuzz/cargo-fuzz targets
skills/airpost/The agent skill (see Agent skill)
assets/brand/Logos and icons, under their own licence (see Licensing)
docs/Design docs