Start a Project
Case Study · Booking System Development

MacaGym booking system development

MacaGym is the gym inside Saffron Hotel in Bratislava, and it also offers massages. Web25 built its booking system as a full-stack Next.js app. Guests book a massage in six steps and five languages. Staff run bookings, services and the team from one admin.

Next.js 16 · React 19 Supabase · PostgreSQL next-intl · 5 languages Resend email macagym.sk ↗
Client
MacaGym · Saffron Hotel Bratislava
Web25’s part
Full-stack web development
UI/UX design
Minerva Visuals
Market
Bratislava, Slovakia
MacaGym logoMassage booking
ENSKCSDEUK

Step 1 of 6 · Type

Choose massage type.

You will choose the length and price in the next step.

Classic massageFull-body, manual
CuppingVacuum cups
Soft tissue techniquesGentle manual work
Manual lymph drainageLight, slow pressure
1 / 6
6steps from massage type to a confirmed booking
5languages: Slovak, Czech, English, German, Ukrainian
7PostgreSQL tables, each with row-level security on
2emails per booking, one to the guest, one to the studio
The brief

Built for guests and the team

MacaGym wanted guests to book a massage online without calling the front desk. The team needed one place to see every booking, give it to a therapist and keep the price list current.

For guests

What the guest gets

  • One question per screen, 6 steps in total
  • Massage, length and price, day and time, then contact details
  • Confirmation email in the language the guest booked in
  • Works on phones, with GDPR consent built in
For the team

What the team gets

  • Add massages with their durations, prices and photos
  • Manage therapists and assign each booking to one
  • Mark bookings completed, cancelled or no-show
  • Every new booking also lands in the studio inbox
Engineering problems

Four things to get right

01

Prices the browser can’t touch

The flow keeps the guest’s choices in the browser between screens. So the server ignores the price it receives and reads the service, duration and price again from the database before it saves anything.

02

Five languages, one codebase

Every screen, the admin and the guest email exist in Slovak, Czech, English, German and Ukrainian. The language lives in a cookie, and the studio picks the default language in its settings.

03

A back office, not a database

Staff should never need the Supabase dashboard. Services, durations, prices, photos, therapists, booking status and business settings all have their own admin screens.

04

Email that can fail safely

The booking is saved first. Emails go out after that, and if one fails the booking stays. The result of each email is stored on the booking, so the team can see what was sent.

How it’s built

Four layers, one job each

The app is a single Next.js project. Pages, server logic and database rules are split so each layer checks what it is responsible for.

UILayer 01 · Booking flow

Six pages, one at a time

Each step is its own App Router page. Choices are saved in local storage, so a refresh or the back button doesn’t lose them.

  • Pages/booking to /confirmation
  • FormsReact Hook Form + Zod
  • DatesPast days and weekends off
  • Times30-minute slots
TSLayer 02 · Server logic

The server checks every save

Server Actions handle the booking and every admin change. Middleware refreshes the login session and keeps the admin behind a sign-in.

  • SavecreateBooking action
  • PriceRead from the database
  • AccessSupabase Auth session
  • Hostsbooking. and app. subdomains
DBLayer 03 · Data and security

Rules that live in PostgreSQL

Foreign keys, check constraints and indexes sit in the schema itself. Row-level security is on for all seven tables. Visitors can only read active services.

  • Tables7, linked by foreign keys
  • ChecksStatus, price, times
  • PoliciesRow Level Security
  • IndexesDate, therapist, status
OPSLayer 04 · Operations

Admin, files and email

The admin covers bookings, services, staff and settings. Photos go to Supabase Storage. Email goes through Resend from the verified macagym.sk domain.

  • RolesAdministrator, therapist
  • CatalogueServices and durations
  • FilesSupabase Storage
  • EmailResend, 2 per booking
The guest’s path

Six screens to a confirmed booking

  1. 01

    Type

    The guest picks a massage. The list comes from the database and only shows active services with at least one active length.

  2. 02

    Length

    Each massage has its own durations and prices, sorted from shortest to longest.

  3. 03

    Date

    A month calendar. Past days and weekends can’t be picked.

  4. 04

    Time

    Slots every 30 minutes between 09:00 and 17:00. A slot only shows if the whole massage ends by 17:00.

  5. 05

    Details

    Name, email, phone, optional notes and GDPR consent. Zod checks every field before the guest can continue.

  6. 06

    Confirm

    The guest checks the summary and submits. The server saves the booking and sends both emails.

Screen recordings

The finished app, on screen

Four short recordings of the live system, from the guest flow to the admin.

01
Guest flow

Picking a massage and length

The first two steps. The guest compares massage types, then sees the durations and prices for the one they picked.

02
Mobile

The same flow on a phone

The length and price step on a phone, with the progress bar on top and the summary bar with Continue at the bottom.

03
Admin · Staff

Managing the team

Adding and editing a team member with a photo, contact details, administrator or therapist type and permission switches.

04
Admin · Bookings

The bookings dashboard

List and calendar views, filters by service and therapist, and the controls for assigning and updating each booking.

Admin and data model

The admin and the tables behind it

The admin is a set of Server Actions on top of seven PostgreSQL tables. Below is the bookings screen, the schema and the exact checks a booking passes before it is saved.

MacaGym · Management dashboardSample data
Bookings · List view
Classic massage · 60 minTherapist assigned
Completed
Cupping · 45 minTherapist assigned
Confirmed
Soft tissue techniques · 30 minNo therapist yet
Unassigned
Manual lymph drainage · 60 minTherapist assigned
Confirmed

