docs: plan for a self-serve ad network - #1075
Closed
obro79 wants to merge 8608 commits into
Closed
Conversation
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.
Adds
docs/self-serve-ad-network.md— a component-by-component plan for owning the demand side of our own ad slots, so an advertiser can sign up, write a text ad, target it, pay, and have it serve without a salesperson or a third-party network in the path.Docs only. No code changes.
Scope
What the plan is built on
Two systems already exist that this connects:
cli/src/hooks/use-gravity-ad.tsrequests from three providers that the server already normalizes onto oneAdResponseshape. That boundary means a first-party network is one moreAdProvidervalue behind the same contract — no client changes needed to introduce it.common/src/constants/freebuff-ads.tsis a complete self-serve marketplace (advertiser accounts, approval gates, campaign lifecycle, $5-ladder daily budgets, Stripe, admin queue) pointed at social-post boosting. It's roughly 60% of the advertiser-facing work here, and the plan extends that schema rather than standing up a parallel one.What's actually missing: an ad server, a creative/targeting model for text ads, mediation with a floor price, measurement an advertiser will pay for, and invalid-traffic defense on inventory with no browser and no viewport.
Contents
Three things worth arguing about before this merges
GrantType = 'ad'). If first-party demand doesn't clear what the backfill networks net us per placement, launching this quietly cuts user payouts and shortens free sessions. That's why Phase 0 is pure measurement with no product work.freebuff-ads.ts) for what the advertiser sees, but adds an internal eCPM ledger — mediation has to compare our demand against networks that quote in CPM, and without that number the floor price is guesswork.\x1b[inadTextcan rewrite the user's terminal. Enforced server-side on ingest and on serve, with client-side stripping as defence in depth.Unresolved
Prepaid balance vs. the daily-subscription billing the boost marketplace uses. The plan recommends prepaid, but it diverges from existing billing and needs a deliberate call.
Generated by Claude Code