AWS Builder Center
Weekend Creative Challenge: SpillThrill

Weekend Creative Challenge: SpillThrill

A game of Truth and Dare: spill the truth or do the thrilling dare

Engineer @TCS

Vision & what the app does

We have played Truth or Dare as either a kid in a free period with our friends or as adults in parties. Choosing a question was mini-brainstorming session. SpillThrill is a web app that does it for you and the person get a random challenge — a question to answer honestly, or a silly little act to perform. Players unlock core memories, be it over sharing an embarassing moment or a regret or doing something daring over shared laugh and a drink. The rule that makes it fun to play: you never see the same challenge twice until you've genuinely gone through the whole deck. Nothing kills a party game faster than drawing the same card twice in one night, so that constraint became the design anchor for the whole build. The full experience is just three screens — choose, shuffle, reveal — wrapped in a two-tone teal-and-pink theme (Truth vs. Dare) that carries through the buttons, the result card.

How I built it

I started from the constraint: "same challenge should not be viewed twice." That single sentence decided almost every architectural choice downstream.
Decision 1 — where does "already seen" live? I didn't want user accounts or a login just to remember what someone has played, so I kept it dead simple: the browser remembers, using  localStorage . Every time a challenge is shown, its ID gets added to a small list, split by category ( truth  /  dare ). That list gets sent along with every request as  ?exclude=1,7,22,... .
Decision 2 — keep the "no repeat" logic pure and testable. I split the exclusion logic into its own function,  pick_challenge(items, exclude_ids) , with zero AWS dependencies. That let me write real unit tests — including a "play through the entire deck" simulation — and know the core rule actually holds before ever touching the cloud. All 6 tests pass, including the trickiest one: confirming that a full playthrough of a small deck never repeats a card until every card has been drawn, and that the deck then correctly reshuffles.

AWS services used

The web app is serverless and fits comfortably in the AWS Free Tier:
  • Amazon S3 — static web hosting for the frontend
  • API Gateway (HTTP API) — exposes a single  GET /challenge  route
  • AWS Lambda (Python) — reads DynamoDB, applies the no-repeat logic, returns JSON
  • Amazon DynamoDB — two tables,  Truths  and  Dares , each just an  id  and a  text  column to keep track of the truth and dare already shown.

Architecture


The flow: browser loads the static site from S3. When you tap Truth or Dare, it calls the API Gateway endpoint with your already-seen IDs. Lambda scans the relevant table (tiny data set, well within free tier), filters out anything you've seen, and returns one random challenge — flagging a reset if you've exhausted the deck.

Challenges I faced

A challenge I hit mid-build: AWS CloudShell wouldn't cooperate. My original plan was to seed DynamoDB from CloudShell with a quick boto3 script. CloudShell refused to start in my environment due to some verification error, and either of deleting or restarting the environment didn't help. Rather than get stuck, I built a second path: a self-contained "seeder" Lambda function with all the challenges embedded directly in the code. Deploy it once, hit Test in the console, and it batch-writes both tables — no terminal, no CLI, no CloudShell required. That turned out to be the more robust option, since it only depends Lambda console which I was using anyway.

What I learned

  • Constraints are good architecture prompts. "No repeats" sounds like a UI detail, but it's really a state-management decision, and deciding where that state lives (client vs. server) shaped everything else about the design.
  • Separating pure logic from cloud glue pays off immediately. Being able to unit-test  pick_challenge()  without touching AWS meant I caught edge cases (single-item decks, mixed ID types, the reset boundary) before they ever became a live bug.
  • Free tier has more than one way to reach the same result. When CloudShell didn't work, there wasn't just one path forward — a simple Lambda function turned out to be an equally valid way to seed a database.
  • A shared visual language ties a small project together. Reusing the same teal/pink/plum palette across the app UI, the cover image, and the architecture diagram made three separate assets feel like one coherent submission.

Link

Screenshots

GET /challenges type=truth

mobile UI

truth card

dare card

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article