acton_dx/lib.rs
1//! Acton DX - Developer experience focused web framework for Rust
2//!
3//! This crate provides:
4//! - **htmx**: HTMX web framework module (feature-gated)
5//! - **cli**: Command-line interface module (feature-gated)
6//!
7//! # Features
8//!
9//! - `htmx` - HTMX web framework (default)
10//! - `cli` - Command-line interface (default)
11//! - `postgres` - PostgreSQL database support (default)
12//! - `sqlite` - SQLite database support
13//! - `mysql` - MySQL database support
14//! - `redis` - Redis session and cache support (default)
15//! - `cedar` - Cedar policy-based authorization (default)
16//! - `otel-metrics` - OpenTelemetry metrics collection
17//! - `aws-ses` - AWS SES email backend
18//! - `clamav` - ClamAV virus scanning
19//!
20//! # Quick Start
21//!
22//! ## Using the CLI
23//!
24//! ```bash
25//! # Create a new HTMX project
26//! acton-dx htmx new my-app
27//!
28//! # Start development server
29//! acton-dx htmx dev
30//!
31//! # Generate CRUD scaffold
32//! acton-dx htmx scaffold crud Post title:string content:text
33//! ```
34//!
35//! ## Using the Library
36//!
37//! ```rust,ignore
38//! use acton_dx::prelude::*;
39//!
40//! #[tokio::main]
41//! async fn main() -> anyhow::Result<()> {
42//! // Your HTMX application code here
43//! Ok(())
44//! }
45//! ```
46
47// Lint configuration is handled at the workspace level in Cargo.toml
48
49/// HTMX web framework module
50///
51/// Contains all functionality for building server-rendered HTMX applications:
52/// - Authentication and sessions
53/// - Form handling with validation
54/// - HTMX response types
55/// - Middleware (CSRF, sessions, security headers)
56/// - Email sending
57/// - File storage
58/// - Background jobs
59/// - OAuth2 authentication
60#[cfg(feature = "htmx")]
61pub mod htmx;
62
63/// Command-line interface module
64///
65/// Contains the CLI commands for:
66/// - Project scaffolding (`acton htmx new`)
67/// - Development server (`acton htmx dev`)
68/// - Database management (`acton htmx db`)
69/// - CRUD generation (`acton htmx scaffold`)
70/// - Template management (`acton htmx templates`)
71/// - Deployment (`acton htmx deploy`)
72#[cfg(feature = "cli")]
73pub mod cli;
74
75// Re-export htmx submodules at crate root for convenience
76// This allows `use acton_dx::prelude::*` instead of `use acton_dx::htmx::prelude::*`
77#[cfg(feature = "htmx")]
78pub use htmx::agents;
79#[cfg(feature = "htmx")]
80pub use htmx::auth;
81#[cfg(feature = "htmx")]
82pub use htmx::config;
83#[cfg(feature = "htmx")]
84pub use htmx::email;
85#[cfg(feature = "htmx")]
86pub use htmx::error;
87#[cfg(feature = "htmx")]
88pub use htmx::extractors;
89#[cfg(feature = "htmx")]
90pub use htmx::forms;
91#[cfg(feature = "htmx")]
92pub use htmx::handlers;
93#[cfg(feature = "htmx")]
94pub use htmx::health;
95#[cfg(feature = "htmx")]
96pub use htmx::jobs;
97#[cfg(feature = "htmx")]
98pub use htmx::middleware;
99#[cfg(feature = "htmx")]
100pub use htmx::oauth2;
101#[cfg(feature = "htmx")]
102pub use htmx::observability;
103#[cfg(feature = "htmx")]
104pub use htmx::prelude;
105#[cfg(feature = "htmx")]
106pub use htmx::responses;
107#[cfg(feature = "htmx")]
108pub use htmx::state;
109#[cfg(feature = "htmx")]
110pub use htmx::storage;
111#[cfg(feature = "htmx")]
112pub use htmx::template;