Tasks: Search Revamp & Campground Discovery
Phase 1: Database & Data Layer
- [x] T1.1: Create Alembic migration to add enriched columns, pg_trgm extension, and indexes to the
searchtable. - [x] T1.2: Update
SearchORM model indb/models/search.pywith enriched columns and composable search query builder. - [x] T1.3: Update
BaseProvidersearch statements inproviders/base.pyto populate new columns. - [x] T1.4: Update and verify DB model and provider tests.
Phase 2: Backend Search API & Engine
- [x] T2.1: Implement advanced search algorithm with fuzzy/trigram matching, multi-criteria filters, and geo-distance calculations.
- [x] T2.2: Update
search_routerinbackend/routers/search.pyand schemas inbackend/schemas.py. - [x] T2.3: Generate API types (
task api:generate) and verify contract checks (task api:check). - [x] T2.4: Write backend search tests covering queries, filters, facets, and pagination.
Phase 3: Frontend Search & Explore UI
- [x] T3.1: Create dedicated
/searchroute andSearchPagewith filter sidebar, results grid, and sorting. - [x] T3.2: Integrate campground discovery layout with interactive cards, badges, and filters.
- [x] T3.3: Update
SearchBarto navigate to/search?q=...on Enter while retaining fast autocomplete. - [x] T3.4: Write frontend tests for search page, filter interactions, and URL parameter syncing.
- [x] T3.5: Complete all-results Explore mapping and the existing-map replacement through the mapping follow-up, including grouped-place Details and Monitor actions.
Phase 4: Scan Creation & End-to-End Integration
- [x] T4.1: Connect search result cards directly to
ScanFormwith pre-filled facility data. - [x] T4.2: Add weekend quick-presets and improved date range validation to
ScanForm. - [x] T4.3: Verify all tests (
task test), type checking (task check), and linting (task lint).