
TeeTimeBot — Automated Tee-Time Booking Assistant
In DevelopmentSole Developer
A scheduled booking assistant that reserves a private golf club member's tee times on his behalf, built around a fixed release deadline and an irreversible action — once a reservation goes through, it is a real booking. A TypeScript service handles authentication, timing, and safety-checked checkout, while a companion Next.js PWA lets the client set his preferences and toggle the bot on and off from his iPhone. It runs on the client's own account and credentials with his consent, reserving only what he is already entitled to book as a member, and reports the outcome of every scheduled run by push notification.
Key Contributions
- Built an offline integration test harness — a mocked reservation API plus a scenario runner covering roughly 15 cases, including a real production incident diagnosed from live logs, reproduced, and turned into a permanent regression test — because the live booking flow can only be exercised against real reservations.
- Implemented safety invariants throughout the checkout pipeline: a hard configuration gate that runs the full flow in dry-run mode and logs exactly what it would have sent, a rule that the cart must hold exactly one item immediately before checkout, and mandatory cart re-reads after any operation that could silently alter its state.
- Built a multi-stage HTTP automation service in TypeScript that signs in with the client's own club credentials, bridges an SSO handoff to the club's third-party reservation platform, and completes a full availability search → cart → checkout flow using a custom cookie-jar implementation for session continuity across roughly 10 chained requests.
- Engineered the run around a fixed release deadline, since availability is short-lived once bookings open: connections are kept warm ahead of the window, the service synchronizes to the server's clock by sampling its response timestamps (accurate to tens of milliseconds), and a hedged parallel request keeps a single slow response from costing the run.
- Designed DST-safe scheduling logic that runs on a fixed-UTC cron job but computes the correct Eastern-time wake moment year-round using calendar-date arithmetic rather than host-clock arithmetic.
- Built a mobile-first Next.js 16 (App Router) + React 19 PWA with JWT-based session auth (signed httpOnly cookies), a debounced autosaving settings form for booking preferences, and MongoDB-backed configuration shared directly with the automation service.
- Integrated real-time push notifications (ntfy.sh) so the client gets an outcome summary — booked, no matching availability, or error — after every scheduled run, without needing to open the app.
Technologies
- TypeScript & Node.js
- Next.js 16 (App Router) & React 19
- MongoDB Atlas
- Tailwind CSS
- PWA (@ducanh2912/next-pwa)
- JWT Auth (jose)
- Scheduled Cron Jobs (Render)
- Vercel
- ntfy.sh (Push Notifications)