turash/docs/concept/schemas/facilitator.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

147 lines
4.1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cityresourcegraph.com/schemas/facilitator.json",
"title": "Facilitator Entity",
"description": "External engineers and consultants available as paid intermediaries for industrial symbiosis implementation",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique facilitator identifier"
},
"user_id": {
"type": "string",
"format": "uuid",
"description": "Associated user account ID"
},
"type": {
"type": "string",
"enum": ["engineer", "consultant", "legal", "financial", "technical"],
"description": "Type of facilitator"
},
"company_name": {
"type": "string",
"maxLength": 255,
"description": "Company or individual business name"
},
"contact_person": {
"type": "string",
"maxLength": 255,
"description": "Primary contact name"
},
"email": {
"type": "string",
"format": "email",
"description": "Contact email"
},
"phone": {
"type": "string",
"pattern": "^\\+?[1-9]\\d{1,14}$",
"description": "Contact phone (E.164 format)"
},
"specialties": {
"type": "array",
"items": {
"type": "string",
"enum": ["heat_exchange", "pipe_installation", "electrical", "plumbing", "permits", "contracts", "feasibility_studies", "project_management", "environmental_assessment", "energy_auditing", "waste_management", "process_optimization"]
},
"uniqueItems": true,
"description": "Areas of technical expertise"
},
"service_area_km": {
"type": "number",
"minimum": 0,
"maximum": 1000,
"description": "Maximum distance willing to travel for on-site work"
},
"hourly_rate": {
"type": "number",
"minimum": 0,
"description": "Hourly rate in €"
},
"daily_rate": {
"type": "number",
"minimum": 0,
"description": "Daily rate in € (for full-day engagements)"
},
"certifications": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"description": "Professional certifications and qualifications"
},
"experience_years": {
"type": "integer",
"minimum": 0,
"maximum": 50,
"description": "Years of relevant experience"
},
"completed_matches": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Number of successfully completed facilitation projects"
},
"rating": {
"type": "number",
"minimum": 0,
"maximum": 5,
"description": "Average rating from clients (0-5 scale)"
},
"rating_count": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Number of ratings received"
},
"portfolio_url": {
"type": "string",
"format": "uri",
"description": "Link to portfolio or case studies"
},
"availability": {
"type": "string",
"enum": ["available", "busy", "unavailable"],
"default": "available",
"description": "Current availability status"
},
"languages": {
"type": "array",
"items": {
"type": "string",
"enum": ["en", "de", "fr", "es", "it", "nl"]
},
"default": ["en"],
"description": "Languages spoken"
},
"insurance_coverage": {
"type": "boolean",
"description": "Has professional liability insurance"
},
"nda_signed": {
"type": "boolean",
"default": false,
"description": "Has signed platform NDA"
},
"verification_status": {
"type": "string",
"enum": ["pending", "verified", "rejected"],
"default": "pending",
"description": "Background verification status"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": ["id", "type", "email", "specialties", "service_area_km", "hourly_rate"],
"additionalProperties": false
}