All work

Midwife Dumebi

Birth planning support from an NMC-registered midwife

Booking, payment and calendar fulfilment for a midwife’s private practice — where paying and being booked in are one atomic outcome.

The problem

A routine NHS appointment cannot always make room for the questions that need more time. This is the practice site for one-to-one, non-clinical support with a registered midwife — explicitly alongside NHS care rather than replacing it.

What it does

Visitors browse one-to-one video sessions, packages, digital guides and a subscription, pick a slot from live availability, pay through embedded checkout, and are automatically booked in with a confirmation carrying calendar links. Free guides are gated behind an email capture returning a signed download link.

How it's built

  1. Pay-then-book, driven by payment metadata

    The chosen slot and service are stashed as checkout metadata by a server action; the signature-verified completion webhook then creates the booking, derives calendar URLs and sends both customer and admin email. Payment succeeding and the booking existing are therefore the same event rather than two things that can disagree.

  2. A vision judge with a representation rubric

    Featured images are chosen by scoring candidates against an explicit rubric — whether the image features diverse families, particularly Black mothers — while penalising American-specific healthcare settings and clinical, anxiety-inducing imagery. It is a scoring function, not a generic relevance check.

  3. A topic engine that never runs dry

    A seed list across several categories feeds a daily job; once exhausted it requests a fresh structured batch of long-tail topics, deduplicated inside the prompt against everything already covered.

The hard part

A timezone bug that put slots on the wrong day. The booking provider returns availability bucketed by UTC date while the calendar renders cells in local time, so a Monday 00:00 UTC slot appeared under Sunday during British Summer Time. The fix re-keys every slot on a London-local date before grouping — and the file carries an honest TODO that full visitor-timezone localisation is still outstanding, rather than pretending the general case is solved.

Stack

  • Next.js
  • Sanity
  • Stripe

Built, shipped and maintained by me. Try Midwife Dumebi, or see the rest of the work.