//! # Zesdex Application Layer //! //! Defines port traits (interfaces) and use-case implementations for the //! Zesdex application. This crate depends **only** on the domain crate; //! it has no knowledge of infrastructure or interface adapters. //! //! ## Architecture //! //! ```text //! apps/application/src/ //! ├── lib.rs — crate root, re-exports //! ├── ports/ — Port traits (interfaces to external services) //! │ ├── provider.rs -- ProviderService (LLM chat completion) //! │ ├── password.rs -- PasswordService (hash / verify) //! │ ├── token.rs -- TokenService (JWT create / verify) //! │ └── authentication.rs -- AuthService (combined auth) //! ├── auth/ — Auth use-cases //! │ ├── oauth_service.rs -- OAuth 2.0 PKCE flow //! │ └── session_service.rs -- Session CRUD lifecycle //! └── cms/ — CMS use-cases //! ├── conversation_service.rs -- Conversation CRUD //! ├── memory_service.rs -- Long-term memory management //! └── settings_service.rs -- Settings & app-config management //! ``` //! //! ## Key Design Principle //! //! Application services are generic over their repository/port dependencies. //! Concrete implementations are injected at the composition root, keeping //! the use-case logic independent of any specific persistence or infrastructure //! technology. pub mod auth; pub mod cms; pub mod ports; // Re-export port traits for ergonomic access. pub use ports::*; // Re-export auth use-cases. pub use auth::{ oauth_service::{OAuthFlowStore, OAuthUseCase, TokenExchanger}, session_service::SessionServiceImpl, }; // Re-export CMS use-cases. pub use cms::{ conversation_service::ConversationServiceImpl, memory_service::MemoryServiceImpl, settings_service::SettingsServiceImpl, };