mz.status
← back to projects
aioperational

AI-assisted booking system for a small service business

#ai#automation#self-hosted

A client management and scheduling tool I built for someone close to me who runs a one-person, appointment-based business — natural-language input instead of forms, on top of a self-hosted stack.

Infrastructure & reliability
  • What's live today didn't start on Vercel — the first version was a self-hosted FastAPI + Postgres + Redis stack in Docker Compose, tunneled out via ngrok from a home computer, so the whole booking system went down whenever that machine was off or the power blipped.
  • Rewrote it as a single Next.js app — API routes and frontend together — deployed on Vercel with Supabase as the managed database, so uptime no longer depends on a home PC; the local Ollama chat model is now the only piece still tied to that machine, reached through its own secured tunnel, same pattern as LifeOS.
  • That rewrite meant redoing auth too: swapped a hand-rolled OAuth flow (raw httpx calls plus itsdangerous-signed cookies) for Auth.js — kept the same email-allowlist trust model, even the same environment variable name for continuity, with far less auth code left to maintain.
  • A GitHub Actions pipeline runs the backend test suite against a disposable Postgres database on every push, since a bug here affects someone else's actual income.
Business features
  • Two-way SMS reminders through a self-hosted gateway running on an actual Android phone's SIM card, instead of a paid per-message API.
  • An AI chat assistant running on a local model, so client names and notes never leave the machine — the harder part was getting tool-calling reliable enough to trust with real bookings.
  • Beyond bookings — client documents with an on-canvas signature saved as a generated PDF, and a business finance view (revenue, costs, per-period totals) kept entirely separate from the owner's personal budget.
  • Prepaid packages and vouchers that draw down over visits, plus a before/after photo log per client — both stored in private Supabase buckets, never public.
  • A product resale ledger — catalog with stock levels and a per-sale record that snapshots cost at the time of sale, so margin stays accurate even after supplier prices change later.
Data & trust
  • A second Supabase + Vercel environment, seeded with realistic-but-fake Polish client data, so this write-up could ship with real screenshots without exposing an actual client's information — its schema migrations apply automatically in CI on every merge, deliberately kept separate from production's manual, reviewed rollout.
Screenshots
Desktop
Mobile

Building something for someone whose income depends on it? I'd like to hear about it.

collaborate →