feat(ads): server-driven ad-banner backend, wire & admin console (PR1) #70
Reference in New Issue
Block a user
Delete Branch "feature/ad-network-backend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR1 of 2 for the server-driven advertising banner ("ad network"). This is the backend + admin half; PR2 wires the UI rotation + fade UX and removes the
SHOW_AD_BANNERgate.What's here
internal/ads— campaigns (percent weight 1..100 + optional validity window; a perpetual, undeletable default that fills the remainder up to 100% and drops out at 0), 1..N bilingual messages (en+ru), global display timings.ActiveSetbuilds the window-filtered, default-remainder, GCD-reduced, language-resolved rotation feed. The smooth-weighted-round-robin math is unit-tested.00006(+ jetgen) —ad_campaigns/ad_messages/ad_settings, seeded default campaign + house message + default timings.!paid_account && hint_balance == 0 && !no_bannerrole (new role; guests qualify). The resolved feed ridesprofile.get— no new RPC, works for guests, nothing distinct to filter; message language byservice_language.notifybannersub-kind (re-poll signal) published when an operator grants hints or grants/revokesno_banner, so the client shows/hides the banner in place./_gm/banners(campaign + message CRUD with reorder, default protection) and/_gm/banner-settings(clamped global timings).BannerInfo/BannerCampaignon theProfileFlatBuffers table; the gateway transcode forwards it verbatim._ru), backend README, PRERELEASE tracker row (incl. the deferredapp.loadaggregator note: client↔gateway is h2c/HTTP/2, so bootstrap RPCs already multiplex — revisit only with evidence).Verification (local, all green)
gofmt/go vet; backend + gateway unit tests; full integration suite (-tags=integration, incl. new banner console + profile-eligibility tests); UI codegen idempotent,svelte-check,test:unit(243),build.