{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cityresourcegraph.com/schemas/configuration.json", "title": "Application Configuration", "description": "Schema for application configuration", "type": "object", "properties": { "environment": { "type": "string", "enum": ["development", "staging", "production"], "description": "Deployment environment" }, "server": { "type": "object", "properties": { "host": { "type": "string", "default": "0.0.0.0" }, "port": { "type": "integer", "minimum": 1, "maximum": 65535, "default": 8080 }, "read_timeout": { "type": "string", "default": "30s", "pattern": "^\\d+s$" }, "write_timeout": { "type": "string", "default": "30s", "pattern": "^\\d+s$" } } }, "database": { "type": "object", "properties": { "neo4j": { "type": "object", "properties": { "uri": { "type": "string", "format": "uri", "pattern": "^neo4j://.+" }, "username": {"type": "string"}, "password": {"type": "string"}, "max_connection_pool_size": { "type": "integer", "default": 100, "minimum": 1 } }, "required": ["uri", "username", "password"] }, "postgresql": { "type": "object", "properties": { "host": {"type": "string"}, "port": {"type": "integer", "default": 5432}, "database": {"type": "string"}, "username": {"type": "string"}, "password": {"type": "string"}, "ssl_mode": { "type": "string", "enum": ["disable", "require", "verify-ca", "verify-full"], "default": "require" }, "max_open_connections": { "type": "integer", "default": 25 }, "max_idle_connections": { "type": "integer", "default": 25 } }, "required": ["host", "database", "username", "password"] } } }, "cache": { "type": "object", "properties": { "redis": { "type": "object", "properties": { "address": { "type": "string", "default": "localhost:6379" }, "password": {"type": "string"}, "db": { "type": "integer", "default": 0, "minimum": 0 }, "pool_size": { "type": "integer", "default": 10, "minimum": 1 } } } } }, "matching": { "type": "object", "properties": { "default_max_distance_km": { "type": "number", "default": 25, "minimum": 1, "maximum": 1000 }, "default_min_score": { "type": "number", "default": 0.3, "minimum": 0, "maximum": 1 }, "cache_ttl_seconds": { "type": "integer", "default": 900, "minimum": 60 }, "max_results_per_query": { "type": "integer", "default": 50, "minimum": 1, "maximum": 200 } } }, "security": { "type": "object", "properties": { "jwt_secret": {"type": "string", "minLength": 32}, "jwt_expiry_hours": { "type": "integer", "default": 24, "minimum": 1 }, "bcrypt_cost": { "type": "integer", "default": 12, "minimum": 4, "maximum": 31 }, "cors_allowed_origins": { "type": "array", "items": {"type": "string", "format": "uri"} } } }, "features": { "type": "object", "properties": { "real_time_notifications": { "type": "boolean", "default": true }, "advanced_analytics": { "type": "boolean", "default": false }, "facilitator_marketplace": { "type": "boolean", "default": true }, "api_access": { "type": "boolean", "default": true } } } }, "required": ["environment", "server"], "additionalProperties": false }