mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
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)
103 lines
3.0 KiB
JSON
103 lines
3.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cityresourcegraph.com/schemas/match_response.json",
|
|
"title": "Match Response",
|
|
"description": "Response schema for resource match results",
|
|
"type": "object",
|
|
"properties": {
|
|
"matches": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/match"
|
|
},
|
|
"description": "Array of matching opportunities"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total_count": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"description": "Total matches found"
|
|
},
|
|
"query_time_ms": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"description": "Query execution time"
|
|
},
|
|
"cache_hit": {
|
|
"type": "boolean",
|
|
"description": "Whether result came from cache"
|
|
},
|
|
"precision_levels": {
|
|
"type": "object",
|
|
"properties": {
|
|
"measured": {"type": "integer"},
|
|
"estimated": {"type": "integer"},
|
|
"rough": {"type": "integer"}
|
|
},
|
|
"description": "Breakdown by data precision"
|
|
}
|
|
},
|
|
"required": ["total_count"]
|
|
}
|
|
},
|
|
"required": ["matches", "metadata"],
|
|
"definitions": {
|
|
"match": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "Match identifier"
|
|
},
|
|
"compatibility_score": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1,
|
|
"description": "Overall compatibility score (0-1)"
|
|
},
|
|
"economic_value": {
|
|
"type": "number",
|
|
"description": "Estimated annual economic value (€)"
|
|
},
|
|
"distance_km": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"description": "Distance between sites (km)"
|
|
},
|
|
"source_resource": {
|
|
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
|
|
},
|
|
"target_resource": {
|
|
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
|
|
},
|
|
"transportation_estimate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cost_per_year": {"type": "number"},
|
|
"method": {"type": "string"},
|
|
"feasibility_score": {"type": "number", "minimum": 0, "maximum": 1}
|
|
}
|
|
},
|
|
"risk_assessment": {
|
|
"type": "object",
|
|
"properties": {
|
|
"technical_risk": {"type": "number", "minimum": 0, "maximum": 1},
|
|
"regulatory_risk": {"type": "number", "minimum": 0, "maximum": 1},
|
|
"market_risk": {"type": "number", "minimum": 0, "maximum": 1}
|
|
}
|
|
},
|
|
"partner_packet_url": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "URL to detailed partner information packet"
|
|
}
|
|
},
|
|
"required": ["id", "compatibility_score", "economic_value", "source_resource", "target_resource"]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|