feat: core store locator implementation (dev release) #28

Closed
jmiller wants to merge 3 commits from feature/initial-implementation into main
Owner

Summary

Initial dev release of MokoJoomStoreLocator — a fully functional store locator package for Joomla 4/5.

Component (com_mokojoomstorelocator)

Admin:

  • Location CRUD with FormController/AdminController
  • Tabbed edit form (details, address, coordinates, contact, image)
  • Leaflet coordinate picker (click map to set lat/lng)
  • Locations list with publish/unpublish/delete, search/filter
  • Export to CSV with filter support
  • Import from CSV with geocoding and update-existing options
  • Sample data injection (8 TN locations)
  • Component params for geocoding provider and Google API key

Frontend:

  • Locations list view with Schema.org LocalBusiness markup
  • Single location detail view with embedded map and JSON-LD
  • SEF URL router (alias-based: /store-locator/location-alias)
  • Get Directions links (Google Maps intent)
  • Distance display when radius search active

Geocoding:

  • Nominatim (free, default) and Google Geocoding API
  • Auto-geocode on save when coordinates missing
  • Batch geocoding for imports with rate limiting

Map Module (mod_mokojoomstorelocator_map)

  • Leaflet.js with OpenStreetMap tiles (default, no API key)
  • Google Maps provider (optional, with API key)
  • MarkerCluster plugin for both providers
  • DOM-based popup content (XSS-safe)
  • Auto-fit bounds to show all markers
  • Get Directions link in popups

Search Module (mod_mokojoomstorelocator_search)

  • Text search (title, address, city, postcode)
  • City dropdown filter
  • Radius filter with configurable options (miles/km)
  • "Use My Location" geolocation button with permission handling
  • Haversine formula for distance calculation

Package

  • Auto-enables modules on install
  • PHP 8.1+ and Joomla 4.4+ requirement checks

Closes

Closes #3, #4, #5, #7, #8, #9, #10, #11, #12, #26

Test Plan

  • Install package on clean Joomla 5.x
  • Inject sample data via admin toolbar
  • Verify admin location list with all 8 locations
  • Edit a location, verify coordinate picker works
  • Verify frontend locations list renders with links
  • Verify single location detail page with map
  • Test map module with marker clustering
  • Test search module with radius filter
  • Test "Use My Location" geolocation
  • Export to CSV and re-import
  • Test Google Maps provider switch (if API key available)
## Summary Initial dev release of MokoJoomStoreLocator — a fully functional store locator package for Joomla 4/5. ### Component (com_mokojoomstorelocator) **Admin:** - Location CRUD with FormController/AdminController - Tabbed edit form (details, address, coordinates, contact, image) - Leaflet coordinate picker (click map to set lat/lng) - Locations list with publish/unpublish/delete, search/filter - Export to CSV with filter support - Import from CSV with geocoding and update-existing options - Sample data injection (8 TN locations) - Component params for geocoding provider and Google API key **Frontend:** - Locations list view with Schema.org LocalBusiness markup - Single location detail view with embedded map and JSON-LD - SEF URL router (alias-based: /store-locator/location-alias) - Get Directions links (Google Maps intent) - Distance display when radius search active **Geocoding:** - Nominatim (free, default) and Google Geocoding API - Auto-geocode on save when coordinates missing - Batch geocoding for imports with rate limiting ### Map Module (mod_mokojoomstorelocator_map) - Leaflet.js with OpenStreetMap tiles (default, no API key) - Google Maps provider (optional, with API key) - MarkerCluster plugin for both providers - DOM-based popup content (XSS-safe) - Auto-fit bounds to show all markers - Get Directions link in popups ### Search Module (mod_mokojoomstorelocator_search) - Text search (title, address, city, postcode) - City dropdown filter - Radius filter with configurable options (miles/km) - "Use My Location" geolocation button with permission handling - Haversine formula for distance calculation ### Package - Auto-enables modules on install - PHP 8.1+ and Joomla 4.4+ requirement checks ## Closes Closes #3, #4, #5, #7, #8, #9, #10, #11, #12, #26 ## Test Plan - [ ] Install package on clean Joomla 5.x - [ ] Inject sample data via admin toolbar - [ ] Verify admin location list with all 8 locations - [ ] Edit a location, verify coordinate picker works - [ ] Verify frontend locations list renders with links - [ ] Verify single location detail page with map - [ ] Test map module with marker clustering - [ ] Test search module with radius filter - [ ] Test "Use My Location" geolocation - [ ] Export to CSV and re-import - [ ] Test Google Maps provider switch (if API key available)
jmiller added 3 commits 2026-05-21 20:36:10 +00:00
- LocationTable: alias generation, lat/lng validation, timestamps
- Admin LocationsModel: filters for published, category, search, ordering
- Site LocationsModel: search, city/state filter, Haversine radius search
- Admin list template: render location rows with edit links
- Map module dispatcher: load locations with coordinates for markers
- Search module dispatcher: distinct cities/states, radius options
- Site template: website, hours, image display with Schema.org

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admin:
- LocationController (FormController for save/edit/cancel)
- LocationsController (AdminController for publish/delete/ordering)
- Location edit view with tabbed form and Leaflet coordinate picker
- Component extension implements RouterServiceInterface

Frontend:
- Single location detail view with Schema.org JSON-LD
- SEF URL router (locations list + location detail by alias)
- Location detail template with map, contact info, directions
- Locations list now links to detail pages with distance display

Map module:
- Full Leaflet.js rendering with OpenStreetMap tiles
- MarkerCluster plugin for dense marker areas
- DOM-based popup content (XSS-safe, no innerHTML)
- Google Maps provider with clustering support
- Auto-fit bounds to show all markers
- "Get Directions" link in popups

Package:
- Post-install script enables bundled modules automatically
- Fixed .gitignore to allow src/**/site/ paths

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat(component): implement high-priority issues #8-#12
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 3s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 3s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 4s
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been skipped
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been skipped
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Successful in 16s
dd90c3ee91
Geocoding (#12):
- Geocoder helper with Nominatim (free default) and Google API
- Auto-geocode on save when address present but no coordinates
- Batch geocoding support for imports
- Component params for provider selection and API key

Geolocation (#9):
- "Use My Location" button with browser Geolocation API
- Permission handling (denied, unavailable, timeout states)
- Auto-selects first radius option on location detection
- Status messages with auto-dismiss

Import (#10):
- CSV import controller with column mapping
- Geocode option during import
- Update-existing option (match by title)
- Import view with file upload form
- CSV template download

Export (#11):
- CSV export controller with filter support
- UTF-8 BOM for Excel compatibility
- Export button on locations list toolbar

Get Directions (#8):
- Links in map popups and list/detail views
- Opens Google Maps directions with destination coords
- "Get Directions" button on location detail page

Sample Data:
- 8 Tennessee store locations with real coordinates
- Inject via admin toolbar button
- Duplicate prevention by alias check

Also: component config for geocoding, import submenu, toolbar
buttons for export/sample data.

Authored-by: Moko Consulting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jmiller closed this pull request 2026-05-21 20:36:30 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomStoreLocator#28