Reliability for high-risk clinic operations, paired with a fast marketing site whose CMS-driven content stays fresh without abandoning caching.
Hayyu is a multi-branch clinic platform where a successful payment can affect orders, invoices, service records, loyalty points, inventory, and notifications. To avoid duplicate settlement and provider timeouts, the payment callback is kept lightweight: it validates the request, records an idempotent queue item, returns quickly, and lets a worker process the payment transactionally.
On the customer-acquisition side, the Hayyu landing page uses Next.js caching and CMS content for treatments, promotions, articles, doctors, and branches. A separate MySQL binlog/CDC listener resolves which cache tags are affected by operational changes and triggers targeted revalidation, keeping content fresh without globally purging the site.
Payments and inventory are both operational points where a timeout or duplicate request can create a hard-to-reconcile result. The design separates the provider callback and the user-facing checkout from longer-running work, while preserving idempotency, row-level coordination, retries, and an audit trail. A similar separation is used for the marketing site: operational changes are translated into targeted cache invalidation so content can be fresh without giving up the performance benefits of ISR.