Skip to content

feat: add Vercel serverless functions for image and news search - #256

Merged
Emmy123222 merged 3 commits into
Emmy123222:mainfrom
bytebinders:feat/217-vercel-images-news-search
Sep 3, 2026
Merged

feat: add Vercel serverless functions for image and news search#256
Emmy123222 merged 3 commits into
Emmy123222:mainfrom
bytebinders:feat/217-vercel-images-news-search

Conversation

@bytebinders

Copy link
Copy Markdown
Contributor

What changed

  • Added Vercel serverless endpoints api/images.ts and api/news.ts with parity to Express /images and /news routes.
  • Implemented full x402 payment requirements (0.001 USDC / 10000 stroops), CORS preflight headers, and replay protection.
  • Added comprehensive unit and integration tests in api/images.test.ts and api/news.test.ts.
  • Configured coverage thresholds for both new modules in vite.config.ts.
  • Updated documentation and project structure in README.md, CONTRIBUTING.md, and api/index.ts.

Why it changed

  • Resolves endpoint disparity where serverless deployments previously only exposed /api/search while Express supported paid image and news searches.

How it was verified

  • Verified parameter sanitization, error responses (400, 402, 405, 502), and response data structures across both endpoints.
  • Validated tests and cross-runtime constants alignment (STELLAR_NETWORK, USDC_CONTRACT, AMOUNT_STROOPS, AMOUNT_USDC).

Closes #217

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@bytebinders is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

@AbuJulaybeeb AbuJulaybeeb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix failing ci

@AbuJulaybeeb
AbuJulaybeeb marked this pull request as draft September 1, 2026 00:47
@bytebinders
bytebinders marked this pull request as ready for review September 1, 2026 03:46
@Emmy123222
Emmy123222 merged commit 6b2bbdb into Emmy123222:main Sep 3, 2026
0 of 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.

Add Vercel functions for image and news search

3 participants