Skip to content

feat: implement unified search API for projects and contracts (#219) - #234

Open
sagesan2580 wants to merge 1 commit into
Lumina-eX:mainfrom
sagesan2580:feature/search-api-219
Open

sagesan2580 wants to merge 1 commit into
Lumina-eX:mainfrom
sagesan2580:feature/search-api-219

Conversation

@sagesan2580

@sagesan2580 sagesan2580 commented Sep 26, 2026 •

Copy link
Copy Markdown

Summary

Implements a unified search API that allows users to query both projects and contracts with flexible filters as specified in issue.

Features

  • Keyword search — full-text search across project titles, descriptions, tags, and contract terms
  • Status filtering — filter by project/contract status (active, completed, draft, etc.)
  • Budget filtering — support min/max budget ranges for both projects and contracts
  • Date filtering — filter by creation date, deadline, or completion date
  • Pagination — consistent page/limit parameters for scalable results (max 100)
  • Sorting — sort by relevance, budget, date, or status (asc/desc)
  • Type filtering — search projects, contracts, or both
  • Currency filtering — filter by currency

API Endpoint

GET /api/search?q=frontend&status=active&minBudget=1000&maxBudget=5000&page=1&limit=20&sort=budget:desc

Parameters

Parameter Type Description
q string Keyword search (optional)
type enum project, contract, all (default: all)
status string Filter by status
minBudget/maxBudget number Budget range
currency string Currency filter
createdAfter/before ISO date Creation date range
deadlineAfter/before ISO date Project deadline range
completedAfter/before ISO date Completion date range
sort string Field:order (e.g., budget:desc)
page int Page number (default: 1)
limit int Results per page (default: 20, max: 100)

Testing

Added comprehensive unit tests (19 tests) covering:

  • Project search with filters
  • Contract search with filters
  • Freelancer search
  • Client search
  • Pagination and sorting

All tests pass and the build compiles successfully.

Closes: #219

…-eX#219)

- Full-text keyword search across projects (title, description, tags) and contracts (terms)
- Status filtering for projects and contracts
- Budget filtering (min/max) for projects and contracts
- Date filtering: created, deadline, completed
- Pagination with page/limit (max 100)
- Sorting by relevance, budget, date, status
- Type filtering: project, contract, all
- Currency filtering
- Added comprehensive unit tests (19 tests)
@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@sagesan2580 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! 🚀

Learn more about application limits

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]: Contract & Project Search API

1 participant