NeoQuarZ:~Archetype
EN ⇄ ES
← Back to projects

Service website & bookings

A booking example for an independent professional.

AstroJavaScript
WEB PROTOTYPE

Choose a service, a future date and a time. The confirmation exists only in this demo; no real appointment is booked.

booking.prototypeLOCAL DEMO
REQUEST PREVIEW

Request summary

Choose a date to create a sample request.

No booking is sent or saved.

View concept code
export function booking(data, min) {
  const duration = { review: 45, planning: 60 }[data.service];
  const match = /^\d{4}-\d{2}-\d{2}$/.test(data.date || '');
  const parsed = new Date(data.date + 'T12:00:00Z');
  if (
    !duration ||
    !match ||
    Number.isNaN(parsed.getTime()) ||
    parsed.toISOString().slice(0, 10) !== data.date ||
    data.date < min ||
    !['09:00', '11:00', '15:00', '17:00'].includes(data.time)
  )
    throw Error('Invalid booking');
  return { ...data, duration, simulated: true };
}

To turn this into a production application

Connect a real calendar, validate availability on the server and send confirmations with consent.

Enquire about a similar solution ↗
NEOQUARZ / ARCHETYPE~/projects/service-web0%