GlowSimcha
2024 – 2026
Two-sided booking marketplace connecting clients with beauty artists. Framework-free PHP 8.2 API (87 REST endpoints) with a React 19 + TypeScript SPA; Stripe Connect payouts, self-hosted WebSockets, geospatial search on MySQL SPATIAL.
- Client
- Personal product (B2C)
- Role
- Sole engineer — API, SPA, payments, infrastructure
- Platform
- Web
- Period
- 2024 – 2026
- Stack
- PHP 8.2
- MySQL (SPATIAL)
- React 19
- TypeScript (strict)
- Vite
- Tailwind v4
- shadcn/ui
- Stripe Connect
- Workerman WebSockets
- Leaflet / OSM
- Source
- Private repository
87
REST endpoints · 40 migrations · 27 tables
592 → 268 kB
main bundle, −52% gzip
341 + 174
PHPUnit + Vitest tests, CI on every push
In short
I built GlowSimcha, a two-sided booking marketplace where clients can find and book nearby beauty artists for hair, makeup, or nails, pay a deposit or full amount, message the artist, and sync appointments to their calendar, while artists receive payouts through Stripe Connect. As the sole engineer I created a framework-free PHP 8.2 API with 87 REST endpoints, a React 19 + TypeScript single-page app, self-hosted WebSockets, and MySQL SPATIAL geospatial search, and deployed the web platform.
Written by AI from this case study.








Context & constraints
GlowSimcha lets clients find and book beauty artists — hair, makeup, nails — near them, pay a deposit or in full, message the artist, and sync the appointment to their calendar. Artists get paid out through Stripe Connect. It is a marketplace, so every hard problem shows up: payments with two parties, real-time messaging, location search, and refunds that follow a policy.
I built it to prove I could own a full product without a framework doing the thinking for me: every layer from schema to WebSocket server is code I can explain line by line.
Architecture
The back end is a framework-free PHP 8.2 API — PSR-4, service-layer architecture, PDO prepared statements — exposing 87 REST endpoints over 27 tables managed by 40 migrations. The front end is a React 19 + TypeScript (strict) SPA on Vite with Tailwind v4 and shadcn/ui, route-code-split so the main bundle went from 592 to 268 kB gzipped.
Real-time runs on a self-hosted Workerman WebSocket server: live messaging, typing indicators, presence and push notifications, with heartbeats and exponential-backoff reconnect that degrades silently to polling. Discovery uses native MySQL POINT / SRID 4326 columns with a SPATIAL-indexed mirror table and a two-stage bounding-box → ST_Distance_Sphere query; the map is Leaflet over OpenStreetMap with a hand-built, zoom-gated clusterer.
Key decisions
- Stripe Checkout + Connect Express, done properly: signature-verified webhooks, an idempotency ledger so a replayed event can't double-book or double-refund, deposit and full-payment modes, policy-driven refunds, and destination charges with proportional transfer reversal so a partial refund claws back the right share from the artist.
- Self-rolled auth: HS256 JWT in HttpOnly cookies with double-submit CSRF, a per-device session registry and token-version revocation, plus Google OAuth sign-in and SMTP email OTP. Small enough to audit, and it made the security model explicit instead of inherited.
- Spatial mirror table instead of querying the main table: keeps the SPATIAL index narrow and the hot query cheap; the bounding-box pre-filter means ST_Distance_Sphere only runs on candidates.
- Two-way Google Calendar sync with refresh tokens encrypted at rest (libsodium) and per-user timezone handling — the feature users asked for most, and the one with the most ways to leak a secret.
- Operational hygiene from the start: structured JSON logging with correlation IDs, an in-app admin monitoring dashboard, responsive WebP image derivatives with EXIF normalization, and scripted backups with a verified restore drill.
What broke
The first WebSocket implementation assumed the connection stayed up. On mobile networks it didn't, and messages silently vanished. The fix was the reconnect strategy that shipped: heartbeats to detect a dead socket, exponential backoff so a flapping network doesn't hammer the server, and a polling fallback so the conversation keeps working even when the socket never comes back.
Quality
341 PHPUnit tests on the API and 174 Vitest tests on the SPA, run in GitHub Actions on every push. TypeScript strict throughout. Route code-splitting cut the main bundle by 52%. Backups are scripted and the restore has been drilled, not assumed.
What I'd do differently
The framework-free API was the right call for learning and the wrong call for velocity past a certain size. Around the 60-endpoint mark I was maintaining things a framework gives away — request validation plumbing, route grouping, middleware ordering. Next time I'd draw the line earlier: hand-roll the parts that teach (auth, payments, spatial), lean on a framework for the parts that don't.
Evidence
The app is live at glow-simcha.vercel.app. Source is private; the screenshots below are from a test account with seeded artists and bookings, no real clients. Happy to screen-share the payment webhook handling, the spatial query and the WebSocket reconnect logic.
The API skeleton — router, controller, service, repository, PDO, PSR-4 — is public as a starter with the business logic removed.