turash/docs/concept/schemas/configuration.json
Damir Mukimov 000eab4740
Major repository reorganization and missing backend endpoints implementation
Repository Structure:
- Move files from cluttered root directory into organized structure
- Create archive/ for archived data and scraper results
- Create bugulma/ for the complete application (frontend + backend)
- Create data/ for sample datasets and reference materials
- Create docs/ for comprehensive documentation structure
- Create scripts/ for utility scripts and API tools

Backend Implementation:
- Implement 3 missing backend endpoints identified in gap analysis:
  * GET /api/v1/organizations/{id}/matching/direct - Direct symbiosis matches
  * GET /api/v1/users/me/organizations - User organizations
  * POST /api/v1/proposals/{id}/status - Update proposal status
- Add complete proposal domain model, repository, and service layers
- Create database migration for proposals table
- Fix CLI server command registration issue

API Documentation:
- Add comprehensive proposals.md API documentation
- Update README.md with Users and Proposals API sections
- Document all request/response formats, error codes, and business rules

Code Quality:
- Follow existing Go backend architecture patterns
- Add proper error handling and validation
- Match frontend expected response schemas
- Maintain clean separation of concerns (handler -> service -> repository)
2025-11-25 06:01:16 +01:00

184 lines
4.6 KiB
JSON

{
"$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
}