Skip to main content

made_core/
lib.rs

1//! Domain core of MADE.
2//!
3//! Pure domain: value objects, entities, events, and ports (traits).
4//! No IO, no transport, no framework glue. Use-case agnostic and
5//! provider-agnostic.
6//!
7//! DDD discipline applies here:
8//!
9//! - No primitive obsession: domain boundaries exchange value objects,
10//!   never raw `String`, `u32`, `f64`, etc.
11//! - Invariants are enforced at construction time (`TryFrom` / `new`)
12//!   and cannot be violated by mutation.
13//! - Aggregates protect their own state transitions; callers never
14//!   mutate internal fields directly.
15//! - Domain errors are typed; I/O errors do not exist here.
16
17#![deny(missing_debug_implementations)]
18
19mod budget_error;
20#[cfg(feature = "conformance")]
21pub mod conformance;
22pub mod entities;
23pub mod error;
24pub mod events;
25pub mod ports;
26pub mod value_objects;
27
28pub use budget_error::BudgetError;
29pub use error::DomainError;