AWS Builder Center
Weekend Annoying Task Challenge: ThankYouAI

Weekend Annoying Task Challenge: ThankYouAI

Writing thank-you notes is a small task that's easy to keep putting off. ThankYouAI writes them for you.

Vision & What the App Does

We all owe a thank-you to someone right now. The gift that arrived last week. The recruiter who spent an hour on a call. The friend who helped you move. The note isn't hard to write, it's just easy to keep pushing to "later," and later has a way of becoming never.
ThankYouAI removes that friction. You give it four small things:
  • The occasion — gift, job interview, wedding, professional favor, or your own custom one
  • Who it's for — the recipient
  • What you're thanking them for — the reason
  • The tone — formal, casual, heartfelt, or professional
It writes a personalized note you can send right away. Don't love the first draft? Regenerate it. Want to fix a line? Edit it. Need last month's message? It's saved in your history.
Before: a blank screen and a nagging sense of guilt. After:
Occasion: job interview · Recipient: Priya · Tone: professional
"Hi Priya, thank you so much for taking the time to speak with me on Tuesday. I really enjoyed learning about the team's roadmap, and our conversation made me even more excited about the role. Please don't hesitate to reach out if there's anything else I can share. Thanks again for the opportunity."
A five-minute chore becomes a ten-second task you actually finish.

How I Built It

I built ThankYouAI in TypeScript on Node.js, with one guiding rule: keep it simple. The whole app is four small parts, and only one of them touches the network.
  1. Input validator — confirms you provided the occasion, recipient, and reason, and fills in a default tone (heartfelt) if you skip it.
  1. Message generator — builds a prompt and asks Amazon Bedrock to write the note.
  1. Bedrock client — a thin, swappable wrapper around the AWS SDK.
  1. History store — saves messages to a local JSON file, newest first.
An orchestration layer ties them together in one clean flow: validate → generate → save → return.

Key decisions:

  • Only the generator talks to Bedrock. Everything else, validation, tone defaults, history, editing, is plain, deterministic code. That single boundary meant I could test 90% of the app without ever making a network call.
  • No database. History lives in a local JSON file. Nothing to provision, nothing to pay for when idle. For a weekend project solving a personal annoyance, that's exactly the right amount of engineering.
  • Dependency injection everywhere. The generator and app take their Bedrock client and history store as inputs, so swapping in a mock for tests is trivial.

Challenges and how I overcame them:

  • AI output is unpredictable. You can't assert on exact wording. So I split correctness into two lanes: property-based tests (with fast-check) for the deterministic logic, like "the message is always addressed to the recipient" and "it never exceeds the length limit," and a small set of integration tests for the real Bedrock calls.
  • Models don't respect limits. Bedrock doesn't reliably honor a length cap, so I enforce it in code by trimming the output rather than trusting the prompt.
  • Things fail. Bedrock can time out, throttle, or return empty text. The app treats all of those as failures, returns a clear error, and keeps your original input intact so a retry never loses your work.

AWS Services Used

AWS Service: Amazon Bedrock — generates the message text via the Bedrock Runtime SDK (@aws-sdk/client-bedrock-runtime, InvokeModel), using an Anthropic Claude model.
Tech stack: TypeScript · Node.js · AWS SDK v3 · Vitest · fast-check
How it's triggered: The user submits a request. The app validates the required fields first, if something's missing, it stops right there and never wastes a Bedrock call. If everything checks out, it builds a prompt from the inputs and invokes Amazon Bedrock. Bedrock returns the text, the app shapes it into a finished message (addressed to the recipient, trimmed to the length bound), saves it to local history, and returns it to the user. Credentials are resolved through the standard AWS SDK credential chain, so nothing sensitive lives in the code.

What I Learned

  • Isolating the AI call pays off immediately. Putting Bedrock behind one small interface made most of the app testable offline and kept my feedback loop fast.
  • Property-based testing is a natural fit for AI apps. The unpredictable part is tiny; the logic wrapped around it is deterministic and absolutely worth testing hard.
  • Simple wins. No database, no login, no queue meant I actually shipped over a weekend instead of yak-shaving infrastructure.
  • Never fully trust model output. Enforce constraints like length, non-empty content, and recipient in your own code, not just in the prompt.
  • A spec-first workflow kept me honest. Writing requirements and a design before code meant every module had a clear job and a reason to exist.

Link to Repo

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