Real geo data + payout history (countryCode on purchases, PayoutService) - #6
Merged
Conversation
- 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two backlog items, both data-derived (no more mock).
countryCodeon purchases: the buyer's device region is written with eachpurchasesdoc, so the creator dashboard's geographic analytics shows real countries instead of "Unknown".PayoutServiceaggregates a creator'spurchasesinto monthly payout records (gross revenue, royalty per the book'sroyaltyOption, platform share; current monthpending, earlier monthscompleted). The settings → Payouts tab uses it instead ofmockPayoutData, 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:uilocale); the reader analyze/build gates verify it.Not included (need manual action / out of scope): archiving the old
wolly-creator-hubrepo andmainbranch protection aren't supported by the available GitHub tools (do them in the GitHub UI); theuserssnake_case/camelCase reconciliation is a live-data migration left for a deliberate, backed-up pass.