Gratia Maris
A solo-built production-grade direct reservation system for apartment rentals — product design, architecture, implementation, testing, and delivery by a single developer. Built with Nuxt 4 and Cloudflare Workers. Stripe Checkout processes payments and database-level uniqueness prevents double-booking.
Project facts
- Role
- I owned the complete product lifecycle: requirements, UX, architecture, implementation, testing, and delivery.
- Timeline
- July 2026 · Independent product build
- Team
- Solo project · 1 developer

The Challenge
Apartment booking platforms often rely on application-level locking that fails under concurrent requests. The system needed guaranteed availability without race conditions, plus a full admin dashboard for calendar management and service tasks. The core architectural decision was to enforce uniqueness at the database level rather than adding distributed locks.
Key decision
Use a database UNIQUE constraint as the final availability lock, rather than relying on application-level or distributed locking.
Approach
Built a monorepo with a Nuxt 4 frontend and a Cloudflare Workers API using Hono and Drizzle ORM. The D1 database enforces UNIQUE(apartment_id, night) as the final overbooking lock — a deliberate choice over Redis-based locking for provable correctness under concurrent writes. Stripe webhooks handle the full payment lifecycle, and email events queue gracefully when provider credentials are missing. The admin area uses Cloudflare Access or a cookie fallback.
Key Highlights
- Database-level UNIQUE constraint prevents double-booking race conditions
- Stripe Checkout with verified webhook event handling
- Cloudflare Access or cookie-based admin authentication
- Admin dashboard with reservation calendar and service task management
- Resend email integration with graceful fallback through email_events
Architecture
- Nuxt 4 frontend with Pinia state and PrimeVue components
- Cloudflare Workers + Hono REST API with Drizzle ORM
- D1 SQLite with UNIQUE(apartment_id, night) constraint
- Stripe Checkout sessions with webhook event processing
- Monorepo structure: apps/web, apps/worker, docs
- CI pipeline with D1 guard, typecheck, and Nuxt build
Outcome
A deployable MVP that connects direct reservations to Stripe payments, ready for channel manager integration and production Stripe keys.
Inside the product



