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
42
43
44
45
46
47
48
49
50
//! # Axtra
//!
//! Opinionated helpers for Axum + Astro projects.
//!
//! ## Features
//!
//! - **AppError**: Unified error type for Axum APIs.
//! - **Error Macros**: Ergonomic error construction with `app_error!`.
//! - **TypeScript Type Generation**: Rust error types exported via `ts-rs`.
//! - **Error Notifications**: Pluggable notification system with Slack, Discord, ntfy, and cmdline.io support.
//! - **Wrapped JSON Responses**: `WrappedJson<T>` and `ResponseKey` derive macro.
//! - **Health Check Endpoint**: Built-in Axum route for Postgres connectivity.
//! - **Static File Serving**: SPA and static file helpers for Axum.
//! - **Bouncer** (optional): Reject and ban IP's hitting invalid endpoints.
//!
//! ## Notification System
//!
//! The notification system uses a trait-based architecture allowing you to:
//! - Use built-in providers (Slack, Discord, ntfy, cmdline.io)
//! - Create custom providers by implementing [`notifier::ErrorNotifier`]
//! - Configure via builder pattern or environment variables
//!
//! ```rust,ignore
//! use axtra::notifier::NotificationManager;
//! use axtra::errors::notifiers::init_notification_manager;
//!
//! // Auto-configure from environment variables
//! init_notification_manager(NotificationManager::from_env());
//!
//! // Or use builder pattern
//! let manager = NotificationManager::builder()
//! .with_slack("https://hooks.slack.com/...")
//! .build();
//! init_notification_manager(manager);
//! ```
//!
//! ## See Also
//! - [README](https://github.com/imothee-io/axtra)
//! - [API Docs (docs.rs)](https://docs.rs/axtra)
//! - [Changelog](./CHANGELOG.md)
pub use *;