# VAPORA Backend Service Schema (Axum REST API)

{
  host | String | doc "HTTP server bind address" | default = "0.0.0.0",
  port | Number | doc "HTTP server port (1024-65535)" | default = 8001,
  workers | Number | doc "Number of HTTP worker threads" | default = 4,
  request_timeout | Number | doc "Request timeout in milliseconds" | default = 30000,
  keep_alive | Number | doc "Keep-alive timeout in seconds" | default = 75,
  max_connections | Number | doc "Maximum concurrent connections" | default = 1000,
  graceful_shutdown | Bool | doc "Enable graceful shutdown" | default = true,
  shutdown_timeout | Number | doc "Graceful shutdown timeout in seconds" | default = 30,

  auth = {
    method | String | doc "Authentication method: jwt, oauth2, mfa" | default = "jwt",
    jwt_secret | String | doc "JWT secret key" | default = "",
    jwt_ttl | Number | doc "JWT token TTL in seconds" | default = 3600,
    mfa_enabled | Bool | doc "Enable multi-factor authentication" | default = false,
    audit_logging | Bool | doc "Enable audit logging" | default = true,
  },

  database = {
    url | String | doc "SurrealDB connection URL" | default = "ws://localhost:8000",
    username | String | doc "Database username" | default = "root",
    password | String | doc "Database password (from env if empty)" | default = "",
    database | String | doc "Database name" | default = "vapora",
    pool_size | Number | doc "Connection pool size" | default = 20,
    connection_timeout | Number | doc "Connection timeout in seconds" | default = 30,
  },

  storage = {
    backend | String | doc "Storage backend: filesystem, s3, azure" | default = "filesystem",
    path | String | doc "Local storage path" | default = "/var/lib/vapora/storage",
  },

  cache = {
    enabled | Bool | doc "Enable caching layer" | default = true,
    ttl | Number | doc "Cache TTL in seconds" | default = 3600,
    max_size | Number | doc "Maximum cache size in bytes" | default = 104857600,
  },
}
