Skip to content

Real geo data + payout history (countryCode on purchases, PayoutService) - #6

Merged
saintjanney merged 2 commits into
mainfrom
develop
Jun 23, 2026
Merged

Real geo data + payout history (countryCode on purchases, PayoutService)#6
saintjanney merged 2 commits into
mainfrom
develop

Conversation

@saintjanney

@saintjanney saintjanney commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Two backlog items, both data-derived (no more mock).

  • Reader records countryCode on purchases: the buyer's device region is written with each purchases doc, so the creator dashboard's geographic analytics shows real countries instead of "Unknown".
  • Real payout history: new PayoutService aggregates a creator's purchases into monthly payout records (gross revenue, royalty per the book's royaltyOption, platform share; current month pending, earlier months completed). The settings → Payouts tab uses it instead of mockPayoutData, which is removed. The payout-details modal's per-book block is dropped since payouts are monthly aggregates across books.

Verified locally: creator-hub typechecks, lints (0 errors), and builds. Reader change is small (dart:ui locale); the reader analyze/build gates verify it.

Not included (need manual action / out of scope): archiving the old wolly-creator-hub repo and main branch protection aren't supported by the available GitHub tools (do them in the GitHub UI); the users snake_case/camelCase reconciliation is a live-data migration left for a deliberate, backed-up pass.

- reader: record buyer countryCode (device region) on purchases so the
  creator dashboard's geographic analytics has real data
- creator-hub: add PayoutService that aggregates the creator's purchases into
  monthly payout records (gross revenue, royalty per book's royaltyOption,
  platform share); settings Payout History now uses it instead of mock data
- remove mockPayoutData util and the per-book block in the payout modal
  (payouts are monthly aggregates across books)
Adds PayoutService and the settings/reader edits that belong with the prior
commit (which only captured the mockPayoutData deletion due to a staging slip).
@saintjanney
saintjanney merged commit ae7bd69 into main Jun 23, 2026
5 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.

1 participant