← all logs
· 1 min read
No order gets lost: the Big Spoon dashboard
Order forms that just sent an email could lose a cake. Now every request is saved first, and the email is the second step.
At launch, a cake request was a form that sent an email. If that email failed, the request was simply gone. The customer thought they had ordered a birthday cake, and the bakery had never heard of it.
So I flipped the order around.
Save first, notify second
- The form saves the request to a database (Postgres on Supabase). That save is what the customer gets a confirmation for.
- Only then does a notification go out to the bakery.
- If the notification fails, a background job retries with backoff and the request sits there, visible in the dashboard.
The dashboard itself is a small protected web app where the bakery can see every request and resend a notification on purpose.
The plumbing that ate the day
- Supabase’s transaction pooler doesn’t support prepared statements, so the database driver needed them turned off.
- A separate, server-only database password, so nothing sensitive is anywhere near the front end.
- Sending through the bakery’s own Google Workspace, so emails come from them.
- Fixing the cron job’s host routing so the retries actually ran.
Five small PRs that same evening. It’s boring infrastructure, and it’s the most important thing on the site.
Big Spoon Bakery