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)
52 lines
2.3 KiB
Markdown
52 lines
2.3 KiB
Markdown
# JSON Schemas
|
|
|
|
This directory contains JSON Schema definitions for all entities in the Turash platform.
|
|
|
|
## Core Data Model Schemas
|
|
|
|
- **`business.json`** - Legal/commercial entity representation with contact details, certifications, and strategic profile
|
|
- **`site.json`** - Physical locations/buildings with geographical coordinates, infrastructure, and environmental data
|
|
- **`resource_flow.json`** - Resource inputs/outputs with quality parameters, quantities, costs, and temporal profiles
|
|
- **`shared_asset.json`** - Equipment and infrastructure that can be shared among businesses at specific sites
|
|
|
|
## API Request/Response Schemas
|
|
|
|
- **`match_query_request.json`** - Request schema for finding resource matches with constraints and pagination
|
|
- **`match_response.json`** - Response schema for match results with metadata and compatibility scores
|
|
- **`business_registration.json`** - Schema for new business onboarding with initial sites and resources
|
|
- **`economic_calculation.json`** - Schema for economic viability calculations with NPV, IRR, and payback analysis
|
|
- **`websocket_event.json`** - Schema for real-time WebSocket events (matches, updates, notifications, system status)
|
|
- **`configuration.json`** - Application configuration schema for server, database, cache, and feature flags
|
|
|
|
## Execution Support Schemas
|
|
|
|
- **`match.json`** - Match entity with state management (suggested → negotiating → contracted → live)
|
|
- **`match_packet.json`** - Partner-ready deliverables with technical details, legal templates, and cost calculators
|
|
- **`facilitator.json`** - External engineers and consultants marketplace with specialties, rates, and ratings
|
|
|
|
## Schema Validation
|
|
|
|
All schemas follow JSON Schema Draft 2020-12 and include:
|
|
- Type validation and format constraints
|
|
- Required field specifications
|
|
- String length limits and pattern matching
|
|
- Numeric ranges and enumerations
|
|
- Cross-schema references using `$ref`
|
|
|
|
## Usage
|
|
|
|
These schemas are used for:
|
|
- API request/response validation
|
|
- Database document validation
|
|
- Type-safe code generation
|
|
- Documentation generation
|
|
- Data migration validation
|
|
|
|
## Validation Tools
|
|
|
|
Use these tools to validate data against the schemas:
|
|
- `ajv` (Node.js)
|
|
- `jsonschema` (Python)
|
|
- `gojsonschema` (Go)
|
|
- Online validators at json-schema.org
|