pub mod config; // Configuration loading from YAML pub mod db; // SQLite database access (CRUD for assets and tags) pub mod error; // Centralized error types and HTTP error responses pub mod hash; // SHA-256 content hashing pub mod models; // Data structures shared across the codebase pub mod routes; // HTTP API route handlers pub mod storage; // File I/O: reading, writing, and trashing asset files pub mod verifier; // Background integrity checker and file-attribute syncer pub mod xattr; // OS-level file metadata (xattr on Unix, NTFS ADS on Windows) use std::sync::Arc; use crate::config::Config; use crate::db::Db; /// Broadcast channel for notifying sync subscribers about new assets. /// Each message is `"hash:timestamp"` (e.g. `"abc123def456:1710000000000"`). pub type SyncEventSender = tokio::sync::broadcast::Sender; /// Shared application state passed to every HTTP handler. #[derive(Clone)] pub struct AppState { pub config: Arc, pub db: Db, pub sync_events: SyncEventSender, }