feat(projects): add advanced project filtering & sorting (#181) - #231
Merged
SudiptaPaul-31 merged 1 commit intoSep 27, 2026
Conversation
- add project discovery service with query, status, skill, and budget-range filters plus whitelisted sort (newest/budget/deadline) - add GET /api/projects/discover with pagination metadata and structured validation errors - add responsive /projects discovery page with URL-persisted filters, debounced requests, loading skeletons, and empty states - add migration for deadline/skills/category columns and indexes - link Browse Projects from the navbar - add unit tests for param parsing, row mapping, and the endpoint
|
@damispicyGithub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds Advanced Project Filtering & Sorting to project discovery. It introduces a public discovery API and a responsive
/projectspage that lets users filter by budget range, project status, and required skills, sort by newest / budget / deadline, and share or refresh links that preserve the active filters — with debounced requests, loading skeletons, and clear empty states.Related Issue
Closes #181
Changes
🔎 Project Discovery Service
lib/projectDiscovery.ts@>array overlap), and inclusive min/max budget.created_at,budget,deadline× asc/desc) so no caller-controlled value reaches the SQL identifier position.COUNT(*) OVER()with aCOUNTfallback when the requested page is past the end.ProjectDiscoveryErrorcodes.🌐 Discovery API
app/api/projects/discover/route.tsGET /api/projects/discoverreturns{ projects, skills, statuses, pagination }.400with structured errors on invalid params,503on database failure.🖥️ Discovery UI
components/projects/project-discovery.tsxDialog) on mobile.app/projects/page.tsxSuspenseboundary foruseSearchParams.components/navbar.tsx🗄️ Schema
lib/db/migrations/010_project_discovery.sqldeadline,skills, andcategorycolumns plus indexes for budget, deadline, skills (GIN), and status + recency.🧪 Tests
__tests__/api/project-discovery.test.tsVerification Results
Dialogdrawer; desktop keeps a sticky sidebar?q/status/skills/minBudget/maxBudget/sort/order/pageORDER BYfor newest / budget / deadline