Skip to content

feat: add advanced project filtering and sorting - #210

Open
samuelelijah585 wants to merge 4 commits into
Lumina-eX:mainfrom
samuelelijah585:fix/reopen-181
Open

feat: add advanced project filtering and sorting#210
samuelelijah585 wants to merge 4 commits into
Lumina-eX:mainfrom
samuelelijah585:fix/reopen-181

Conversation

@samuelelijah585

Copy link
Copy Markdown

Overview

This PR adds an advanced Project Filtering and Sorting system to the project discovery dashboard. Users can now filter by budget range (min/max), project status, and required skill tags, sort results by newest, budget, or deadline, and reset everything with a single clear-all action — with filters persisted in URL query parameters for refreshable and shareable links.

Related Issue

Closes #

Changes

🔍 Advanced Project Filtering & Sorting

  • [MODIFY] app/dashboard/projects/page.tsx

    • Adds client-side filter state synced with URL query parameters (budget min/max, status, required skills, sort).
    • Implements a responsive filter drawer optimized for mobile, with a one-click clear-all-filters action.
    • Adds loading skeletons and an empty-state message when no projects match the active filters.
  • [MODIFY] lib/projects.ts

    • Expands filtering logic: budget range filtering, project status matching, and multi-select required skills.
    • Adds sort options: newest first, budget (asc/desc), and deadline (asc/desc).
  • [MODIFY] app/api/projects/route.ts

    • Accepts filter and sort query parameters, returning properly ordered results.
    • Debounces rapid filter changes to prevent excessive API calls during typing.
  • [MODIFY] components/dashboard/project-card.tsx

    • Displays skill tags and status badges so users can easily see why a project matched their filters.

Verification Results

npm run lint && npm run build
✅ Passed

Live acceptance check:
✅ Responsive filter drawer on mobile
✅ Loading skeleton shown during debounced fetch
✅ Empty state message when no projects match
✅ Filters persist and restore from URL query params
✅ Sorting works consistently (newest, budget asc/desc, deadline asc/desc)
✅ Clear-all resets every filter in one action
Acceptance Criteria Status
Responsive filter drawer on mobile ✅ Collapsible drawer optimized for small screens
Loading states ✅ Skeleton shown while results are fetched
Empty states ✅ Clear messaging when no projects match filters
Debounced search/filter requests ✅ Requests debounced to prevent excessive API calls
Filters persist via URL query parameters ✅ Refreshing or sharing the link restores applied filters
Sorting works consistently ✅ Newest, budget asc/desc, deadline asc/desc ordered correctly

Closes #181

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.

[Feature]: Advanced Project Filtering & Sorting

1 participant