[package]
name = "cbd-server"
version = "0.1.0"
edition = "2021"
description = "CBD Enterprise Server - High-performance gRPC and REST server"
license = "MIT"
authors = ["CBD Team"]

[dependencies]
# Core dependencies
cbd-core = { path = "../cbd-core" }
cbd-storage = { path = "../cbd-storage" }
cbd-vector = { path = "../cbd-vector" }
cbd-cluster = { path = "../cbd-cluster" }
cbd-security = { path = "../cbd-security" }

# Async runtime
tokio = { version = "1.35", features = ["full"] }
tokio-util = "0.7"

# gRPC and networking
tonic = { version = "0.11", features = ["transport", "codegen", "prost"], optional = true }
tonic-build = "0.11"
prost = "0.12"
tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }

# REST API
axum = { version = "0.7", features = ["macros"], optional = true }
hyper = { version = "1.0", features = ["full"] }

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

# Utilities
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
anyhow = "1.0"
thiserror = "1.0"

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

# Configuration
config = "0.14"
clap = { version = "4.4", features = ["derive"] }

# Metrics - simplified for now
# prometheus = { version = "0.13", optional = true }

[build-dependencies]
# tonic-build = "0.11"

[features]
default = ["grpc", "rest"]
grpc = ["dep:tonic"]
rest = ["dep:axum"]
# metrics = ["dep:prometheus"]  
# tracing = ["dep:tracing-opentelemetry", "dep:opentelemetry", "dep:opentelemetry-jaeger"]
ssl = ["tonic/tls"]
