API · 4 min read ·
Calendar provider abstraction for bookings
- booking
- providers
- abstraction
Problem
Booking UIs often pretend to sync with Google before credentials exist, which breaks trust.
Approach
Define CalendarProvider with getAvailability + createBooking. Default to a mock provider with weekday slots, validation, and duplicate-slot prevention. Swap providers via env later.
Result
Implemented at /book and /api/booking with CALENDAR_PROVIDER=mock.
What I learned
Honest mock providers beat fake “synced” calendars. Generate Google/Outlook links from the confirmed booking only.
Related insights
API · 4 min
Safe demo APIs with validation and rate limits
Portfolios claim API skill without showing a request/response path — or they proxy expensive APIs with no limits.
AI · 4 min
Server-side AI without leaking keys
A portfolio assistant needs an LLM, but putting the API key in the browser would expose it to every visitor.
Keep exploring
Ask the grounded assistant about this decision, or open the lab playground.