# WP BnB Implementation Plan This document outlines the implementation plan for the WP BnB Management plugin. ## Phase 1: Foundation (v0.0.x - v0.1.0) ### v0.0.1 - Initial Setup (Current) - [x] Project structure and configuration files - [x] Composer dependencies (Twig, License Client) - [x] Git submodule for license client - [x] Main plugin file with version checks - [x] Plugin singleton class - [x] License Manager integration - [x] Admin menu and settings pages - [x] CI/CD pipeline for releases - [x] Basic CSS and JS assets - [x] Documentation (README, PLAN, CLAUDE) ### v0.1.0 - Core Data Structures - [ ] Custom Post Type: Buildings - Meta fields: address, contact, description, images - Admin columns and filtering - Gutenberg block for display - [ ] Custom Post Type: Rooms - Meta fields: building reference, capacity, amenities, images - Relationship to Buildings (parent) - Admin columns with building filter - Gutenberg block for display - [ ] Custom Taxonomy: Room Types - Standard, Suite, Family, Accessible, etc. - Hierarchical structure - [ ] Custom Taxonomy: Amenities - WiFi, Parking, Breakfast, etc. - Non-hierarchical (tags) ## Phase 2: Pricing System (v0.2.0) ### Pricing Classes - [ ] Short-term pricing (per night, 1-6 nights) - [ ] Mid-term pricing (per week, 1-4 weeks) - [ ] Long-term pricing (per month, 1+ months) ### Price Configuration - [ ] Room-level price settings - [ ] Seasonal pricing periods - [ ] Weekend/weekday differentiation - [ ] Currency formatting and display ### Price Calculation - [ ] Automatic tier detection based on duration - [ ] Price breakdown display - [ ] Discount handling ## Phase 3: Booking System (v0.3.0) ### Custom Post Type: Bookings - [ ] Guest reference - [ ] Room reference - [ ] Check-in/check-out dates - [ ] Status (pending, confirmed, checked-in, checked-out, cancelled) - [ ] Price calculation and storage - [ ] Notes field ### Calendar Integration - [ ] Availability calendar per room - [ ] Availability calendar per building - [ ] Date range picker for bookings - [ ] Conflict detection ### Booking Workflow - [ ] Booking creation (admin) - [ ] Status transitions - [ ] Email notifications - [ ] Booking confirmation ## Phase 4: Guest Management (v0.4.0) ### Custom Post Type: Guests - [ ] Personal information (name, email, phone) - [ ] Address fields - [ ] ID/Passport information - [ ] Booking history reference - [ ] Notes and preferences ### Privacy & Compliance - [ ] GDPR compliance features - [ ] Data export functionality - [ ] Data deletion on request - [ ] Consent tracking ## Phase 5: Additional Services (v0.5.0) ### Service Options - [ ] Custom Post Type: Services - [ ] Price per service (or included) - [ ] Per-booking or per-night pricing - [ ] Service categories ### Booking Services - [ ] Service selection during booking - [ ] Automatic price calculation - [ ] Service summary display ## Phase 6: Frontend Features (v0.6.0) ### Search & Filtering - [ ] Room search with filters - Date range (availability) - Capacity - Room type - Amenities - Price range - Building ### Display Components - [ ] Building list/grid shortcode - [ ] Room list/grid shortcode - [ ] Room detail template - [ ] Availability widget ### Gutenberg Blocks - [ ] Building block - [ ] Room block - [ ] Room search block - [ ] Booking form block ### Widgets - [ ] Similar rooms widget - [ ] Building rooms widget - [ ] Availability calendar widget ## Phase 7: Contact Form 7 Integration (v0.7.0) ### Booking Request Form - [ ] Custom CF7 tags for rooms/dates - [ ] Form validation - [ ] Booking creation on submission - [ ] Email notifications ### Inquiry Form - [ ] General inquiry handling - [ ] Room-specific inquiries - [ ] Auto-response templates ## Phase 8: Dashboard & Reports (v0.8.0) ### Admin Dashboard - [ ] Occupancy overview - [ ] Upcoming check-ins/check-outs - [ ] Revenue summary - [ ] Quick actions ### Reports - [ ] Occupancy report - [ ] Revenue report - [ ] Guest statistics - [ ] Export functionality (CSV, PDF) ## Future Considerations (v1.0.0+) ### WooCommerce Integration (Optional) - [ ] Payment processing - [ ] Invoice generation - [ ] Order management - [ ] Refund handling ### API Endpoints - [ ] REST API for rooms - [ ] REST API for availability - [ ] REST API for bookings - [ ] Authentication and rate limiting ### Multi-language Support - [ ] Full translation support - [ ] WPML compatibility - [ ] Polylang compatibility ### Advanced Features - [ ] Channel manager integration - [ ] iCal sync - [ ] Automated pricing rules - [ ] Loyalty program support ## Technical Architecture ### Directory Structure ```text wp-bnb/ ├── wp-bnb.php # Main plugin file ├── composer.json # Dependencies ├── src/ # PHP source (PSR-4) │ ├── Plugin.php # Main plugin class │ ├── License/ # License management │ │ └── Manager.php │ ├── PostTypes/ # Custom post types │ │ ├── Building.php │ │ ├── Room.php │ │ ├── Booking.php │ │ ├── Guest.php │ │ └── Service.php │ ├── Taxonomies/ # Custom taxonomies │ │ ├── RoomType.php │ │ └── Amenity.php │ ├── Admin/ # Admin functionality │ │ ├── Dashboard.php │ │ ├── Settings.php │ │ └── MetaBoxes.php │ ├── Frontend/ # Frontend functionality │ │ ├── Shortcodes.php │ │ ├── Widgets.php │ │ └── Search.php │ ├── Blocks/ # Gutenberg blocks │ │ ├── Building.php │ │ ├── Room.php │ │ └── Search.php │ ├── Pricing/ # Pricing logic │ │ ├── Calculator.php │ │ └── PricingTier.php │ ├── Booking/ # Booking logic │ │ ├── Manager.php │ │ ├── Calendar.php │ │ └── Workflow.php │ └── Integration/ # Third-party integrations │ └── CF7.php ├── templates/ # Twig templates │ ├── admin/ │ ├── frontend/ │ └── email/ ├── assets/ # CSS, JS, images │ ├── css/ │ ├── js/ │ └── images/ ├── languages/ # Translation files ├── lib/ # Git submodules │ └── wc-licensed-product-client/ └── vendor/ # Composer dependencies ``` ### Database Tables (Custom) For performance with large datasets, custom tables may be added: - `{prefix}bnb_availability` - Room availability cache - `{prefix}bnb_prices` - Price history and seasonal rates - `{prefix}bnb_booking_services` - Many-to-many booking/service relation ### Hooks and Filters The plugin will provide extensive hooks for customization: - `wp_bnb_before_booking_create` - `wp_bnb_after_booking_create` - `wp_bnb_calculate_price` - `wp_bnb_room_availability` - `wp_bnb_booking_statuses` - `wp_bnb_email_templates` ## Version Milestones | Version | Focus | Target | |---------|-------|--------| | 0.0.1 | Initial setup | Complete | | 0.1.0 | Data structures | TBD | | 0.2.0 | Pricing | TBD | | 0.3.0 | Bookings | TBD | | 0.4.0 | Guests | TBD | | 0.5.0 | Services | TBD | | 0.6.0 | Frontend | TBD | | 0.7.0 | CF7 Integration | TBD | | 0.8.0 | Dashboard | TBD | | 1.0.0 | Stable Release | TBD |