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, Next.js App Router and MongoDB, using the payload-reserve plugin for reservations. Room types have quantity pools, and guests choose check-in and check-out dates. Payments run through Stripe Checkout, and the frontend is available in English and French. It requires a local MongoDB, Stripe CLI for webhooks, Node 20.9 or later and pnpm.

Features

  • Room types with quantity pools and per-room housekeeping buffers
  • Date-range booking flow from room selection to payment
  • Stripe Checkout with a webhook handler for completed sessions
  • Scheduled task that cancels stale unpaid reservations
  • English and French frontend routing with next-intl
  • Seed script with room types, amenities, testimonials and images

Good for

  • Building a hotel or guesthouse site with online room reservations
  • Learning quantity-based, multi-night booking with the payload-reserve plugin
  • Starting a booking site for any rentable resource priced per night

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
Claim this template

More Business & agency templates

restaurant screenshot

restaurant

Restaurant reservation site with party-size bookings, dining experiences, and Stripe checkout

0
v3
Next.js
Updated 2 months ago
events screenshot

events

Event ticketing and venue booking app built on Payload, Next.js and the payload-reserve plugin

0
v3
Next.js
Updated 2 months ago
salon screenshot

salon

Salon booking app with specialists, schedules, Stripe payments and English and French localization

0
v3
Next.js
Updated 2 months ago