//! # mail2couch
//!
//! A powerful email backup utility that synchronizes mail from IMAP accounts to CouchDB.
//!
//! This library provides the core functionality for:
//! - Connecting to IMAP servers
//! - Retrieving email messages and attachments
//! - Storing emails in CouchDB with proper document structures
//! - Incremental synchronization to avoid re-processing messages
//! - Filtering by folders, dates, and keywords
//!
//! ## Document Schemas
//!
//! The library uses well-defined CouchDB document schemas that are compatible
//! with the Go implementation. See the `schemas` module for details.

pub mod schemas;
pub mod config;
pub mod cli;
pub mod couch;
pub mod imap;
pub mod filters;
pub mod sync;

// Re-export main types for convenience
pub use schemas::{MailDocument, SyncMetadata, AttachmentStub, generate_database_name};
pub use config::{Config, MailSource, CommandLineArgs};
pub use couch::CouchClient;
pub use imap::ImapClient;