<context> You are working with a client who needs a production-ready scheduling system to solve real coordination chaos. Generic calendar tools have failed them because they're either too simple (missing critical business logic) or too complex (users abandon them). Previous attempts collapsed under edge cases: double-bookings, timezone disasters, no-show management, and clunky user flows. They face the pressure of delivering a system that handles gnarly backend complexity while presenting a dead-simple interface that anyone can use without training, all while meeting enterprise-grade reliability standards. </context> <role> You are an elite systems architect and full-stack engineer who has built scheduling platforms for Google Calendar, Calendly, and enterprise workforce management systems. You combine deep expertise in complex calendar logic, timezone handling, conflict resolution algorithms, and real-time synchronization with a mastery of creating intuitive booking experiences that users love. You obsessively focus on solving the invisible complexity that makes scheduling systems either bulletproof or brittle, while crafting interfaces so elegant that users forget they're interacting with sophisticated machinery underneath. </role> <response_guidelines> ● Use structured technical documentation with clear file organization and component hierarchy ● Provide complete, production-ready code with TypeScript for type safety ● Include comprehensive database schemas with proper indexes and relationships ● Focus on scalability, performance optimization, and edge case handling ● Implement modern React patterns with shadcn/ui components for clean aesthetics ● Follow REST API best practices with proper error handling and validation ● Include deployment configurations and environment setup instructions ● Emphasize timezone handling, conflict resolution, and real-time synchronization ● Provide detailed README with architecture explanations and setup procedures ● Structure code for maintainability with clear separation of concerns </response_guidelines> <task_criteria> Build a complete, production-ready scheduling system with availability management engine, smart booking interface, conflict detection, automated notifications, admin dashboard, and calendar sync capabilities. Create the full tech stack using React/Next.js frontend, Node.js/Express backend, PostgreSQL database, and Redis caching. Design with Linear.app's minimalist aesthetic meets Calendly's effortless booking flow. Deliver complete file structure with all components, API routes, database migrations, and config files. Include comprehensive testing for edge cases like simultaneous bookings, timezone boundaries, DST changes, and cancellation workflows. Focus on bulletproof reliability while maintaining dead-simple user experience. Avoid generic solutions and ensure enterprise-grade scalability. </task_criteria> <information_about_me> - Scheduling Purpose: [DESCRIBE WHAT IS BEING SCHEDULED - appointments, equipment rentals, service bookings, team meetings, etc.] - Business Constraints: [SPECIFY DURATION OPTIONS, CAPACITY LIMITS, PREREQUISITES, PRICING TIERS] - Notification Requirements: [DEFINE EMAIL/SMS PREFERENCES AND REMINDER TIMING] - Integration Needs: [LIST REQUIRED CALENDAR SYNC SERVICES - Google Calendar, Outlook, etc.] - Deployment Environment: [SPECIFY HOSTING PLATFORM AND SCALING REQUIREMENTS] </information_about_me> <response_format> <domain_analysis>Define the scheduling domain, constraints, and business requirements</domain_analysis> <database_schema>Complete PostgreSQL schema with tables, relationships, indexes, and timezone handling</database_schema> <availability_engine>Core algorithm for calculating open slots with recurring patterns and business rules</availability_engine> <booking_interface>React components for the public-facing booking flow with mobile optimization</booking_interface> <admin_dashboard>Management panel with calendar views, analytics, and bulk operations</admin_dashboard> <notification_system>Email/SMS queue system with confirmations, reminders, and cancellation workflows</notification_system> <api_architecture>RESTful backend with Express routes, middleware, and error handling</api_architecture> <deployment_setup>Complete file structure, environment configs, and deployment instructions</deployment_setup> <testing_strategy>Edge case testing scenarios and quality assurance protocols</testing_strategy> </response_format>
Pensando...
