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)
97 lines
2.8 KiB
JSON
97 lines
2.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cityresourcegraph.com/schemas/economic_calculation.json",
|
|
"title": "Economic Calculation Request/Response",
|
|
"description": "Schema for economic viability calculations",
|
|
"type": "object",
|
|
"properties": {
|
|
"match_id": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "Match identifier"
|
|
},
|
|
"source_resource": {
|
|
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
|
|
},
|
|
"target_resource": {
|
|
"$ref": "https://cityresourcegraph.com/schemas/resource_flow.json"
|
|
},
|
|
"calculations": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annual_savings": {
|
|
"type": "number",
|
|
"description": "Annual cost savings (€)"
|
|
},
|
|
"payback_period_years": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"description": "Investment payback period"
|
|
},
|
|
"npv_10_years": {
|
|
"type": "number",
|
|
"description": "Net present value over 10 years (€)"
|
|
},
|
|
"irr_percent": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"description": "Internal rate of return (%)"
|
|
},
|
|
"transportation_costs": {
|
|
"type": "object",
|
|
"properties": {
|
|
"annual_cost": {"type": "number"},
|
|
"distance_km": {"type": "number"},
|
|
"method": {"type": "string"}
|
|
}
|
|
},
|
|
"co2_reduction_tonnes": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"description": "Annual CO2 emissions reduction"
|
|
},
|
|
"implementation_complexity": {
|
|
"type": "string",
|
|
"enum": ["low", "medium", "high"],
|
|
"description": "Technical implementation complexity"
|
|
},
|
|
"regulatory_requirements": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Required permits and approvals"
|
|
}
|
|
},
|
|
"required": ["annual_savings", "payback_period_years"]
|
|
},
|
|
"assumptions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"discount_rate": {
|
|
"type": "number",
|
|
"default": 0.08,
|
|
"description": "Discount rate for NPV calculations"
|
|
},
|
|
"operating_hours_year": {
|
|
"type": "integer",
|
|
"default": 8000,
|
|
"description": "Annual operating hours"
|
|
},
|
|
"maintenance_cost_factor": {
|
|
"type": "number",
|
|
"default": 0.05,
|
|
"description": "Annual maintenance as % of capital cost"
|
|
},
|
|
"energy_cost_inflation": {
|
|
"type": "number",
|
|
"default": 0.02,
|
|
"description": "Annual energy cost inflation rate"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["source_resource", "target_resource"],
|
|
"additionalProperties": false
|
|
}
|