Skip to content

Add reviewer-safe JSON export for usage and spend analytics #88

Description

@emrekayat

Why this matters

SCF reviewers and investors often ask for proof of usage and spend. A safe JSON export makes it easy to share analytics without leaking raw payment headers, wallet secrets, or provider credentials.

Scope

Add a read-only JSON export path for sanitized usage and spend analytics:

  • total query count;
  • spend by mode/provider;
  • demo-vs-real counts if tracked;
  • payment evidence presence count;
  • generated timestamp;
  • no raw payment header blobs or secrets.

Suggested files:

  • apps/api/src/routes/public.ts
  • apps/api/src/lib/persistence.ts
  • apps/web/src/App.tsx if adding a small download/copy button.

Acceptance criteria

  • Export endpoint returns sanitized JSON only.
  • Empty analytics returns a valid export with zero totals.
  • Tests assert that secret-like fields and raw payment headers are excluded.
  • Optional dashboard button copies/downloads the export without changing query flow.
  • Existing API tests pass.

Wave complexity

High - gives reviewer/investor diligence a clean evidence artifact.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: apiAPI servicearea: dataPersistence and analyticsarea: webWeb and wallet experiencecomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar WaveenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions