A unified scheduler application that works with various calendar services like Calendly and Cal.com.
The application follows a simple Next.js architecture with API routes:
- Uses React with React Query for state management
- Makes direct API calls to the backend API routes
- Provides a simple interface for selecting slots and booking events
- Next.js API routes handle the integration with calendar services
- The services (CalendlyService, CalService) run server-side, keeping API keys and sensitive logic secure
- API routes return standardized responses to the frontend
- Shared utilities ensure consistent behavior across routes
/api/scheduler/available-events- Get available time slots for a calendar link/api/scheduler/book-event- Book an event with the specified details
The application uses shared utilities to eliminate code duplication:
providers.ts- Contains service provider selection logic and type definitions- Type definitions ensure consistent API responses
CalendlyService- Handles integration with CalendlyCalService- Handles integration with Cal.com
npm install
npm run devVisit http://localhost:3000 to use the application.
- Security: API keys and sensitive logic stay on the server
- Performance: No client-side implementation of complex logic
- Maintainability: Clear separation of concerns and reusable utilities
- Flexibility: Easy to add new calendar service integrations
- Type Safety: Consistent typing across frontend and backend