← All projects

Case · Go backend

Appointment booking

Online booking: free slots computed from service duration and working hours, double-booking protection, an admin panel. A fictional studio, demo.

  • Go
  • SQLite
  • Docker

01 · How it looks

Screenshots

Screenshot of the project "Appointment booking" at 1280 pixels wide
Desktop, 1280 px
Screenshot of the project "Appointment booking" on a phone screen, 390 pixels wide
Phone, 390 px

02 · About

What it is and why

Online booking for a fictional studio: the client picks a service, a day within the next two weeks and a free time, and leaves contact details. The owner manages everything in the admin panel.

Slots are computed from the service duration, the working hours of the weekday and the intervals already taken. Double booking is ruled out by a transaction and a unique index.

Limitations

The studio, services and prices are fictional. The admin token comes from ADMIN_TOKEN; if it is not set, one is generated and printed to the log.

What is inside

  • Free slot calculation on a 30-minute grid
  • Overlap check in a transaction plus a partial UNIQUE index in SQLite
  • Admin panel: bookings, services, working hours, closed dates
  • Time zone from an environment variable; tzdata embedded in the binary
  • Tests and Docker

03 · How to run

Run it locally

git clone <repository on request> booking-slots
cd booking-slots
go run .   # http://localhost:8083, admin panel at /admin

04 · Code

The repository is private

The source lives in a private repository. I will grant access on request: write to me and I will send an invitation.

Request the code