[package]
name = "church-api"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "church-api"
path = "src/main.rs"

[[bin]]
name = "clean-html-entities"
path = "src/bin/clean_html_entities.rs"


[[bin]]
name = "standardize-bulletin-format"
path = "src/bin/standardize_bulletin_format.rs"



[dependencies]
# Web framework
axum = { version = "0.7", features = ["multipart", "macros"] }
tokio = { version = "1.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5", features = ["cors", "trace", "fs"] }

# Database
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "uuid", "chrono", "json"] }

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Authentication & Security
jsonwebtoken = "9.2"
bcrypt = "0.15"

# Email
lettre = { version = "0.11", default-features = false, features = ["tokio1-rustls-tls", "smtp-transport", "builder"] }

# Utilities
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde", "clock"] }
chrono-tz = "0.8"
anyhow = "1.0"
dotenvy = "0.15"
rust_decimal = { version = "1.33", features = ["serde"] }
url = "2.5"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio-util = { version = "0.7", features = ["io"] }
futures-util = "0.3"
mime = "0.3"
image = "0.24"
webp = "0.2"
regex = "1.0"
walkdir = "2.5"
roxmltree = "0.18"
urlencoding = "2.1"

# HTTP client for Jellyfin
reqwest = { version = "0.11", features = ["json", "stream"] }

# Keep only proven dependencies
libc = "0.2"
once_cell = "1.19"

# FFmpeg Rust bindings
ffmpeg-next = "7.0"

# GStreamer Rust bindings - legacy, will be replaced by VA-API
gstreamer = "0.22"
gstreamer-video = "0.22" 
gstreamer-app = "0.22"
gstreamer-pbutils = "0.22"  # For discoverer (replaces ffprobe)

# VA-API direct hardware acceleration - the future!
libva = { package = "cros-libva", version = "0.0.13" }
cros-codecs = { version = "0.0.6", features = ["vaapi"] }
mp4parse = "0.17"  # For direct MP4 demuxing

[build-dependencies]
pkg-config = "0.3"
cc = "1.0"

[features]
default = []
