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)
42 lines
1.5 KiB
Plaintext
Executable File
42 lines
1.5 KiB
Plaintext
Executable File
-- Script: add_point_properties_and_proximity.cypher
|
|
-- Date: 2025-11-23
|
|
-- Description: Add point properties to existing nodes and create proximity relationships
|
|
|
|
-- Add point properties to Organization nodes
|
|
MATCH (o:Organization)
|
|
WHERE o.latitude IS NOT NULL AND o.longitude IS NOT NULL
|
|
SET o.location = point({latitude: o.latitude, longitude: o.longitude});
|
|
|
|
-- Add point properties to Site nodes
|
|
MATCH (s:Site)
|
|
WHERE s.latitude IS NOT NULL AND s.longitude IS NOT NULL
|
|
SET s.location = point({latitude: s.latitude, longitude: s.longitude});
|
|
|
|
-- Create NEAR relationships for organizations within 5km
|
|
MATCH (o1:Organization), (o2:Organization)
|
|
WHERE o1.id < o2.id
|
|
AND o1.location IS NOT NULL
|
|
AND o2.location IS NOT NULL
|
|
AND point.distance(o1.location, o2.location) < 5000
|
|
CREATE (o1)-[:NEAR {
|
|
distance_m: point.distance(o1.location, o2.location),
|
|
created_at: datetime()
|
|
}]->(o2);
|
|
|
|
-- Create NEAR relationships for sites within 5km
|
|
MATCH (s1:Site), (s2:Site)
|
|
WHERE s1.id < s2.id
|
|
AND s1.location IS NOT NULL
|
|
AND s2.location IS NOT NULL
|
|
AND point.distance(s1.location, s2.location) < 5000
|
|
CREATE (s1)-[:NEAR {
|
|
distance_m: point.distance(s1.location, s2.location),
|
|
created_at: datetime()
|
|
}]->(s2);
|
|
|
|
-- Create SUPPLIES relationships from existing supply chain data (if any JSONB fields contain supplier info)
|
|
-- Note: This would need to be adapted based on actual data structure
|
|
|
|
-- Create COLLABORATES_WITH relationships from existing partnership data
|
|
-- Note: This would need to be adapted based on actual data structure
|