tideway 0.7.13

A batteries-included Rust web framework built on Axum for building SaaS applications quickly
[workspace]
members = [".", "tideway-macros", "tideway-cli"]

[package]
name = "tideway"
version = "0.7.13"
edition = "2024"
authors = ["JD"]
description = "A batteries-included Rust web framework built on Axum for building SaaS applications quickly"
license = "MIT OR Apache-2.0"
repository = "https://github.com/jordcodes/tideway-rs"
readme = "README.md"
documentation = "https://docs.rs/tideway"
keywords = ["web", "framework", "axum", "api", "async"]
categories = ["web-programming::http-server"]
rust-version = "1.85"

[dependencies]
# Macros (optional)
tideway-macros = { version = "0.1.0", optional = true }

# Core HTTP
axum = { version = "0.8.6", features = ["multipart", "ws"] }
tokio = { version = "1.48.0", features = ["full"] }
tower = "0.5"
tower-http = { version = "0.6.7", features = ["trace", "request-id", "util", "cors", "compression-gzip", "compression-br", "timeout"] }

# Serialization
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

# Error handling
thiserror = "2.0"
anyhow = "1.0"

# Configuration
config = "0.14"

# Auth
jsonwebtoken = { version = "10", features = ["aws_lc_rs"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
base64 = "0.22"
async-trait = "0.1"

# Utilities
uuid = { version = "1.0", features = ["v4", "serde"] }
url = "2.5"
futures = "0.3"
urlencoding = "2.1"
fastrand = "2.1"
serde_urlencoded = "0.7"

# Validation (optional)
validator = { version = "0.18", features = ["derive"], optional = true }

# Database (optional)
sea-orm = { version = "1.1", features = ["sqlx-postgres", "sqlx-sqlite", "runtime-tokio-rustls", "macros"], optional = true }
sea-orm-migration = { version = "1.1", optional = true }
chrono = { version = "0.4", optional = true }
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "sqlite"], optional = true }

# OpenAPI (optional)
utoipa = { version = "5.3", features = ["axum_extras", "chrono", "uuid"], optional = true }
utoipa-axum = { version = "0.2", optional = true }
utoipa-swagger-ui = { version = "9.0", features = ["axum"], optional = true }

# Metrics (optional)
prometheus = { version = "0.13", optional = true }

# Cache (optional)
moka = { version = "0.12", features = ["future"], optional = true }
redis = { version = "0.27", features = ["tokio-comp"], optional = true }

# Sessions (optional)
cookie = { version = "0.18", features = ["private"], optional = true }
hex = { version = "0.4", optional = true }

# Cryptography (for webhook verification)
hmac = "0.12"
sha2 = "0.10"
subtle = "2.5"

# Secret management (optional, for secure secret storage in memory)
secrecy = { version = "0.10", optional = true }

# Stripe billing (optional)
async-stripe = { version = "0.41", default-features = false, features = [
    "runtime-tokio-hyper-rustls-webpki",
    "checkout",
    "billing",
], optional = true }

# Auth (optional - password hashing and MFA)
argon2 = { version = "0.5", optional = true }
totp-rs = { version = "5.6", features = ["qr", "gen_secret"], optional = true }
sha1 = { version = "0.10", optional = true }

# Secure random number generation (used by JWT issuer)
rand = "0.8"

# WebSocket (optional)
dashmap = { version = "6.1", optional = true }

# Email (optional)
lettre = { version = "0.11", default-features = false, features = ["tokio1-rustls-tls", "smtp-transport", "builder"], optional = true }

# Jobs (optional - chrono already added for database)

# Rate limiting
governor = "0.10"

[features]
default = ["database", "openapi", "macros"]
feature-gate-errors = []
feature-gate-warnings = []
# Proc macros for handler definitions with OpenAPI integration
macros = ["tideway-macros", "openapi"]
# Database support with SeaORM
database = ["sea-orm", "sea-orm-migration", "chrono"]
# SQLx database support (WIP - not yet implemented)
database-sqlx = ["sqlx"]
# OpenAPI/Swagger documentation
openapi = ["utoipa", "utoipa-axum", "utoipa-swagger-ui"]
# Request validation with validator crate
validation = ["validator"]
# Prometheus metrics collection
metrics = ["prometheus"]
# Base cache abstraction (enables moka-backed in-memory cache)
cache = ["moka"]
# Redis-backed caching
cache-redis = ["redis", "cache"]
# Session management
sessions = ["cookie", "hex"]
# Background job processing
jobs = ["chrono"]
# Redis-backed job queue
jobs-redis = ["redis", "jobs"]
# WebSocket support
websocket = ["dashmap"]
# Email sending
email = ["lettre"]
# Testing helper to bypass auth (for tests only)
test-auth-bypass = []
# Password hashing with Argon2
auth = ["argon2"]
# MFA support (TOTP + backup codes)
auth-mfa = ["auth", "totp-rs"]
# Password breach checking via HaveIBeenPwned
auth-breach = ["sha1"]
# Stripe-based billing
billing = ["hex", "secrecy", "async-stripe"]
# SeaORM-backed billing storage
billing-seaorm = ["billing", "database"]
# Testing helper for billing (in-memory store)
test-billing = []
# Organizations module
organizations = []
# Admin module (traits and types for platform administration)
admin = ["chrono"]
# Organizations with SeaORM database storage
organizations-seaorm = ["organizations", "database"]
# Organizations with billing integration
organizations-billing = ["organizations", "billing"]
# Testing helper for organizations (in-memory store)
test-organizations = ["organizations"]

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "overhead"
harness = false

[[example]]
name = "email_example"
required-features = ["email"]

[[example]]
name = "seaorm_auth"
required-features = ["database", "auth", "auth-mfa"]