Get in touch
← Things I’ve built

Case study · 03

Studio AM

A nail studio where customers design their set before they book.

Role
Solo: design, build, hosting, booking and email
Stack
Astro · TypeScript · GSAP · Three.js · SVG · Cal.diy · Node · resvg · Playwright
Live
studioam.uk ↗
The Studio AM website

The problem

Anna runs a private nail studio from her home in the Isle of Wight countryside. She needed a site that felt as considered as her work, showed the real colours she uses, and let customers plan a design and book a time without a back-and-forth of messages.

The design had to survive the whole trip: from the page, into the booking, into the confirmation email, so Anna and her client both know what’s planned.

Architecture

The configurator is a pure data model plus a pure SVG-string renderer. The design is encoded into a short link code that rides along into the booking page, which prefills the booking notes. When a booking is made, the calendar’s webhook reaches a small mail service that finds the code, renders the same design server-side and sends every booking email itself.

Studio AM data flow. The configurator, built from model.ts and render.ts, encodes the design as a short #d= link code. The /book/ page embeds a self-hosted Cal.diy calendar with the notes prefilled. Cal.diy’s booking webhook reaches design-mailer, which renders the same design with resvg and emails a card and calendar invite to the client and a notice to the organiser.Static site · nginxBooking stack · Docker Compose on the VPS/design/ configuratormodel.ts + render.tsShare link#d=2-… code/book/notes prefilledCal.diyself-hosted + Postgresdesign-mailerwebhook → emailCard rendersame SVG · resvgEmailscard + calendar inviteembedbooking webhooksame render.ts
The design travels as a short code. The same renderer draws it on the page and in the email.

Frontend

  • The preview paints designs onto a photo of real hands. Each nail has a hand-traced outline and a transform, and every design layer (French, aura, swirls, cat-eye, chrome, glazed, jelly, initials) is drawn in the nail’s own coordinates and clipped to it.
  • The photo’s gloss and shadow carry through any colour using two generated light and shade maps laid over the paint, so there are no blend modes and the same SVG renders identically outside a browser.
  • A shade wheel of the studio’s 25 gel colours and 3 builder gels, turned by scrolling or swiping.
  • The estimate comes only from the studio’s price list; anything not on it is “priced on the day”.
  • A Three.js hero and a WebGL liquid background, all calmed for reduced motion. Designed phone-first.

Backend

  • design-mailer receives the calendar’s created, rescheduled and cancelled webhooks and sends every booking email itself (the calendar’s own SMTP is deliberately off): a branded confirmation with an .ics invite for the client, and a notice for the organiser.
  • If the booking notes hold a design code, it renders a 1080×1350 card server-side with resvg and inlines it in both emails.
  • It imports the site’s own config and theme at build time, so the emails always match the site.

Infrastructure

  • The site is a static build in nginx. The calendar (Cal.diy with Postgres) and the mail service run as one Docker Compose stack on the same VPS, which I look after.
  • Booking is one line of config: self-hosted calendar, Square, Fresha or an Instagram fallback, so it can change without a rebuild of the design.

Interesting problems

  1. 01

    One renderer, four outputs

    The same SVG has to look right on the page, on the booking page, as a downloadable PNG and in an email rendered by resvg on the server. resvg only handles plain SVG 1.1, so the renderer avoids CSS variables, colour mixing and blend modes, and lighting is baked into image maps instead.

  2. 02

    Links that survive email

    Design links started as base64 JSON. They’re now a compact versioned code (enums in base 36, colours as hex), small enough for booking notes, with a trailing full stop encoded because email apps cut it off when they turn text into links. Old links still decode.

  3. 03

    Fonts in a headless renderer

    resvg ignored the font buffers it was given and swapped the font for a whole line if one glyph was missing. The mailer converts the site’s fonts to TTF itself and splits text into runs so only the missing glyph falls back.

Outcome

Customers can arrive at an appointment with a design already chosen and an estimate from the real price list, and the booking notes link straight to it. The site, booking calendar and emails all run on infrastructure I look after.