[{"data":1,"prerenderedAt":41},["ShallowReactive",2],{"blog-post-shipping-a-booking-engine-without-losing-a-night-of-sleep":3,"blog-posts":16},{"id":4,"slug":5,"title":6,"excerpt":7,"tags":8,"published_at":12,"cover_image_url":13,"sort_order":14,"content_html":15},"post-booking-engine-lessons","shipping-a-booking-engine-without-losing-a-night-of-sleep","Shipping a booking engine without losing a night of sleep","What actually keeps a real-time booking engine stable in production: idempotent writes, explicit failure paths, and a checkout you can reason about.",[9,10,11],"booking","architecture","production","2025-11-18T09:00:00.000Z",null,1,"\u003Cp>A booking engine looks simple from the outside: pick a date, pay, get a confirmation. Underneath, it is one of the least forgiving systems you can build. Money moves, inventory is finite, and users retry when they are anxious.\u003C\u002Fp>\n\u003Ch2>Make writes idempotent\u003C\u002Fh2>\n\u003Cp>The single most valuable habit is treating every booking write as something that might arrive twice. Assign an idempotency key the moment a checkout begins, and let the database — not the application — enforce that a key can only produce one reservation.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The user double-clicks \"Pay\" — you charge once.\u003C\u002Fli>\n\u003Cli>The payment gateway retries a webhook — you record it once.\u003C\u002Fli>\n\u003Cli>A mobile connection drops mid-request — the retry is safe.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Give every failure a path\u003C\u002Fh2>\n\u003Cp>Availability checks fail. Gateways time out. The question is never \u003Cem>if\u003C\u002Fem> but \u003Cem>what happens next\u003C\u002Fem>. Every failure in the checkout flow should resolve to a state the user and the operator can both understand:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Pending\u003C\u002Fstrong> — we are waiting on the gateway.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Confirmed\u003C\u002Fstrong> — money captured, inventory held.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Released\u003C\u002Fstrong> — the hold expired and stock returned to the pool.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>Keep the checkout boring\u003C\u002Fh2>\n\u003Cp>Boring is a feature. A checkout you can read top to bottom, with explicit states and no clever shortcuts, is one you can debug at 2am. That is worth more than any micro-optimisation.\u003C\u002Fp>\n\u003Cp>The engine that ships and stays up is almost always the one that made fewer clever choices, not more.\u003C\u002Fp>\n",[17,19,30],{"id":4,"slug":5,"title":6,"excerpt":7,"tags":18,"published_at":12,"cover_image_url":13,"sort_order":14,"reading_minutes":14},[9,10,11],{"id":20,"slug":21,"title":22,"excerpt":23,"tags":24,"published_at":28,"cover_image_url":13,"sort_order":29,"reading_minutes":14},"post-payment-gateways","integrating-payment-gateways-the-calm-way","Integrating payment gateways, the calm way","Midtrans, Xendit, Flywire — every gateway is different, but the integration shape that keeps you sane is always the same.",[25,26,27],"payments","integration","laravel","2025-09-02T09:00:00.000Z",2,{"id":31,"slug":32,"title":33,"excerpt":34,"tags":35,"published_at":39,"cover_image_url":13,"sort_order":40,"reading_minutes":14},"post-vue-nuxt-portfolio","why-i-rebuilt-my-portfolio-in-nuxt","Why I rebuilt my portfolio in Nuxt","A personal site should be fast, accessible, and easy to update. Here is how Nuxt, a tiny design system, and server-side rendering got me there.",[36,37,38],"nuxt","vue","frontend","2025-06-14T09:00:00.000Z",3,1794545129983]