Skip to content

feat: add creator analytics endpoint with buy volume and unique buyers - #716

Merged
Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
EmeditWeb:main
Jul 29, 2026
Merged

feat: add creator analytics endpoint with buy volume and unique buyers#716
Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
EmeditWeb:main

Conversation

@EmeditWeb

Copy link
Copy Markdown
Contributor
  • Add GET /api/v1/creators/:id/analytics endpoint protected by requireCreatorProfileOwnership middleware
  • Controller aggregates buy volume (total XLM in stroops) and unique buyer count from the Trade read model
  • Route returns 401 without wallet header; 403 when caller does not own the creator profile; 405 for non-GET methods
  • Integration test covers: three seeded buys producing 1000 XLM volume and 2 unique buyers, zero-state creator, buyer deduplication, and authentication enforcement (401/403)

Closes #708

Summary

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

  • Linked issue or backlog item
  • No secrets or live credentials added
  • Docs updated if setup or env changed
  • Change is scoped to one problem

accesslayerorg#708)

- Add GET /api/v1/creators/:id/analytics endpoint protected by
  requireCreatorProfileOwnership middleware
- Controller aggregates buy volume (total XLM in stroops) and unique
  buyer count from the Trade read model
- Route returns 401 without wallet header; 403 when caller does not
  own the creator profile; 405 for non-GET methods
- Integration test covers: three seeded buys producing 1000 XLM volume
  and 2 unique buyers, zero-state creator, buyer deduplication, and
  authentication enforcement (401/403)

Closes accesslayerorg#708
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Add imports for requireStellarSignature, httpBuyCreatorKey, httpCreatePost,
and httpListPosts in creators.routes.ts that were dropped during a merge.
@Chucks1093
Chucks1093 merged commit 1bae573 into accesslayerorg:main Jul 29, 2026
1 check 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 integration test for the creator analytics endpoint returning correct totals for buy volume and unique buyers

2 participants