# Restaurant reservations

A free, open-source restaurant table booking system built with Next.js, TypeScript and PostgreSQL, for independent restaurants that want their own bookings without a per-cover fee. Guests book on your booking page or a widget on your website and join a waitlist when it is full, and staff run each service from a live floor plan with seat, finish, no-show and walk-ins, with guest profiles, reminders, optional Stripe deposits and reports.

- Framework: Next.js (JavaScript)
- Category: Apps / Booking and scheduling
- Creates: a server app and a PostgreSQL database on the Shared tier (1 GB)
- Plan: Lite or above
- Price: Free
- Author: Light Cloud
- Page: https://templates.light-cloud.com/apps/booking/restaurant-reservations-template
- Updated: 2026-11-21

## Features

- A floor plan of rooms and tables with seats, shape and position, and seats kept for walk-ins never offered online
- Lunch and dinner services with start times, table times, pacing per slot and a cap on covers
- Online booking that gives each party the smallest table that fits, with no double bookings under a per-day database lock
- A booking widget for your own website as a one-line script or an iframe, and a waitlist when a day is full
- A host stand per service with Seat, Finish, no-show, change table, walk-ins, and allergies on every row
- Guest profiles matched by email or phone, with allergies, notes, visits, no-shows and usual party size
- Confirmations and reminders on the guest's booking page or by email with Resend, and Stripe deposits or card holds for large groups
- Reports on covers, no-show rate by party size and source, and table turn times, with WCAG 2.2 AA in light and dark

## What you need

- A paid plan: deploying creates a PostgreSQL database, which the Free plan does not include
- To run it locally: Node.js 22.12 or newer, npm, and Docker for a local PostgreSQL
- No API keys: messages show on the guest's booking page and nobody is asked to pay
- Optional: RESEND_API_KEY and EMAIL_FROM to email confirmations, reminders and cancellations
- Optional: STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET for deposits or card holds on large groups, and CRON_SECRET for a reminder scheduler

## About

Everything a restaurant changes is in the app under Staff: settings and booking rules, the floor plan, services, closures and the booking widget; the demo is Bristol Pasta Kitchen, the same restaurant as the restaurant website template, whose Book a table buttons can point at this app. Every booking goes through one function that takes a PostgreSQL advisory lock for the day and re-checks the table. A booking sits at one table, so there are no joined tables for large groups, and the paid-deposit confirmation was checked by code review against stripe-mock only. Reminders need app traffic or a scheduler calling /api/cron/reminders with CRON_SECRET, the waitlist is not told automatically when a booking is cancelled, the rate limit is per instance, and the image is about 1 GB like its siblings.

## Variables

- `AUTH_SECRET`: generated

## Questions

### How does a restaurant booking system stop double bookings?

Every booking, online or by staff, goes through one function that takes a PostgreSQL advisory lock for that day, re-reads the bookings and checks the table is still free for the whole table time before it writes. A second guest confirming the same table is asked to pick another time.

### Can I add a table booking widget to my restaurant website?

Yes. Paste the one-line script where the form should go and it adds the booking form in a frame that grows to fit, or use the plain iframe for builders that block scripts. Staff, Booking widget shows both snippets with your own address.

### Can a restaurant reservation system take deposits for large groups?

This one can once you set STRIPE_SECRET_KEY. Groups from a size you choose (six by default) either pay a deposit per guest through Stripe Checkout, refunded when they cancel in time, or save a card that is charged a no-show fee only when staff press Charge.

### Does it send booking confirmations and reminders without an email service?

Every confirmation, reminder and cancellation is stored and shown on the guest's private booking page, and listed for staff under Messages. Add RESEND_API_KEY and the same messages are emailed too, with the guest's booking link.

### Can I host this restaurant reservation system without Light Cloud?

Yes. It is a standard Next.js app with no Light Cloud code: any host with Node.js 22.12 and PostgreSQL runs it with npm ci && npm run build and npm start, once DATABASE_URL and AUTH_SECRET are set.
