
Challenge
Vila Hedvika needed a booking platform that runs itself: real-time availability with zero double-bookings, payments reconciled without manual checking, and guest communication handled end-to-end — all for a single premium property, at minimal running cost. The hard part wasn't a booking form; it was keeping an internal calendar, a shared Google Calendar, a bank account and the guest's inbox in sync automatically.
Solution
As Lead Developer & Architect I built a serverless platform on Next.js 15 (App Router, React 19, edge runtime) deployed on the Cloudflare stack — Pages for the app, a scheduled Worker for automation, D1 (via Drizzle ORM) as the source of truth, and R2 for generated assets.
- Availability & booking calendar: a custom two-month calendar that merges two sources of truth (D1 reservations + a shared Google Calendar) into one live availability view, blocking occupied, past, off-season and short-notice dates. Pricing is computed from real settings (never guessed) with a minimum-stay rule.
- Google Calendar sync: bi-directional sync via a Google Service Account, with JWT (RS256) signed directly in WebCrypto so it runs on the edge without heavy SDKs. Reservations create a
[PENDING]calendar event that's promoted once paid and removed on cancellation — eliminating double-bookings across channels. - Automated guest communication: bilingual (CS/EN) transactional e-mails via Resend for every lifecycle step — booking confirmation (with a QR payment code), payment received, payment reminder, auto-cancellation, cancellation, and an after-stay thank-you with direct links to leave a Google / Firmy.cz review. Confirmation templates are editable by the owner from the admin.
- Bank payment reconciliation: instead of a payment gateway, a scheduled Worker polls the Fio Bank API every 5 minutes, matches incoming transfers to reservations by variable symbol and amount, marks them paid, updates the Google event and fires the "payment received" e-mail. QR payments follow the Czech SPD standard (IBAN + checksum computed on the fly); the bank token is stored AES-GCM encrypted.
- Accommodation settings: an admin area to configure everything without code — nightly price, bank account, season window, minimum lead time, payment-due and cancellation windows, amenities, house rules and the e-mail templates — plus reservations, payments, users/roles, revenue reports and an audit log.
- Live Google & Mapy.cz reviews: a Worker endpoint aggregates Google Places API and Firmy.cz/Mapy.cz reviews into one cached feed shown on the site.
- Deep SEO & AI-SEO:
LodgingBusinessstructured data, canonical + hreflang, sitemap, robots with AI content-signals, and Seznam Webmaster verification — plus an unusual AI layer:llms.txt,Accept: text/markdowncontent negotiation,.well-knownagent discovery and a real MCP server (JSON-RPC) exposingcheck_availability,get_reviewsandget_property_infoto AI assistants.
The whole system self-heals: a daily lifecycle pass sends reminders, auto-cancels unpaid bookings and repairs any calendar drift.
Impact
The platform turned reservation handling into an automated pipeline — availability, payments and guest e-mails run without manual intervention — while running almost entirely within Cloudflare's low-cost tiers. The result is a fast, premium booking experience for guests and near-zero administrative overhead for the owner.
The site is live at vila-hedvika.net; application source code is private.
Gallery
Project Links
Technologies
Featured Projects


