[package]
name = "stemedb-cluster"
version = "0.1.0"
edition = "2021"
description = "Multi-node cluster coordination for StemeDB"

# Inherit workspace lints
[lints]
workspace = true

[dependencies]
# Core types
stemedb-core = { path = "../stemedb-core" }
stemedb-storage = { path = "../stemedb-storage" }
stemedb-sync = { path = "../stemedb-sync" }
stemedb-rpc = { path = "../stemedb-rpc" }

# Async runtime
tokio = { version = "1", features = ["full"] }

# Error handling
thiserror = "1.0"

# Logging
tracing = "0.1"

# HTTP API (Gateway)
axum = "0.7"
tower = "0.5"
tower-http = { version = "0.5", features = ["cors", "trace"] }

# HTTP client for gateway request forwarding
reqwest = { version = "0.12", features = ["json"] }

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

# Concurrent data structures
dashmap = "6"
parking_lot = "0.12"

# Hashing for sharding
blake3 = "1.5"
hex = "0.4"

# UUID for NodeId
uuid = { version = "1.0", features = ["v4", "serde"] }

# HLC timestamps
uhlc = "0.7"

# Random selection
rand = "0.8"

# Metrics
metrics = "0.23"
metrics-exporter-prometheus = "0.15"

[[bin]]
name = "stemedb-node"
path = "src/bin/node.rs"

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dev-dependencies]
tempfile = "3.10"
tokio-test = "0.4"
stemedb-merkle = { path = "../stemedb-merkle" }
