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