allframe_core/lib.rs
1//! # AllFrame Core
2//!
3//! The composable Rust API framework.
4//!
5//! AllFrame is the first Rust web framework designed, built, and evolved
6//! exclusively through Test-Driven Development (TDD).
7//!
8//! ## Quick Start
9//!
10//! ```rust,no_run
11//! use allframe_core::prelude::*;
12//!
13//! #[tokio::main]
14//! async fn main() {
15//! println!("AllFrame - One frame. Infinite transformations.");
16//! }
17//! ```
18
19#![deny(warnings)]
20#![deny(missing_docs)]
21#![deny(unsafe_code)]
22
23/// Clean Architecture enforcement
24#[cfg(feature = "di")]
25pub mod arch;
26
27/// CQRS + Event Sourcing
28#[cfg(feature = "cqrs")]
29pub mod cqrs;
30
31/// OpenTelemetry automatic instrumentation
32#[cfg(feature = "otel")]
33pub mod otel;
34
35/// Router module for protocol-agnostic request handling
36pub mod router;
37
38/// Prelude module for convenient imports
39///
40/// Commonly used imports for AllFrame applications
41pub mod prelude {
42 pub use crate::router::{
43 GraphQLAdapter, GrpcAdapter, GrpcRequest, GrpcStatus, Method, ProtocolAdapter, RestAdapter,
44 RestRequest, RestResponse, RouteMetadata, Router, ToJsonSchema,
45 };
46 #[cfg(feature = "router")]
47 pub use crate::router::{GraphQLConfig, GrpcConfig, RestConfig, RouterConfig, ServerConfig};
48}
49
50#[cfg(test)]
51mod tests {
52 #[test]
53 fn test_allframe_core_exists() {
54 // This test verifies the crate compiles
55 assert!(true);
56 }
57}