Covers phases 1-2 of the build order in the architecture spec: the IMAP sync engine (IDLE + UIDVALIDITY tracking + jittered reconnect, headers first with lazy body fetch), the full data model, and a minimal REST API for auth, accounts, folders, messages and delta polling. Credentials are encrypted at rest with ChaCha20-Poly1305 rather than libsodium secretbox, to avoid a system dependency for the same construction. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
42 lines
1.1 KiB
TOML
42 lines
1.1 KiB
TOML
[package]
|
|
name = "tern-server"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Tern sync server — the only component that speaks IMAP/SMTP"
|
|
|
|
[dependencies]
|
|
tokio = { version = "1", features = ["full"] }
|
|
axum = { version = "0.7", features = ["macros"] }
|
|
tower = "0.5"
|
|
tower-http = { version = "0.6", features = ["trace", "cors"] }
|
|
|
|
sqlx = { version = "0.8", features = ["runtime-tokio", "tls-rustls", "postgres", "chrono", "uuid", "migrate"] }
|
|
|
|
async-imap = { version = "0.11", default-features = false, features = ["runtime-tokio"] }
|
|
async-native-tls = { version = "0.6", default-features = false, features = ["runtime-tokio"] }
|
|
mail-parser = "0.11"
|
|
mail-send = "0.4"
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
chacha20poly1305 = "0.10"
|
|
base64 = "0.22"
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
dotenvy = "0.15"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
futures = "0.3"
|
|
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|