[package]
name = "kanade-backend"
description = "axum + SQLite projection backend for the kanade endpoint-management system. Hosts /api/* and the embedded SPA dashboard, projects JetStream streams into SQLite, drives the cron scheduler"
readme = "../../README.md"
version.workspace      = true
edition.workspace      = true
rust-version.workspace = true
license.workspace      = true
repository.workspace   = true
homepage.workspace     = true
authors.workspace      = true
keywords.workspace     = true
categories.workspace   = true
include = [
    "src/**/*",
    "migrations/**/*",
    # Only the built SPA bundle — rust-embed reads dist/ at compile
    # time. The source under web/src/ + node_modules/ + the Vite
    # config don't ship to crates.io.
    "web/dist/**/*",
    "Cargo.toml",
]

[dependencies]
kanade-shared = { path = "../kanade-shared", version = "0.7.1" }

anyhow     = { workspace = true }
async-nats = { workspace = true }
axum       = { workspace = true }
bytes      = { workspace = true }
chrono     = { workspace = true }
clap       = { workspace = true }
futures    = { workspace = true }
humantime  = { workspace = true }
jsonwebtoken = { workspace = true }
mime_guess = { workspace = true }
rust-embed = { workspace = true }
tokio-cron-scheduler = { workspace = true }
uuid       = { workspace = true }

# Re-exported above already; explicit so the watch loop's `Mutex` use
# is obvious.
serde      = { workspace = true }
serde_json = { workspace = true }
sqlx       = { workspace = true }
tokio      = { workspace = true }
tower      = { workspace = true }
tower-http = { workspace = true }
tracing    = { workspace = true }
tracing-subscriber = { workspace = true }

[target.'cfg(target_os = "windows")'.dependencies]
# SCM (Service Control Manager) integration. Same role as in
# kanade-agent — without StartServiceCtrlDispatcher the backend
# process never tells Windows it's alive and SCM kills it after
# 30 s with Event ID 7009 / 'service did not respond'.
windows-service = "0.8"
