
verify_and_settle_view) and feed serving get_active_feed_videos)withAuth, withRole, withMinimumRole)tus-js-client) from the browser directly to Cloudflare Streamverify_and_settle_view — that runs inside a single transaction. Either everything happens, or nothing does. It uses a FOR UPDATE row lock so two concurrent verified views can't race on the same budget, and a partial unique index so the same user cannot be paid twice for the same video — even if the application layer has a bug.SECURITY DEFINER Postgres function that runs as the current user (or anonymous), filters to active campaigns, flags each video with already_verified for that viewer, and sorts verified videos to the bottom rather than hiding them. That way an engaged user never sees an empty feed, but the client knows to skip the quiz overlay on videos they've already earned from — they can keep watching, just not double-earn.UPDATE to INSERT ... ON CONFLICT on the platform-revenue row so revenue accounting can never quietly no-op.SECURITY DEFINER Postgres functions and a fingerprint-keyed anonymous-session table that bridges to a real user on signup. The result: guests can use the product fully, but the database never relaxes its access rules.What the client had to say
Daniel is an amazing developer, he is an expert in his profession. He built my entire platform from start to finish proving that he is skilled in a variety of areas whilst also being hard working and responsive. Got an idea? Pick Daniel
Ryan Sloss, New Realm
May 16, 2026, Client
Posted Apr 9, 2026
Built a Saas ad-tech product where users can watch ads to earn and advertiser get verified viewership against their ads
0
6
Jan 28, 2026 - May 16, 2026
New Realm