capy-framework 0.3.1

An opinionated full-stack Rust web framework with strong conventions and sensible defaults.
Documentation
//! An opinionated full-stack Rust web framework with strong conventions and sensible defaults.
//!
//! Capy integrates routing, validation, configuration, and database tooling with
//! a predictable application structure.
//!
//! Depend on this package as `capy = { package = "capy-framework", version = "0.3.1" }`.
//! The prelude contains the common API; named re-exports retain native escape hatches.

mod app;
mod diagnostics;
mod frontend;

pub use app::App;
pub use capy_core::{
    AppConfig, AppContext, AppError, AppSettings, Context, DatabaseSettings, Result,
    ValidationErrors,
};
pub use capy_db as db;
pub use capy_http::{health, Created, Json, NoContent, RouteInfo, Routes};
pub use capy_validation::Validated;

pub use axum;
pub use chrono;
pub use sea_orm;
pub use sea_orm_migration as migration;
pub use serde;
pub use serde_json;
pub use tokio;
pub use tower;
pub use tower_http;
pub use tracing;
pub use validator;

#[cfg(feature = "testing")]
pub use capy_testing as testing;

/// The small set of types most API handlers need.
pub mod prelude {
    pub use crate::{
        App, AppConfig, AppContext, AppError, Context, Created, Json, NoContent, Result, Routes,
        Validated,
    };
    pub use axum::extract::{Path, Query};
    pub use sea_orm::DatabaseConnection;
    pub use serde::{Deserialize, Serialize};
    pub use serde_json::{json, Value};
    pub use validator::Validate;
}

mod dev_logging;