[package]
name = "papercrate"
version = "0.1.0"
edition = "2021"

[dependencies]
# Web framework
axum = { version = "0.7", features = ["multipart"] }
tokio = { version = "1", features = ["full"] }
tower = { version = "0.4", features = ["make", "util"] }
tower-http = { version = "0.6", features = ["cors", "trace"] }
axum-extra = { version = "0.9", features = ["typed-header"] }

# Database
diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2"] }
diesel_migrations = "2.1"
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }

# S3
aws-config = "1.1"
aws-sdk-s3 = "1.14"
aws-credential-types = "1.2"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
envy = "0.4"
serde-aux = "4.4"

# Utilities
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
dotenv = "0.15"
sha2 = "0.10"
hex = "0.4"
bytes = "1.5"
async-trait = "0.1"
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
pdfium-render = "0.8"
mime_guess = "2.0"
tempfile = "3.10"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream"] }
percent-encoding = "2.3"
base64 = "0.21"
quick-xml = "0.32"
futures-util = "0.3"
url = "2.5"
once_cell = "1.19"
utoipa = { version = "4.2", default-features = false, features = ["chrono", "uuid", "preserve_order"] }
clap = { version = "4.5", features = ["derive"] }

# Error handling
thiserror = "1.0"
anyhow = "1.0"

# Authentication & security
argon2 = "0.5"
jsonwebtoken = "9"
webauthn-rs = { version = "0.5", features = ["danger-allow-state-serialisation", "danger-credential-internals"] }
serde_bytes = "0.11"
serde_cbor_2 = "0.13"

# Misc
rand = "0.8"

[dev-dependencies]
once_cell = "1.19"
hyper = "1.2"
http-body-util = "0.1"
webauthn-rs-core = "0.5"

[[bin]]
name = "backend"
path = "src/main.rs"
[[bin]]
name = "worker"
path = "src/bin/worker.rs"

[[bin]]
name = "webdav"
path = "src/bin/webdav.rs"

[[bin]]
name = "admin"
path = "src/bin/admin.rs"

[[bin]]
name = "openapi-dump"
path = "src/bin/openapi_dump.rs"
