Files
kvitt/server/crates/kvitt-server/Cargo.toml
T
jacobh2 15056dc7df M4: sync pull and push (E-31, E-32), audit writer and diff, FCM sender, push batching, scheduler, pruning, rotate-epoch
- src/sync/: pull with UNION ALL paging and cursor_ahead; push processing of SPEC §14.4.4 steps 1 to 12 in one
  BEGIN IMMEDIATE with a savepoint per mutation, LWW with delete-wins, tombstones, clock_skew, replay from
  sync_mutations, sync_batch for more than 3 notifiable changes; 90-day pruning.
- src/audit/: SqlAuditWriter and the §14.4.7 diff (now the default in AppState::new).
- src/push/: bounded PushHub (100, drop oldest), FCM HTTP v1 client with service-account JWT (RS256, jsonwebtoken
  on aws-lc-rs) and token cache, sender with 1/5/25 s retries and token clearing; disabled without credentials.
- src/tasks/: start installs push and spawns the 06:00 generation (and at start) and 04:00 pruning loops on the
  injectable clock.
- cli: rotate-epoch; serve uses into_make_service_with_connect_info; stale doc comments updated; /i/ empty code
  gets the HTML 404.
- tests: sync_api, push_fcm (local stub of Google's endpoints), scheduler_daily; skeleton routes test now asserts
  no route is 501.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
2026-10-17 22:27:30 +02:00

48 lines
1.6 KiB
TOML

[package]
name = "kvitt-server"
description = "Kvitt sync server (SPEC §6.3)."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
publish.workspace = true
[lints]
workspace = true
[lib]
path = "src/lib.rs"
[[bin]]
name = "kvitt-server"
path = "src/main.rs"
[dependencies]
axum = "0.8.9"
base64 = "0.23.1"
chrono = { version = "0.4.45", default-features = false, features = ["clock", "std"] }
chrono-tz = "0.10.4"
clap = { version = "4.6.7", features = ["derive", "env"] }
getrandom = "0.4.3"
image = { version = "0.25.10", default-features = false, features = ["jpeg", "png", "webp"] }
jsonwebtoken = { version = "11.1.0", default-features = false, features = ["aws_lc_rs", "use_pem"] }
kvitt-domain = { version = "0.1.0", path = "../kvitt-domain" }
percent-encoding = "2.3.2"
reqwest = { version = "0.13.5", default-features = false, features = ["rustls", "json"] }
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.154"
sha2 = "0.11.1"
sqlx = { version = "0.9.0", default-features = false, features = ["runtime-tokio", "sqlite", "migrate", "macros"] }
thiserror = "2.0.21"
tokio = { version = "1.53.3", features = ["rt-multi-thread", "macros", "net", "signal", "time", "sync", "io-util"] }
tokio-util = { version = "0.7.20", features = ["io"] }
tower = { version = "0.5.3", features = ["util"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["json", "env-filter"] }
utoipa = { version = "6.0.0", features = ["uuid"] }
uuid = { version = "1.28.0", features = ["v7", "serde"] }
[dev-dependencies]
aws-lc-rs = "1.18.2"
http-body-util = "0.1.5"
serde_norway = "0.9.42"