Ready-to-run appointments app: services, staff schedules, bookable slots, customer accounts and an admin calendar.
Find a file Use this template
w4c-templates 3491e2d39c
Some checks failed
CI / quality (push) Has been cancelled
chore(template): publish Booking.Nuxt
2026-10-11 23:27:22 +03:00
.github/workflows chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
.w4c chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
app chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
docker chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
prisma chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
public chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
server chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
shared chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
tests chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
.dockerignore chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
.env.example chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
.gitignore chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
eslint.config.mjs chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
nuxt.config.ts chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
package-lock.json chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
package.json chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
README.md chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
tsconfig.json chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00
vitest.config.ts chore(template): publish Booking.Nuxt 2026-10-11 23:27:22 +03:00

Booking / Appointments — Nuxt 3 (templates2)

A ready-to-run appointments app for a service business: browse services, reserve a slot, get a confirmation email + .ics invite, manage your own bookings, and run the day from an admin calendar. It is a fork of templates2.Base.Nuxt and inherits the whole core — auth, roles, Prisma, mock payments/email, an admin shell, SEO, i18n, observability, CI and a Docker image.

Quickstart

npm ci
cp .env.example .env          # SQLite + mock providers by default — no keys needed
npm run db:setup              # prisma db push + seed
npm run dev                   # http://localhost:3000

Demo accounts (seeded): admin@example.com (admin) and user@example.com (customer) — password password.

What works out of the box

  • Services — list + detail with duration and price; managed in the admin panel.
  • Availability & slots — slots are generated server-side from each specialist's working hours in the site timezone; past slots and slots that would double-book a specialist are excluded.
  • Booking flow — service → specialist (optional) → date → slot → details → confirmation, with a mock/log confirmation email and an .ics calendar link (/api/bookings/<id>/ics).
  • Customer account — /account/bookings lists upcoming/past appointments and lets a signed-in customer cancel their own.
  • Admin calendar — /admin/bookings has day/week views, filters, manual booking creation and status transitions (pending → confirmed → completed / cancelled / no-show).
  • Auth & roles — email + password, httpOnly sessions; page guards in server/middleware/guard.ts and API authorization (requireUser, requireAdmin, requireStaff).
  • SEO — per-page metadata, JSON-LD LocalBusiness/Service, sitemap.xml (services included) and robots.txt.
  • Delivery — multi-stage Dockerfile with a healthcheck; CI runs lint + typecheck + unit + build + e2e smoke.

Timezones

Instants are stored in UTC. NUXT_PUBLIC_SITE_TIMEZONE (default UTC) is the IANA zone the business operates in; slots are generated and displayed there. All date/time math uses Intl/Date — no external date library.

Scripts

Script What it does
npm run dev Dev server with HMR
npm run build / npm start Production build / serve .output
npm run lint / npm run typecheck ESLint / nuxt typecheck
npm test Unit tests (Vitest) — slot generation & overlap
npm run test:e2e HTTP end-to-end smoke (server must be running)
npm run db:setup prisma db push + seed

Data model

prisma/schema.prisma: the core (User, Session, Subscription, AuditLog) plus Service, Staff, StaffService, WorkingHour and Booking. SQLite in dev, Postgres in production.

Deployment

docker compose -f docker/docker-compose.yml up --build

Quality

node templates2/qa.mjs Booking.Nuxt

See ../CONTRACT.md for the Definition of Done.