Illustration built from the real admin menu and booking statuses. Names and times are made up.

What staff can do

Run the studio from one admin

  • Switch between a list and a month calendar, and filter by service or therapist.
  • Assign a therapist and set the status to confirmed, completed, cancelled or no-show.
  • Add a booking by hand for walk-ins and phone calls.
  • Add massages with several durations and prices, upload a photo, switch a service off.
  • Add staff as administrator or therapist, with a photo and contact details.
  • Set the business name, the notification email and the default language.
Database schema

Seven tables in PostgreSQL

A service has many durations. A booking points to the service, the exact duration and, once assigned, a therapist. Deleting a service that already has bookings is blocked by the database, and the admin tells staff to switch it off instead. The schema also holds tables for therapist working hours and days off. Today the time screen uses fixed hours, Monday to Friday, 09:00 to 17:00.

Entity relationship diagramHover a table to trace its links. On a phone, swipe inside the box.
MacaGym booking database: services, service_variations, bookings, providers, provider_working_hours, availability_exceptions and business_settings 1 → many optional SERVICES iduuidPK nametext slugtextUQ image_urltext is_activebool SERVICE_VARIATIONS iduuidPK service_iduuidFK duration_minutesint pricenumeric is_activebool BOOKINGS iduuidPK service_iduuidFK variation_iduuidFK provider_iduuidFK customer_nametext customer_emailtext booking_datedate start / end_timetime total_pricenumeric statustext gdpr_consentbool *_email_sentbool PROVIDERS iduuidPK nametext emailtext is_adminbool permissionsjsonb is_activebool BUSINESS_SETTINGS business_nametext notification_emailtext default_languagetext timezonetext buffer_minutesint App-wide settings, no links PROVIDER_WORKING_HOURS iduuidPK provider_iduuidFK day_of_week1 to 7 start_timetime end_timetime is_availablebool AVAILABILITY_EXCEPTIONS iduuidPK provider_iduuidFK datedate typetext reasontext type: blocked, custom_available, holiday
services1 → many durations
service_variationsduration + price, unique pair
bookingsservice + duration + therapist
providersadministrator or therapist
Booking verification

What happens on submit

This is the createBooking Server Action, step by step. It runs on the server with a database key the browser never sees. A guest who changes the price in the browser still pays the price stored in the database.

  1. 01
    Guest submits the summaryThe saved choices and contact details go to the Server Action.
  2. ?
    Are all details there?Service, duration, date, time and contact details.
    Stop: missing booking details
  3. ?
    Is it a real database service?Placeholder services from the sample list can’t be booked.
    Stop: not bookable online, refresh and try again
  4. ?
    Are the service and duration active, and do they match?Both are read again from the database.
    Stop: no longer available, choose again
  5. 05
    Take price and duration from the databaseThe end time is worked out on the server from the start time and duration.
  6. ?
    Does PostgreSQL accept the row?Foreign keys and checks: valid status, price not negative, start before end.
    Stop: booking not saved, guest sees an error
  7. 07
    Send two emails through ResendGuest confirmation in the booking language, studio notice in Slovak, sent at the same time.
  8. 08
    Save the email result on the bookingSent or not, plus the last error. A failed email never removes the booking.
  9. ✓
    Booking confirmedThe guest sees the success screen with the booking summary.
Ready-made or custom

When a plugin sets your rules

Booking platforms are fine until your services, prices or team don’t fit their settings screen. Then you work around the tool.

01Off-the-shelf platform

The business bends to the tool

The workflow, the permissions and the booking screens are the same for every customer of that platform.

  • Fixed booking steps
  • Generic staff roles
  • Their branding next to yours
02Custom booking system

The tool fits the business

Services, durations, prices, roles, languages and emails follow how the studio actually works.

  • Steps built for your services
  • Your brand on every screen
  • Changes when you change
Custom booking system developmentNeed a booking system built around how your business works?
Talk about your booking system
The result

What MacaGym runs on today

The system is live at app.macagym.sk, linked from the MacaGym website.

6stepsSelf-service

Booking without a phone call

Guests go from massage type to a confirmed booking on their own, on any screen size.

0pricesServer-checked

Taken from the browser

Duration and price are read on the server for every booking, so nobody can change them in the browser.

5languagesInternational

One app for every guest

Slovak, Czech, English, German and Ukrainian, the confirmation email included.

5admin areasTeam-run

Staff change things themselves

Overview, Bookings, Services, Staff and Settings. Massages, prices, photos and therapists, all from the admin.

2emailsTracked

Every send is recorded

Guest and studio emails per booking. Each booking stores if they went out, and the last error if not.

7tablesLocked down

Row-level security on all

Plus foreign keys, check constraints and a sign-in for the admin.

Next.js 16React 19TypeScript 5Tailwind CSS 4SupabasePostgreSQLRow Level SecuritySupabase AuthSupabase StorageServer Actionsnext-intl 4Zod 4React Hook Form 7Resend
Design partnership UI/UX design by Minerva Visuals

Minerva Visuals designed the booking flow and the admin screens. Web25 built the app behind them, including the database, the server checks, the five-language setup, the admin and the email flow.

See the design case study ↗
Work with us

Need a booking system that fits?

Tell us how your bookings work today. We’ll tell you what a custom system would look like and what it would take to build.

Discuss your project