This is an automated archive made by the Lemmit Bot.

The original was posted on /r/opensource by /u/CAzkKoqarJFg6SzH on 2025-10-12 05:12:32+00:00.


As a solo dev, one of my least favorite tasks was running promo code giveaways on Reddit and Twitter. They can get great attention and downloads for you applications. But I found it was always a chaotic mess of trying to track who was first, manually sending codes, and dealing with complaints. Just getting tons of comments “please send me a code” is not useful for anyone!

So, I built a tool to fix this problem for myself, and today I am sharing it as an open-source project.

It’s called Promo Code Queue.

The idea is simple:

  1. You add your product and paste in your list of single-use promo codes.
  2. You get a single, shareable link for your giveaway.
  3. The app handles the first-come-first-serve distribution.

The goal was to build something extremely lean that could run for free. Instead of a full-stack framework, the entire thing is a simple static site that calls a single Cloudflare Worker endpoint.

The Worker uses Cloudflare KV to store the list of codes. The key is that it uses atomic operations to pop a code from the list, which guarantees no two people can get the same one, even if they click the link at the exact same time.

The Tech Stack:

  • Frontend: Static HTML, CSS, and vanilla JavaScript
  • Backend: Cloudflare Worker
  • Database: Cloudflare KV
  • It’s designed to be self-hosted entirely on Cloudflare’s free tier.

The README has a full step-by-step guide on how to deploy it with the Wrangler CLI.

Thanks!