
[package]
name = "rustelo_server"
version = "0.1.0"
edition = "2021"
authors = ["Rustelo Contributors"]
license = "MIT"
description = "A modular Rust web application template built with Leptos, Axum, and optional components"
documentation = "https://docs.rs/server"
repository = "https://github.com/yourusername/rustelo"
homepage = "https://jesusperez.pro"
readme = "../../README.md"
keywords = [
    "rust",
    "web",
    "leptos",
    "axum",
    "template",
]
categories = [
    "web-programming",
    "template-engine",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[lib]
crate-type = [ "cdylib", "lib" ]

[dependencies]
leptos = { workspace = true, features = ["ssr"] }
leptos_router = { workspace = true }
leptos_axum = { workspace = true }
leptos_config = { workspace = true }
leptos_meta = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
toml = { workspace = true }
fluent = { workspace = true }
fluent-bundle = { workspace = true }
unic-langid = { workspace = true }

rustelo_core_types = { workspace = true }
rustelo_core_lib = { workspace = true }
rustelo_client = { workspace = true }
rustelo_components = { workspace = true, features = ["ssr"] }
rustelo_pages = { workspace = true, features = ["ssr"] }

axum = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "process"]}
tower = { workspace = true }
notify = { workspace = true, default-features = false, features = ["macos_fsevent"], optional = true }
tower-http = { workspace = true, features = ["fs", "cors", "trace"]}
dotenv = { workspace = true }
thiserror = { workspace = true }
regex = { workspace = true }
rand = { workspace = true }
gloo-timers = { workspace = true }
async-trait = { workspace = true }
anyhow = { workspace = true }
glob = { workspace = true }
hex = { workspace = true }
reqwest = { workspace = true, features = ["json"] }
rhai = { workspace = true, features = ["serde", "only_i64", "no_float"] }
futures = { workspace = true }

# Email support
lettre = { workspace = true, features = ["tokio1-native-tls", "smtp-transport", "pool", "hostname", "builder"], optional = true }
handlebars = { workspace = true, optional = true }
urlencoding = { workspace = true, optional = true }

# TLS Support (optional)
axum-server = { workspace = true, features = ["tls-rustls"], optional = true }
rustls = { workspace = true, optional = true }
rustls-pemfile = { workspace = true, optional = true }

# Authentication & Authorization (optional)
jsonwebtoken = { workspace = true, optional = true }
argon2 = { workspace = true, optional = true }
uuid = { workspace = true, features = ["v4", "serde", "js"], optional = true }
chrono = { workspace = true, features = ["serde"], optional = true }
oauth2 = { workspace = true, optional = true }
tower-sessions = { workspace = true, optional = true }
sqlx = { workspace = true, features = ["runtime-tokio-rustls", "postgres", "sqlite", "chrono", "uuid", "migrate"], optional = true }
tower-cookies = { workspace = true, optional = true }
time = { workspace = true, features = ["serde"], optional = true }

# 2FA Support (optional)
totp-rs = { workspace = true, optional = true }
qrcode = { workspace = true, features = ["svg"], optional = true }
base32 = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }

# Cryptography dependencies
aes-gcm = { workspace = true, optional = true }
clap = { workspace = true, features = ["derive"] }

# Metrics dependencies
prometheus = { workspace = true, optional = true }

# Content Management & Rendering (optional)
pulldown-cmark = { workspace = true, features = ["simd"], optional = true }
serde_yaml = { workspace = true, optional = true }
tempfile = { workspace = true, optional = true }
tera = { workspace = true, optional = true }
async-compression = { workspace = true, features = ["gzip", "tokio"], optional = true }
lru = { workspace = true, optional = true }
ammonia = { workspace = true, optional = true }
scraper = { workspace = true, optional = true }

[dev-dependencies]
tempfile = { workspace = true }
argon2 = { workspace = true }
rand_core = { workspace = true }
axum-test = { workspace = true }
futures = { workspace = true }

[features]
default = []
hydrate = []
ssr = []
rbac = ["auth"]
tls = [
    "axum-server/tls-rustls",
    "rustls",
    "rustls-pemfile",
]
auth = [
    "jsonwebtoken",
    "argon2",
    "aes-gcm",
    "uuid",
    "chrono",
    "oauth2",
    "tower-sessions",
    "sqlx",
    "totp-rs",
    "qrcode",
    "base32",
    "sha2",
    "base64",
    "tower-cookies",
    "time",
    "crypto",
]
crypto = [
    "aes-gcm",
    "chrono",
    "base64",
    "time",
]
content-static = [
    "pulldown-cmark",
    "serde_yaml",
    "tempfile",
    "tera",
    "uuid",
    "chrono",
    "async-compression",
    "lru",
    "ammonia",
    "scraper",
]
content-watcher = [
    "content-static",
    "notify",
    "chrono",
]
content-db = [
    "content-static",
    "sqlx",
]
email = [
    "lettre",
    "handlebars",
    "urlencoding",
]
metrics = [
    "prometheus",
    "chrono",
]
examples = []
production = [
    "auth",
    "content-db",
    "content-static",
    "crypto",
    "email",
    "metrics",
    "tls",
]

[[bin]]
name = "config_tool"
path = "src/bin/config_tool.rs"

[[bin]]
name = "crypto_tool"
path = "src/bin/crypto_tool.rs"
required-features = ["crypto"]

[[bin]]
name = "config_crypto_tool"
path = "src/bin/config_crypto_tool.rs"
required-features = ["crypto"]

[[bin]]
name = "test_config"
path = "src/bin/test_config.rs"

[[bin]]
name = "test_database"
path = "src/bin/test_database.rs"
required-features = ["auth"]

[[bin]]
name = "content_processor"
path = "src/bin/content_processor.rs"
required-features = ["content-static"]

[[bin]]
name = "db_tool"
path = "src/bin/db_tool.rs"
required-features = ["auth"]
