Inspiration

Independent stylists, barbers, and solo beauty professionals lose significant revenue every time a client fails to show up for a scheduled appointment[cite: 4]. When a three-hour braiding session goes unfilled at 3:15 PM on a Saturday, an entire afternoon of income is wiped out[cite: 4].

Requiring clients to pay the full price upfront scares clients away and creates friction around refunds when rescheduling occurs[cite: 4]. Conversely, taking zero deposits leaves stylists completely defenseless[cite: 4].

SalonDesk Deposits bridges this gap with a fundamental principle: a hold, not a charge[cite: 4].

Clients discover services and book appointments through a conversational AI concierge or real-time voice assistant. Instead of charging money upfront, SalonDesk places a PayPal Orders v2 authorization hold for the service amount. Zero dollars are charged on booking day.

  • If the client shows up: One tap captures the full service price.
  • If the client cancels on time: The authorization is voided immediately, releasing funds with zero fees.
  • If the client no-shows: In one atomic PayPal transaction, code captures only the predefined no-show fee and automatically releases the remaining balance back to the customer.

The captured amount is governed deterministically by our policy engine:

$$ \text{Captured Amount} = \begin{cases} \text{Service Price} & \text{if the client shows up} \ \text{No-Show Fee} & \text{if the client does not show up} \ \$0 & \text{if canceled before the policy cutoff} \end{cases} $$


How We Built It

SalonDesk is built as a full-stack monorepo combining a FastAPI backend (backend/), a Next.js 16 App Router frontend (frontend/), and PostgreSQL with pgvector. The architecture strictly separates AI-generated proposals from deterministic code and PayPal-enforced settlement mechanics—the AI proposes; code and PayPal decide.

1. Conversational RAG & LiveKit Voice Concierge

  • Semantic Discovery (pgvector): Clients search and book in natural language (e.g., "Saturday 3 PM braids with Selam"). Our RAG engine (rag_service.py) performs pgvector semantic similarity search over salon service knowledge chunks and pairs with centralized LLM providers (GroqLLMService, OllamaLLMService, OpenAILLMService).
  • LiveKit WebRTC Voice Assistant: Clients can also interact via bi-directional real-time WebRTC voice powered by a LiveKit worker (agent.py) invoking live @function_tool endpoints.
  • Deterministic Policy Locking: Rather than trusting an LLM with financial math, policy_engine.py locks the exact terms—such as a \(\$120.00\) hold with \(\$30.00\) no-show protection and a free cancellation cutoff window—and binds the client's acceptance into an immutable cryptographic snapshot (BookingReceipt.tsx).

2. Direct Merchant Settlement via PayPal Orders v2 & Payments v2

All money movement operates in Direct Merchant Settlement mode against official PayPal REST APIs (paypal_rest.py):

  • \(\$0\) Authorization Hold: Creates an order via POST /v2/checkout/orders with intent: "AUTHORIZE" and executes buyer approval via POST /v2/checkout/orders/{order_id}/authorize.
  • Atomic Partial & Full Capture: From SettlementDrawer.tsx, marking a client as a Show captures 100% of the service price, while marking a No-Show calls POST /v2/payments/authorizations/{authorization_id}/capture for the \(\$30.00\) fee with final_capture: true, which atomically releases the remaining \(\$90.00\) hold back to the buyer.
  • Lifecycle Reauthorization & Voids: For advance bookings, hold_service.py enforces PayPal's 3-day honor period lock and calls POST /v2/payments/authorizations/{authorization_id}/reauthorize after Day 3 to renew holds up to 21–29 days. Timely cancellations trigger POST /v2/payments/authorizations/{authorization_id}/void for an instant fee-free release.
POST /v2/payments/authorizations/{authorization_id}/capture
PayPal-Request-Id: cap-{hold_id}-{amount}
Content-Type: application/json

{
  "amount": { "currency_code": "USD", "value": "30.00" },
  "final_capture": true
}

Built With

  • ag-grid
  • bryntum-scheduler
  • deepseek
  • docker
  • gemini-api
  • groq
  • javascript-sdk-v6
  • nestjs
  • next.js
  • node.js
  • paypal-agent-toolkit
  • paypal-orders-api
  • paypal-payments-api
  • paypal-webhooks
  • postgresql
  • prisma
  • rest-api
  • tailwind-css
  • telegram-bot-api
  • typescript
  • zod
Share this project:

Updates

Submission history