DEV Community

Barberprostudio
Barberprostudio

Posted on

Building a Smart Booking System for Barbershops: Architecture & Tech Stack

Building a Smart Booking System for Barbershops: Architecture & Tech Stack

The Problem Statement

Barbershop owners lose 30-40% of revenue due to no-shows. Why? Manual confirmation processes, lack of customer history, and absence of real-time availability sync.

This article explores the technical architecture behind a booking system designed to solve this using automation, webhooks, and intelligent scheduling.

System Architecture Overview

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│   Mobile    │     │   Web Admin   │     │  WhatsApp   │
│   Client    │────▶│   Dashboard   │◀────│   API       │
└─────────────┘     └──────────────┘     └─────────────┘
       │                    │                     │
       └────────────────────┼─────────────────────┘
                            │
                   ┌────────▼────────┐
                   │   Backend API   │
                   │   (Laravel)     │
                   └────────┬────────┘
                            │
            ┌───────────────┼───────────────┐
            │               │               │
       ┌────▼────┐    ┌────▼─────┐   ┌────▼────┐
       │   DB    │    │  Cache   │   │  Queue  │
       │PostgreSQL    Redis      │   │Redis    │
       └─────────┘    └──────────┘   └────┬────┘
                                          │
                                  ┌───────▼──────┐
                                  │  Background  │
                                  │   Jobs       │
                                  │ (Confirmations)
                                  └──────────────┘
Enter fullscreen mode Exit fullscreen mode

Backend Design Decisions

1. Data Model

-- Core tables
CREATE TABLE customers (
    id UUID PRIMARY KEY,
    name VARCHAR(255),
    phone VARCHAR(20) UNIQUE,
    email VARCHAR(255),
    barbershop_id UUID,
    preferences JSONB,
    created_at TIMESTAMP
);

CREATE TABLE bookings (
    id UUID PRIMARY KEY,
    customer_id UUID,
    barbershop_id UUID,
    barber_id UUID,
    scheduled_at TIMESTAMP,
    duration_minutes INT,
    status ENUM('pending', 'confirmed', 'completed', 'no_show'),
    confirmation_sent_at TIMESTAMP,
    created_at TIMESTAMP
);
Enter fullscreen mode Exit fullscreen mode

2. Confirmation Engine

Goal: Maximize confirmation rate without spam.

Strategy:

  • Send confirmation 48 hours before booking
  • If no response after 24 hours, send second reminder
  • Confirmation via WhatsApp (highest engagement)

API Design

POST /bookings

{
  "customer_id": "uuid",
  "barbershop_id": "uuid",
  "barber_id": "uuid",
  "scheduled_at": "2026-06-25T15:00:00Z",
  "duration_minutes": 30
}
Enter fullscreen mode Exit fullscreen mode

Scaling Considerations

1. Queue Management

At scale (1000+ confirmations/day), use Laravel Horizon to monitor queue health.

2. Database Optimization

  • Index on scheduled_at for range queries
  • Index on status for state-based filtering
  • Partition by barbershop_id if multi-tenant

3. Caching Strategy

Cache available slots with 1-hour TTL for sub-millisecond response times.

Tech Stack

Layer Technology Why
Backend Laravel + PHP Rapid development, excellent queue support
Database PostgreSQL JSONB for flexible customer preferences
Cache Redis Sub-millisecond performance
Queue Redis + Horizon Reliable async job processing
Frontend Vue.js + Tailwind Fast reactive UI

Metrics to Track

  • confirmation_rate: (confirmed / sent) — target 85%+
  • no_show_rate: (no_show / confirmed) — target <15%
  • queue_latency: (time_to_send) — target <5s
  • whatsapp_delivery_rate: — target 98%+

Conclusion

Building a smart booking system isn't about over-engineering. It's about solving real problems:

  1. Reduce no-shows via timely confirmations
  2. Track customer preferences for personalization
  3. Provide real-time availability to clients

The architecture scales from a single barbershop to 100+ locations.

Start simple. Add features as you grow.

Top comments (0)