Product architecture

How Glowly works

A two-sided marketplace stack with a real-time booking engine, role-based access, commission ledger and referral system — designed for the Balkans.

System overview

Consumer app
  • • React Native · Expo
  • • Personalised home feed
  • • 5-step booking flow
  • • Wallet & referrals
Business dashboard
  • • Next.js (mobile web ready)
  • • Multi-staff calendar
  • • Services & pricing editor
  • • Flash deals + analytics
Backend
  • • Node.js + Supabase Postgres
  • • Realtime slot locking
  • • JWT auth · role-based
  • • Twilio SMS + Expo Push

Booking flow

Browse / Search
Select service & staff
Pick slot
Pay deposit ✓
Slot lock: when a user opens a time slot, a 90-second optimistic lock is placed via Supabase realtime. If payment fails or expires, the lock is released and the slot returns to the pool.

Business rules engine

RuleTriggerAction
Deposit requiredBooking total > €30Charge 20% upfront
No-show feeCustomer absent > 15 minForfeit deposit · flag user
Loyalty stampBooking completed+1 stamp · 10 = €10 credit
Referral creditFriend's first completed booking€5 to both, 90-day expiry
CommissionBooking settled15% to platform ledger
Reminder cadenceConfirmed bookingSMS at T-24h and T-2h

Data model

users
businesses
services
staff
bookings
reviews
vouchers
commission_ledger

Notifications & messaging

Push (Expo)

Confirmations, reminders, flash deals.

SMS (Twilio)

T-24h and T-2h reminders, OTP.

Email

Receipts, payouts, marketing.

Security & access

  • 🔐 JWT auth with refresh rotation
  • 🛡️ Row-level security on all tables
  • 👥 4 roles: customer · business_owner · staff · admin
  • 💳 PCI-compliant payment provider