feat(api): implement privacy-safe paginated analytics endpoint#19
feat(api): implement privacy-safe paginated analytics endpoint#19Samuel-21-eng wants to merge 3 commits into
Conversation
|
@VictorEzenma is attempting to deploy a commit to the emrekayat's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Samuel-21-eng 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! 🚀 |
|
Thanks for opening this for #10. I reviewed the diff and cannot merge it yet. Blocking issues:
Please rebase on latest |
|
Rechecked this for #10 after the latest main updates. It still cannot be merged. The branch is now conflicting with The earlier blockers also still apply: preserve existing shared types, keep aggregate analytics while adding privacy-safe paginated history, classify demo/verified/settled/failed from payment status/evidence rather than query mode, and add tests/docs/dashboard updates for the #10 acceptance criteria. |
|
Rechecked the latest head after the new main merge. I still cannot merge this PR for #10. Command run:
Current blocker: the public route test suite fails at module load with I also noticed two code-quality issues that should be cleaned up while fixing this:
Once the route loads cleanly, please add/keep tests for the issue #10 privacy requirements: no raw query text or scrape URLs, no full payer address, validated limit/cursor behavior, and demo vs settled separation. |
🚀 Overview
Implements a privacy-safe, cursor-paginated analytics engine across the workspace. This updates the backend architecture to securely stream usage logs from the file-based persistence layer (
db.json) while masking sensitive network details before data reaches the client dashboard.🛠️ Key Changes
packages/shared:PrivacySafeAnalyticsRecordandPaginatedAnalyticsResponseto enforce strict consistency between frontend layouts and backend data streams.apps/api (Services):analytics-privacy.tsto securely mask Stellar wallet addresses down to their leading and trailing segments.query-service.tsto cleanly process variable page sizes (limit) and forward pagination references (cursor) against the native storage engine.apps/api (Routes):/api/analyticssummary handler inpublic.tswith an active, asynchronous controller linking query params to our pagination processor.🧪 Verification
npm run typecheck— compilation successful with 0 errors.closes #10