mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 10:51:10 -05:00
2.2 KiB
2.2 KiB
GeocodeService Implementation Prompt
Context
Continue ThrillWiki Laravel+Livewire development, focusing on implementing the GeocodeService for the Location System. The Location model and HasLocation trait are complete, providing the foundation for location management.
Key Memory Bank Files
- memory-bank/activeContext.md - Current progress and next steps
- memory-bank/features/LocationSystem.md - System design and implementation plan
- memory-bank/models/LocationModel.md - Location model documentation
- memory-bank/traits/HasLocation.md - HasLocation trait documentation
Current Progress
- ✅ Created Location model with polymorphic relationships
- ✅ Implemented HasLocation trait
- ✅ Set up location-based queries and calculations
- ✅ Added comprehensive documentation
Next Implementation Steps
-
Create GeocodeService
- API integration
- Address lookup
- Coordinate validation
- Batch processing
- Cache management
-
Implement Location Components
- Map integration
- Location selection
- Search functionality
- Clustering support
Technical Requirements
GeocodeService Features
- Address to coordinates conversion
- Reverse geocoding (coordinates to address)
- Batch geocoding support
- Result caching
- Error handling
- Rate limiting
- Validation
Integration Points
- Location model geocoding methods
- HasLocation trait helpers
- Component integration
- Cache system
Performance Considerations
- Cache geocoding results
- Implement request batching
- Handle API rate limits
- Optimize response storage
Development Guidelines
- Follow Memory Bank documentation practices
- Document technical decisions
- Update activeContext.md after each step
- Create comprehensive service tests
- Consider error handling and edge cases
Project Stack
- Laravel for backend
- Livewire for components
- PostgreSQL for database (with PostGIS extension)
- Memory Bank for documentation
PostgreSQL Spatial Features
- Using PostGIS for spatial operations
- Native coordinate type (POINT)
- Efficient spatial indexing
- Advanced distance calculations
- Geographic vs Geometric types
Continue implementation following established patterns and maintaining comprehensive documentation.