refactor: migrate monolithic crate to Cargo Workspace with Clean Architecture

Transform the single binary crate into a 9-crate workspace monorepo:

- Root Cargo.toml as [workspace] manager with resolver = "2"
- zesdex-entities: Domain entity types (session, settings, store, message, etc.)
- zesdex-utils: Pure utility functions (error, logger, pagination, slug, clipboard)
- zesdex-dto: Data Transfer Objects for LLM provider API communication
- zesdex-ipc: Unix-socket IPC layer (client/server/framing/protocol)
- zesdex-iam: Identity & Access Management (Clean Architecture: domain/application/infrastructure)
- zesdex-cms: Content Management (Clean Architecture: domain/application/infrastructure)
- zesdex-middleware: HTTP middleware (Auth, CORS, Rate Limiting)
- zesdex-libs: Composition root (AppContext, DB init, JWT, Argon2)
- zesdex-backend: Main binary entry point + seed/migrate binaries
- DevOps: Dockerfile, docker-compose, Nix (flake/shell/default), CI/CD updates
- Remove dead root src/ and src-misc/ directories

All crate re-exports maintain backward compatibility with original
crate::model::*, crate::dto::*, crate::ipc::* module paths.
Feature crates enforce strict layer separation: domain -> application
-> infrastructure with generic trait-based dependency injection.
This commit is contained in:
asepharyana
2026-07-17 09:08:41 +07:00
parent 86cc412395
commit be0a9582bb
248 changed files with 7901 additions and 1505 deletions
+28
View File
@@ -0,0 +1,28 @@
//! Re-exports from `zesdex-entities` crate under the original module paths,
//! plus local sub-modules (agent_def, msglog) that weren't extracted.
// Module re-exports matching original `crate::model::*` paths
pub mod session {
pub use zesdex_entities::seaorm::auth::session::*;
}
pub mod session_lock {
pub use zesdex_entities::seaorm::auth::session_lock::*;
}
pub mod settings {
pub use zesdex_entities::seaorm::common::settings::*;
}
pub mod app_config {
pub use zesdex_entities::seaorm::common::app_config::*;
}
pub mod store {
pub use zesdex_entities::seaorm::common::store::*;
}
pub mod editlog {
pub use zesdex_entities::seaorm::common::edit_log::*;
}
pub mod memory {
pub use zesdex_entities::seaorm::common::memory::*;
}
/// Local modules not extracted to workspace crates
pub mod msglog;
pub mod agent_def;