//! ReadFlow - 面向开发者和知识工作者的阅读工具
//! 
//! 项目主页: http://192.168.120.110:4000/damai/readflow

use std::env;
use tracing::info;
use tracing_subscriber::{fmt, prelude::*, EnvFilter};

mod config;
mod core;
mod infrastructure;
mod ui;
mod library;

fn setup_logging() {
    let filter = EnvFilter::try_from_default_env()
        .unwrap_or_else(|_| EnvFilter::new("info"));
    
    tracing_subscriber::registry()
        .with(fmt::layer())
        .with(filter)
        .init();
}

fn main() {
    setup_logging();
    
    info!("Starting ReadFlow v{}", env!("CARGO_PKG_VERSION"));
    info!("Project: {}", env!("CARGO_PKG_NAME"));
    info!("Description: {}", env!("CARGO_PKG_DESCRIPTION"));
    
    // 启动 Dioxus GUI
    ui::run();
}