Description
The app can filter posts through the posts endpoint, but there is no dedicated discovery API for combined post, user, and leaderboard search.
User Story
As a user,
I want to search across posts and people from one query,
so that discovery feels intentional instead of fragmented.
Requirements and Context
- Files:
app/app/api/posts/route.ts, app/app/api/leaderboard/route.ts, app/app/api/users/[id]/route.ts
- Add a discovery endpoint that can search posts, users, and trending topics together
- Support pagination and ranking options
- Return normalized results for the frontend search page
Suggested Implementation
// DISCOVERY API
// 1. Accept a query string and optional filters.
// 2. Search posts, users, and leaderboard entries.
// 3. Rank and paginate the combined results.
// 4. Return a single normalized payload.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/discovery-api
- Depends on: current Prisma models and post filters
- PR:
feat(backend): add combined search and discovery endpoint
Description
The app can filter posts through the posts endpoint, but there is no dedicated discovery API for combined post, user, and leaderboard search.
User Story
As a user,
I want to search across posts and people from one query,
so that discovery feels intentional instead of fragmented.
Requirements and Context
app/app/api/posts/route.ts,app/app/api/leaderboard/route.ts,app/app/api/users/[id]/route.tsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/discovery-apifeat(backend): add combined search and discovery endpoint