0dev.team
← All work

Booking app for web and Telegram, with loyalty and an owner’s panel

Customers pick a service and a time on the website or inside Telegram, earn cashback and catch discounted last-minute slots; the owner runs everything from a panel

Task

An app that works as a website and inside Telegram. A customer picks a service and a free time, sees a personal account and a loyalty tier, earns cashback and gets discounts on last-minute slots. Bookings are synced with Google Calendar. The owner sees and manages every booking from a panel.

How it works

  1. Website and Telegram Mini App in plain JS
  2. Node.js + PostgreSQL
  3. Overlaps forbidden by a database constraint
  4. One cancellation function for all three paths
  5. Sync with Google Calendar

What had to be solved

Two customers could take the same time

Checking whether a slot was free and writing the booking were separate steps, so two simultaneous requests for one time both went through. The ban moved into the database itself: a second active booking for the same time cannot pass by any path.

Commits

  1. 4228f7d21.08.2026the database itself forbids overlapping active bookings
  2. 2fa8c1321.08.2026one cancellation: three paths diverged and lost steps
  3. e2ea14c21.08.2026loyalty: tiers by turnover, bonus lots that expire, cashback after the visit
  4. 506f4aa21.08.2026calendar: when it goes blind, it shouts instead of staying silent
  5. 049c74813.10.2026a “check your spam” hint where the code is expected — customers must not get stuck at sign-in