Booking SaaS Platform

BookUp

Multi-tenant booking & client-management SaaS for service businesses — a Telegram mini-app for owners, a Next.js booking site for customers, and a NestJS/PostgreSQL backend. Integrated Payme payments and Instagram auto-reply automation.

Overview

BookUp started from a simple frustration: small service businesses — barbershops, salons, billiards clubs — were juggling bookings across Telegram chats and paper notebooks. I built an all-in-one platform so an owner can run the whole business from their phone while customers book online in a few taps. It now powers 20+ businesses.

What I built

  • Took it from an empty repo to 20+ paying businesses — owner app, customer booking site, and the backend behind them.

  • Designed wallet-based billing so platform fees are deducted automatically from a prepaid balance — no chasing invoices.

  • Built the Instagram automation that turns comments and DMs into bookings — connecting the owner's account with a single OAuth flow.

  • Defined the pricing model and SaaS billing — tiered plans, per-staff pricing, SMS packs, and an add-ons calculator.

Architecture

Every business gets its own isolated space on a shared platform — multi-tenant — reached via its own subdomain. Owners manage everything from a Telegram mini-app, customers book through a fast Next.js site, and a NestJS/PostgreSQL backend ties it all together. Cloudflare sits in front for edge security.

Under the hood

  • Multi-tenancy at the edge: every request hits Next.js first, which reads the subdomain, validates it, and internally routes to the right tenant — so no tenant can ever stumble into another's data, and onboarding a new business is instant.

  • Prepaid-wallet billing modeled as a ledger of typed transactions — fee deductions, SMS charges, and refunds all happen automatically and stay auditable, so owners always know exactly where their money went.

  • Token-refresh handling that survives flaky connections and double-taps without logging users out — concurrent 401s coalesce into a single refresh round-trip, preventing the reuse-token race that plagues mini-apps.

  • Dual pricing modes — flat-rate or per-hour with peak-window rules — plus resource types for both staff and assets like tables and courts, so one schema models barbershops and billiard clubs without hacks.

What I learned

  • Running my own SaaS taught me the hard part isn't the code — it's billing edge cases and keeping real customers happy when things break.

  • Getting tenant isolation right early made every later feature simpler — one architectural decision that saved weeks of rework.

  • Telegram Mini Apps have quirks that don't show up in docs — auth edge cases, keyboard pop-ups breaking layouts — you only learn them by shipping.

Built with

Frontend (Public Site)

  • Next.js 16
  • React 19
  • TypeScript 5
  • Tailwind CSS 4
  • shadcn/ui
  • Framer Motion
  • GSAP

Frontend (Telegram Mini App)

  • Vite
  • React 18
  • Zustand 5
  • TanStack Query 5
  • @tma.js/sdk-react
  • i18next

Backend

  • NestJS
  • PostgreSQL
  • REST API

Infra & Tools

  • Docker
  • Cloudflare
  • Google Maps API
  • Payme
  • Vitest