Skip to content

feat(backend): add combined search and discovery endpoint#320

Merged
Kaylahray merged 1 commit into
geevapp:mainfrom
Ezeh20:feat/discovery-api
Jun 1, 2026
Merged

feat(backend): add combined search and discovery endpoint#320
Kaylahray merged 1 commit into
geevapp:mainfrom
Ezeh20:feat/discovery-api

Conversation

@Ezeh20
Copy link
Copy Markdown

@Ezeh20 Ezeh20 commented Jun 1, 2026

Pull Request Template

Description

Adds a dedicated discovery API that returns combined search results across posts, users, and trending topics in one normalized payload.

Fixes #307

Fixes the discovery API issue for unified search across posts and people.

This change introduces /api/discovery so the frontend can make one request for mixed discovery results instead of stitching together separate post and leaderboard/user calls. It supports query filtering, pagination, and ranking options, and returns a normalized result shape the search UI can render directly without extra reshaping.

It also adds documentation for the endpoint in app/docs/discovery-api.md.


Checklist

  • I have tested my changes locally
  • I have updated documentation as needed
  • I have run npx prisma generate after schema changes
  • I have run npx prisma migrate dev or npx prisma migrate deploy as appropriate

Notes:

  • No Prisma schema changes were made in this PR, so no migration was required.
  • Local verification run:
    • corepack pnpm exec vitest run tests/api/discovery.test.ts
  • Prisma client generation run:
    • npx prisma generate
  • Documentation added:
    • app/docs/discovery-api.md

Post-Merge Steps for Maintainers

If this PR includes changes to the Prisma schema:

  1. Run the following command to apply the migration to your database:

    npx prisma migrate deploy

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Ezeh20 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

@Kaylahray Kaylahray merged commit b12ed81 into geevapp:main Jun 1, 2026
2 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.

[Backend] Add a richer search API for discovery

3 participants