generated from chingu-voyages/voyage-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/35 task api implement event zone search with venue management #36
Open
Morais-C
wants to merge
4
commits into
development
Choose a base branch
from
feature/35-task-api-implement-event-zone-search-with-venue-management
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feature/35 task api implement event zone search with venue management #36
Morais-C
wants to merge
4
commits into
development
from
feature/35-task-api-implement-event-zone-search-with-venue-management
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add Venue model to Prisma schema with basic fields - name, description, address - contact info as JSON (phone, email, website) - images array for venue photos - timestamps - Implement complete CRUD operations for venues - Create venue with validation - Read venue(s) with pagination/sorting - Update venue with partial fields - Delete venue with proper error handling - Add validation using Zod schemas - Input validation for all fields - Query parameter validation - Contact info structure validation - Create venue API endpoints - GET /api/venues - GET /api/venues/:id - POST /api/venues - PATCH /api/venues/:id - PUT /api/venues/:id - DELETE /api/venues/:id - Add test data - Seed three example venues - Include realistic contact info - Add sample image URLs - Update documentation - Add venue endpoints to Postman collection - Document request/response formats - Include example payloads Part of Event Zone Search feature - Step 1/4
- Add coordinates field to Venue model - Store as JSON with lat/lng structure - Add validation for coordinate ranges - Update seed data with real venue coordinates - Implement GeoJSON support - Add GeoJSON types and interfaces - Create new /venues/:id/geojson endpoint - Convert lat/lng to GeoJSON [longitude, latitude] format - Include venue properties in GeoJSON response - Update documentation - Add coordinate validation rules - Document GeoJSON endpoint - Add example responses in both formats - Update Postman collection with new endpoint - Technical decisions - Store coordinates as JSON for Render compatibility - Document future migration path to PostGIS - Implement proper coordinate validation - Follow GeoJSON specification Part of Event Zone Search feature - Step 2/4
- Update Event model with venue relationship - Add venueId field (required) - Create foreign key constraint - Remove redundant location field - Add venue relation field - Enhance Event responses - Include venue details in responses - Add GeoJSON endpoint for events - Handle missing venue cases - Maintain consistent coordinate format - Update validation and types - Add venueId validation - Create EventGeoJSONFeature type - Update EventResponse type with venue - Add proper type casting - Update documentation - Add GeoJSON endpoint examples - Document venue relationship - Update Postman collection - Add error scenarios Technical notes: - Use conditional chaining for optional venue data - Follow GeoJSON specification - Maintain consistent coordinate order (lng/lat) - Handle venue not found errors Part of Event Zone Search feature - Step 3/4
- Add zone search endpoint - GET /api/events/zone with lat/lng/radius parameters - Optional filters for startDate and status - Return events sorted by distance - Include search center and radius in response - Implement geospatial features - Add Haversine formula for distance calculations - Sort results by distance from center - Round distances to 2 decimal places - Handle coordinate transformations - Create realistic test data - Add 6 venues in New York (20km radius) - Add 5 venues in Paris (15km radius) - Add 4 venues in Berlin (10km radius) - Add 2-3 events per venue - Use real-world coordinates - Update documentation - Create zone-search-testing.md guide - Document coordinate formats - Add example requests for each city - Include test scenarios Technical notes: - JavaScript-based distance calculations - GeoJSON FeatureCollection response format - Coordinate validation (-90/90 lat, -180/180 lng) - Maximum radius of 50km Part of Event Zone Search feature - Step 4/4
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Event Zone Search Implementation
Overview
Implementation of geospatial search functionality for live music events, including venue management, location-based queries, and distance calculations.
Changes Made
1. Basic Venue Management
2. Geospatial Capabilities
3. Event-Venue Integration
4. Zone Search Implementation
Technical Details
Testing Instructions
Run migrations (ONLY ON LOCAL SQLITE ENVIRONMENT):
Start the server:
Test zone search:
See zone-search-testing.md for detailed test scenarios
Documentation
Technical Decisions
Future Considerations