synapse 1.1.0

Neural Communication Network with Federated Identity and Blockchain Trust
Documentation
//! Connectivity Demo for Synapse
//!
//! This example demonstrates basic connectivity concepts and configuration.

use synapse::{
    Config,
    types::SimpleMessage,
};
use anyhow::Result;
use tracing::info;

#[tokio::main]
async fn main() -> Result<()> {
    // Initialize logging
    tracing_subscriber::fmt()
        .with_max_level(tracing::Level::INFO)
        .init();

    info!("๐ŸŒ Starting Connectivity Demo");

    // Create different types of configurations
    demo_different_config_types().await?;
    
    info!("๐ŸŒ Connectivity Demo completed!");
    Ok(())
}

async fn demo_different_config_types() -> Result<()> {
    // Test configuration
    let test_config = Config::for_testing();
    info!("๐Ÿงช Test config created: {}", test_config.entity.local_name);

    // Gmail configuration example
    let gmail_config = Config::gmail_config(
        "MyBot",
        "Tool", 
        "mybot@gmail.com",
        "app_password_here"
    );
    info!("๐Ÿ“ง Gmail config created: {}", gmail_config.entity.local_name);

    // Outlook configuration example  
    let outlook_config = Config::outlook_config(
        "OfficeBot",
        "Service",
        "officebot@outlook.com", 
        "password_here"
    );
    info!("๐Ÿข Outlook config created: {}", outlook_config.entity.local_name);

    // Default configuration for an entity
    let entity_config = Config::default_for_entity("NetworkBot", "AiModel");
    info!("๐Ÿค– Entity config created: {}", entity_config.entity.local_name);

    // Create a sample message for the demo
    let message = SimpleMessage::new(
        "ConnectivityDemo",
        "NetworkTest",
        "Testing connectivity configurations"
    );

    info!("๐Ÿ“ค Demo message created: {}", message.content);
    info!("๐ŸŽฏ Demonstrated different configuration types for various network setups");

    Ok(())
}