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
| Path | Contents |
|---|---|
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.
| Crate | Contents |
|---|---|
airpost-core | Errors, ids, constants, logging, the clock, account and identity, header and flag types, UID sets |
airpost-store | The engine’s SQLite store: schema, migrations, models, queries, the delta stream |
airpost-providers | Server and provider quirk profiles, folder roles, OAuth endpoints |
airpost-imap | The IMAP session (translated in part from mailcore2 and libetpan) |
airpost-smtp | SMTP sending |
airpost-mime | MIME parsing, body rendering, snippets, the outgoing message builder |
airpost-net | HTTP helpers, OAuth token refresh, metadata backends, the Google People client |
airpost-dav | CalDAV and CardDAV: XML, vCard, iCalendar fields, discovery |
airpost-pim | Calendar and contact editing: ICS edits, recurrence, RSVP, vCard mapping, VCF import and export |
airpost-sync | Sync workers: background scans, IDLE, mail processing, metadata and calendar threads |
airpost-tasks | The local and remote phases of every task a client queues |
airpost-ipc | The socket protocol: JSON-RPC envelope, method types, the query allowlist, the JSON Schema |
airpost-client | Client side of the socket: discovery, profile resolution, typed calls, task builders |
airpost-compose | Drafts: new, reply, forward and mailto, quoting, signatures, send warnings |
airpost-activation | Socket activation and build info for programs run by launchd or systemd units |
airpost-secrets | The engine’s secret store: OS keychain, Secret Service, or an AES-256-GCM file |
airpost-ai | Model providers (OpenAI-compatible, Anthropic, Ollama) for summaries, replies and triage |
airpost-integrations | Translation, grammar checks and contact enrichment providers |
airpost-wire | Wire 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.
| Package | Contents |
|---|---|
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
| Path | Contents |
|---|---|
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 |