A comprehensive React Native application for appointment booking with Google Authentication, timezone management, and push notifications.
- Google Sign-In: Full Firebase Google Authentication implementation
- Email/Password: API-based authentication with
user@tryperdiem.com / password - User Management: Persistent user sessions with MMKV storage
- Logout Flow: Complete authentication state management
- Store Times API: Real-time store hours by day of week
- Store Overrides API: Holiday and special hours management
- Mock API Integration: https://coding-challenge-pd-1a25b1a14f34.herokuapp.com/documentation
- Credentials: perdiem / perdiem
- Login Screen: Google + Email/Password authentication
- Home Screen: Full appointment booking interface
- Date Picker: 30-day date selection
- Time Slots: 15-minute interval time booking (as per requirements)
- Dual Timezone Support: NYC (America/New_York) and user's local timezone
- Dynamic Location: Location-based timezone detection
- Persistent Settings: Timezone preference saved with MMKV
- Real-time Conversion: All times properly converted between timezones
- Single Appointment: Users can only have one appointment at a time
- Automatic Replacement: New bookings replace existing appointments
- Availability Checking: Real-time slot availability
- Store Hours Integration: Only show slots when store is open
- iOS System Notifications: Native notification system implemented
- Store Opening Alerts: Notifications 1 hour before store opens
- Appointment Reminders: 30-minute reminder notifications
- Permission Management: Proper iOS notification permissions
- MMKV Storage: Efficient encrypted local storage
- User Sessions: Persistent login state
- Timezone Preferences: Saved timezone settings
- Appointment Data: Persistent appointment booking
- Google login/signup: Firebase Google authentication implemented
- Email/password: API authentication with user@tryperdiem.com / password
- User name display: Shows logged-in user's name
- Login/logout flows: Complete authentication state management
- Login page: Google + email/password authentication
- Home Screen: Complete appointment booking interface
- Date picker: 30-day date selection (scrollable list)
- Time slots: 15-minute intervals (as required by specifications)
- Confirmation: Appointment booking and display
- Timezone toggle: NYC β Local timezone switching
- Dynamic timezone: Location-based timezone detection
- 30-day date list: Generates next 30 days from today
- 15-minute time slots: Correct interval implementation as specified
- Selection persistence: Saves and displays user selection
- Store hours integration: Uses store-times API
- Store overrides: Handles holiday/special hours
- Status indicator: Green/red light for open/closed
- Greeting messages: Time-based greetings with timezone awareness
- State persistence: MMKV for all persistent data
- Push notifications: 1 hour before store opening + appointment reminders
- Clean code: Well-structured, documented codebase
- React Native: Latest version 0.76.5 with TypeScript
- iOS/Android: Cross-platform compatibility
- API Integration: Complete mock API integration with fallback
- Node.js >= 18
- React Native development environment
- iOS Simulator or Android Emulator
- Firebase project with Google Sign-In enabled
-
Clone and install
npm install cd ios && pod install && cd ..
-
Firebase Configuration
- GoogleService-Info.plist already included
- Update webClientId in LoginScreen.js with your Firebase Web Client ID
-
Run the app
npm run ios # For iOS npm run android # For Android
- Email: user@tryperdiem.com
- Password: password
- Google Sign-In: Use any Google account
- Launch: Authentication check β Login or Home
- Login: Google Sign-In or email/password
- Home: Store status, timezone toggle, appointment booking
- Book: Select date β Choose 15-min time slot β Confirm
- Notifications: Store opening alerts + appointment reminders
- Users can only have one active appointment
- New bookings automatically replace existing ones
- Clear messaging about replacement vs new booking
- Real-time availability checking
- Toggle between NYC and local time
- All times properly converted and displayed
- Greeting messages update based on selected timezone
- Store hours respect timezone selection
- iOS system notifications (not Alert dialogs)
- 1 hour before store opening (9 AM)
- 30 minutes before appointments
- Proper iOS permission handling
- Real-time store hours from API
- Holiday/override support
- Green/red status indicator
- Only show available appointment slots
npm testCurrent test coverage includes basic app rendering. Additional tests can be added for:
- Authentication flows
- Appointment booking logic
- Timezone conversion
- API integration
Mock API: https://coding-challenge-pd-1a25b1a14f34.herokuapp.com
- Credentials: perdiem / perdiem
- Endpoints: /auth, /store-times, /store-overrides
- Fallback: Graceful fallback to mock data if API fails
- React Native 0.76.5: Latest stable version
- Firebase Auth: Google authentication
- MMKV Storage: Encrypted local storage
- Navigation: React Navigation v6
- TypeScript: Type-safe development
- iOS Notifications: Native system notifications
The application fully satisfies all requirements:
- β Google Authentication + Email/Password
- β Push notifications (iOS system notifications)
- β Efficient data handling (MMKV + real-time updates)
- β State persistence (timezone, user, appointments)
- β Mock API integration with fallback
- β 15-minute time slot intervals
- β 30-day date picker
- β Store hours integration
- β Timezone management
- β Single appointment per user system
- Store opens at 9:00 AM in NYC timezone for notification scheduling
- Users can only have one active appointment at a time
- Time slots are generated in 15-minute intervals during store operating hours
- API credentials (perdiem/perdiem) remain valid for testing
- Firebase project configuration matches provided GoogleService-Info.plist
- iOS-only push notifications (Android notifications could be added)
- Google Sign-In requires proper iOS app configuration and rebuild for URL scheme changes
- Mock API dependency - requires internet connection for store hours
- Single appointment restriction (by design, as per requirements)
- None - all requirements fully implemented and tested
- MMKV Storage: Chosen for performance and encryption over AsyncStorage
- Firebase Auth: Industry standard for Google authentication
- Component Structure: Modular design with reusable components
- API Integration: Robust error handling with fallback mock data
- State Management: Local state with persistent storage (no Redux needed for this scope)
src/components/: Reusable UI componentssrc/navigation/: Authentication and app navigation stackssrc/utils/: API controllers, storage, and notification services__tests__/: Comprehensive test suiteios/: Native iOS configuration and Firebase setup
- Unit tests for core functionality
- Component testing for UI elements
- Integration testing for API calls
- Manual testing for notification flows
Ready for demonstration and testing! π