Skip to content

feat: implement advanced filters for artisan search#282

Merged
gabito1451 merged 5 commits into
NOVUS-X:mainfrom
AugistineCreates:feature/advanced-artisan-filters
Apr 28, 2026
Merged

feat: implement advanced filters for artisan search#282
gabito1451 merged 5 commits into
NOVUS-X:mainfrom
AugistineCreates:feature/advanced-artisan-filters

Conversation

@AugistineCreates
Copy link
Copy Markdown
Contributor

This pr closes #232

This PR introduces advanced filtering capabilities to the Artisan Search (Discovery) page. It expands the search functionality to allow users to narrow down their search by multiple specialties, price range, and minimum experience, alongside the existing location, minimum rating, and availability filters.

Changes Included:

  • Frontend (frontend/app/artisans/page.tsx & frontend/lib/api.ts):
    • Redesigned the filter interface from a horizontal bar to a sticky sidebar layout alongside the search results for better usability.
    • Implemented multi-select functionality for specialties using a scrollable checkbox list.
    • Added numeric input fields for Maximum Hourly Rate and Minimum Experience.
    • Wired the new states to the debounced search request, ensuring dynamic result count and card updates as filters are adjusted.
    • Updated the frontend API client (api.ts) to handle sending an array of specialties and the newly introduced parameters.
  • Backend (backend/app/schemas/artisan.py, backend/app/api/v1/endpoints/artisan.py, backend/app/services/artisan.py, backend/app/services/artisan_service.py):
    • Expanded the NearbyArtisansRequest schema to accept max_price, min_experience, and updated specialties to be an array of strings.
    • Updated the /artisans/nearby endpoints to accept and parse the new query parameters.
    • Modified the Redis cache key generation to include max_price and min_experience to prevent cache collision.
    • Enhanced the SQLAlchemy querying logic in ArtisanService to conditionally filter results based on hourly_rate and experience_years.
    • Enforced strict Python Black formatting across all modified backend files with zero syntax or unused import violations.

@gabito1451 gabito1451 merged commit ceafa68 into NOVUS-X:main Apr 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend: Implement Advanced Filters for Artisan Search

2 participants