Spec a notification fan-out across 4 channels

Vibe codingHard30 minAmazon style

Your task

Your Go platform sends notifications when things happen, such as "order shipped". Each event fans out to the channels a user has turned on: email, SMS, push and in-app. Each channel has its own provider, and users can set quiet hours. An agent will build the fan-out service.

Write the build spec you would hand the agent.

What you know:

  • events arrive on a Kafka topic, and Kafka can deliver the same event twice
  • a notification_prefs table holds each user's channels per event type, quiet hours and time zone
  • SMS costs about 1 cent per message, and the push and email providers have rate limits
  • order and payment notifications must arrive; marketing ones may be dropped

Then, in a few sentences: what does "send notifications to all of the user's channels" get wrong?