pub mod auth; pub mod config; pub mod db; pub mod db_guardrails_simple; pub mod errors; pub mod ingestion; pub mod metadata_extraction; pub mod mime_detection; pub mod models; pub mod monitoring; pub mod ocr; pub mod oidc; pub mod routes; pub mod scheduling; pub mod seed; pub mod services; pub mod storage; pub mod swagger; pub mod utils; pub mod webdav_xml_parser; #[cfg(test)] mod tests; #[cfg(any(test, feature = "test-utils"))] pub mod test_utils; #[cfg(any(test, feature = "test-utils"))] pub mod test_helpers; use axum::{http::StatusCode, Json}; use utoipa; use config::Config; use db::Database; use oidc::OidcClient; #[derive(Clone)] pub struct AppState { pub db: Database, pub config: Config, pub file_service: std::sync::Arc, pub webdav_scheduler: Option>, pub source_scheduler: Option>, pub queue_service: std::sync::Arc, pub oidc_client: Option>, pub sync_progress_tracker: std::sync::Arc, pub user_watch_service: Option>, } /// Health check endpoint for monitoring #[utoipa::path( get, path = "/api/health", tag = "health", responses( (status = 200, description = "Service is healthy", body = serde_json::Value), ) )] pub async fn health_check() -> Result, StatusCode> { Ok(Json(serde_json::json!({"status": "ok"}))) }