- Add main application logic in `api/src/main.rs` to initialize server, database, and services. - Create authentication routes in `api/src/routes/auth.rs` for login, register, logout, and user info retrieval. - Implement configuration route in `api/src/routes/config.rs` to expose application settings. - Define application state management in `api/src/state.rs` to share user service and configuration. - Set up Docker Compose configuration in `compose.yml` for backend, worker, and database services. - Establish domain logic in `domain` crate with user entities, repositories, and services. - Implement SQLite user repository in `infra/src/user_repository.rs` for user data persistence. - Create database migration handling in `infra/src/db.rs` and session store in `infra/src/session_store.rs`. - Add necessary dependencies and features in `Cargo.toml` files for both `domain` and `infra` crates.
18 lines
473 B
Rust
18 lines
473 B
Rust
//! Domain Logic
|
|
//!
|
|
//! This crate contains the core business logic, entities, and repository interfaces.
|
|
//! It is completely independent of the infrastructure layer (databases, HTTP, etc.).
|
|
|
|
pub mod entities;
|
|
pub mod errors;
|
|
pub mod repositories;
|
|
pub mod services;
|
|
pub mod value_objects;
|
|
|
|
// Re-export commonly used types
|
|
pub use entities::*;
|
|
pub use errors::{DomainError, DomainResult};
|
|
pub use repositories::*;
|
|
pub use services::UserService;
|
|
pub use value_objects::*;
|