[package]
name = "compliance-dashboard"
version = "0.1.0"
edition = "2021"
default-run = "compliance-dashboard"

[[bin]]
name = "compliance-dashboard"
path = "../bin/main.rs"

[lints]
workspace = true

[features]
web = ["dioxus/web", "dioxus/router", "dioxus/fullstack", "dep:web-sys", "dep:js-sys", "dep:wasm-bindgen", "dep:gloo-timers"]
server = [
    "dioxus/server",
    "dioxus/router",
    "dioxus/fullstack",
    "compliance-core/mongodb",
    "compliance-core/telemetry",
    "dep:axum",
    "dep:mongodb",
    "dep:reqwest",
    "dep:tower-http",
    "dep:secrecy",
    "dep:dotenvy",
    "dep:dioxus-cli-config",
    "dep:dioxus-fullstack",
    "dep:tokio",
    "dep:tower-sessions",
    "dep:time",
    "dep:rand",
    "dep:url",
    "dep:sha2",
    "dep:base64",
    "dep:uuid",
    "dep:bson",
]

[dependencies]
compliance-core = { workspace = true, default-features = false }
dioxus = "=0.7.3"
dioxus-free-icons = { version = "0.10", features = ["bootstrap"] }
serde = { workspace = true }
serde_json = { workspace = true }
chrono = { workspace = true }
tracing = { workspace = true }
dioxus-logger = "0.6"
thiserror = { workspace = true }

# Web-only
reqwest = { workspace = true, optional = true }
web-sys = { version = "0.3", optional = true, features = ["Blob", "BlobPropertyBag", "HtmlAnchorElement", "Url", "Document", "Element", "Window", "Storage", "MediaQueryList"] }
js-sys = { version = "0.3", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
gloo-timers = { version = "0.3", features = ["futures"], optional = true }

# Server-only
axum = { version = "0.8", optional = true }
mongodb = { workspace = true, optional = true }
tower-http = { version = "0.6", features = ["cors", "trace"], optional = true }
secrecy = { workspace = true, optional = true }
dotenvy = { version = "0.15", optional = true }
tokio = { workspace = true, optional = true }
dioxus-cli-config = { version = "=0.7.3", optional = true }
dioxus-fullstack = { version = "=0.7.3", optional = true }
tower-sessions = { version = "0.15", default-features = false, features = ["axum-core", "memory-store", "signed"], optional = true }
time = { version = "0.3", default-features = false, optional = true }
rand = { version = "0.9", optional = true }
url = { version = "2", optional = true }
sha2 = { workspace = true, optional = true }
base64 = { version = "0.22", optional = true }
uuid = { workspace = true, optional = true }
bson = { version = "2", features = ["chrono-0_4"], optional = true }
