hotel

Hotel booking site with room pools, multi-night date-range reservations and Stripe checkout

hotel payload reserve demo screenshot
1 / 1
hotel payload reserve demo screenshot

Overview

Summary generated from the README

A demo hotel website built with Payload CMS 3 and Next.js 15 using the payload-reserve plugin. It sets up room types with quantities, check-in and check-out date selection, housekeeping buffers and a 48-hour cancellation window. It uses MongoDB, Stripe Checkout, English and French locales via next-intl, and Tailwind CSS v4. Requires Node 20.9 or newer, pnpm, a local MongoDB and the Stripe CLI for webhooks.

Features

  • Quantity-based room pools per room type, such as 40 Classic rooms and 2 Presidential suites
  • Date-range booking flow from room selection to dates to payment
  • Stripe Checkout with a webhook handler for completed sessions
  • Scheduled task that cancels stale unpaid reservations
  • English and French locales through next-intl
  • Seed script with room types, amenities, testimonials and images

Good for

  • Hotel, guesthouse or lodging websites that need multi-night booking
  • Reference for quantity-based, flexible-duration reservations with the payload-reserve plugin
  • Booking sites for rentals sold by date range with online payment

From the author

Grand Hotel — payload-reserve demo: room quantity, multi-night stays, date-range booking

Get started

npx giget@latest gh:elghaied/payloadreserve-demos/apps/hotel my-app

README

Grand Hotel — payload-reserve Demo

Live: hotel.payloadreserve.com

A hotel booking app built with Payload CMS 3.x + Next.js 15 (App Router). Demonstrates quantity-based, flexible-duration booking — multiple rooms of the same type, multi-night stays with date-range selection.

Part of the payload-reserve-demos monorepo.


What This Demo Shows

ConceptImplementation
Quantity-based capacityEach room type has a pool of rooms (e.g., 40 Classic, 2 Presidential)
Flexible-duration bookingGuests pick check-in/check-out dates — not fixed time slots
Housekeeping buffers4–6 hour buffer after checkout before next guest
Long cancellation window48-hour cancellation notice period
No inter-booking bufferdefaultBufferTime: 0 — rooms handle turnover via per-resource buffer

Tech Stack

LayerTechnology
FrameworkNext.js 15 (App Router, React 19)
CMS / APIPayload CMS 3.x
DatabaseMongoDB (via @payloadcms/db-mongodb)
Pluginpayload-reserve
PaymentsStripe Checkout
i18nnext-intl (English + French)
StylingTailwind CSS v4

Prerequisites

  • Node.js >=20.9.0
  • pnpm >=10
  • MongoDB running locally
  • Stripe CLI installed (for webhook forwarding)

Quick Start

# From monorepo root
pnpm install
cp apps/hotel/.env.example apps/hotel/.env   # Fill in your values
cd apps/hotel && pnpm seed                    # Seed sample data
pnpm dev:hotel                                # From root, or: cd apps/hotel && pnpm dev

Project Structure

apps/hotel/src/
├── app/
│   ├── (frontend)/[locale]/        # Public-facing pages
│   │   └── book/                   # Booking flow (room selection → dates → payment)
│   ├── (payload)/                  # Payload admin panel + REST/GraphQL API routes
│   └── api/stripe-webhook/         # Stripe checkout.session.completed handler
├── collections/
│   ├── Users.ts                    # Admin users
│   ├── Media.ts                    # Image uploads
│   ├── Amenities.ts                # Hotel amenities (Pool, Spa, Restaurant, Fitness)
│   ├── Testimonials.ts             # Guest reviews
│   └── Gallery.ts                  # Hotel photo gallery
├── globals/                        # Homepage, SiteSettings
├── seed/
│   ├── index.ts                    # Main seed script
│   ├── room-types.ts               # 5 room types ($189–$1,299/night)
│   ├── rooms.ts                    # Room instances with quantities
│   ├── schedules.ts                # Room availability schedules
│   ├── amenities.ts                # Pool, Spa, Restaurant, Fitness Center
│   ├── testimonials.ts             # Sample guest reviews
│   └── images.ts                   # Hotel exterior, lobby, room photos
├── tasks/
│   └── cancelStaleReservations.ts  # Auto-cancel unpaid bookings
├── i18n/                           # next-intl routing config
├── payload.config.ts               # Main config — plugin, collections, jobs
└── payload-types.ts                # Auto-generated types

Plugin Configuration

payloadReserve({
  slugs: {
    services: 'room-types',
    resources: 'rooms',
    schedules: 'schedules',
    reservations: 'reservations',
  },
  defaultBufferTime: 0,
  cancellationNoticePeriod: 48, // hours
})

payload-reserve Collections

SlugDescription
room-typesRoom categories with price, duration (1 night = 1440 min), flexible duration
roomsIndividual rooms or room pools linked to room types
schedulesAvailability windows per room/room type
reservationsBooking records (guest, room type, check-in/out, status)
customersGuest records (separate from admin users)

Seed Data

Room TypePrice/NightQuantityBuffer After
Classic Room$189404 hours
Superior Room$279254 hours
Deluxe Suite$449155 hours
Executive Suite$74955 hours
Presidential Suite$1,29926 hours

Amenities: Pool, Spa & Wellness, Restaurant, Fitness Center


Commands

# From monorepo root
pnpm dev:hotel          # Start dev server
pnpm build:hotel        # Production build

# From apps/hotel/
pnpm dev                # Start dev server
pnpm devsafe            # Wipe .next cache + dev
pnpm seed               # Seed database
pnpm lint               # Lint

URLs

URLDescription
http://localhost:3002Frontend (defaults to /en)
http://localhost:3002/frFrench locale
http://localhost:3002/adminPayload admin panel
http://localhost:3002/apiPayload REST API

More Business & agency templates

restaurant screenshot

restaurant

Restaurant site with table reservations, dining experiences and party-size bookings

0
v3
Next.js
Updated 2 weeks ago
events screenshot

events

Event ticketing demo with venues, seat capacity and Stripe checkout using the payload-reserve plugin

0
v3
Next.js
Updated 2 weeks ago
salon screenshot

salon

Salon booking site with specialists, schedules, Stripe checkout and English/French support

0
v3
Next.js
Updated 2 weeks ago