# Dietbox Notifications — A messaging bill turned into a product constraint.

> An isolated service that meters outbound messaging: a pre-paid send quota per practitioner, a log of every quota change, and a record of every notification sent. Built beside the product rather than inside it, so a cost problem did not become a platform problem.

## Overview

This service exists because of a number on an invoice: the official WhatsApp messaging bill in May 2023. The answer was not a rate limit bolted onto the existing product, but a small domain of its own — a quota, a log of who changed it, and a record of every send.

## Stack

- .NET 6
- C#
- CQRS
- SQL Server
- WhatsApp Business API
- Azure DevOps

## Highlights

- A notify controller and commands to send a notification and to add a practitioner’s limit.
- A nutritionist controller and queries over that practitioner’s current limit and history of sent notifications.
- Three domain models: the notification limit itself, a log of every change to it, and a record of every notification sent.
- A layered service with crosscutting packages for the WhatsApp provider and dependency injection, kept separate from the domain they support.

## Role

Head of Technology · 2023–2024. Closed-source professional work — the write-up describes it without the source.

---

Source: https://felipealmeida.tech/projects/dietbox-notifications
