1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! # alpe-core
//!
//! Core domain types, error hierarchy, and pure business logic for the Alpe platform.
//!
//! This crate is the foundation of the Alpe architecture. It contains zero IO — all types
//! and functions are pure, deterministic, and 100% unit-testable. Every other crate in the
//! workspace depends on `alpe-core`.
//!
//! ## Modules
//!
//! - [`error`] — Unified error hierarchy ([`error::CoreError`], [`error::ValidationError`], [`error::TransitionError`])
//! - [`jurisdiction`] — EU member state types and sovereignty replication rules
//! - [`resource`] — Resource state machine and metadata
//! - [`validation`] — Input validation (DNS label constraints for names)
//! - [`plan`] — Compute and database service plans with resource limits
//! - [`project`] — Project specification and validation
//!
//! ## Design Principles
//!
//! - **Pure logic**: No IO, no async, no side effects — every function is deterministic
//! - **Type safety**: Invalid states are unrepresentable where possible
//! - **Test-first**: All modules are developed with strict TDD (RED → GREEN → Refactor)
//! - **Documentation as code**: `#![deny(missing_docs)]` enforces documentation on every public item
/// Unified error hierarchy for the Alpe platform.
/// EU jurisdiction types and sovereignty-aware replication rules.
/// Service plans and resource limits (compute, database).
/// Project specification and validation.
/// Resource state machine and metadata.
/// Input validation rules (DNS label constraints).