2026-01-31 13:15:13 +01:00
# 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)
2026-01-31 13:45:06 +01:00
### v0.1.0 - Core Data Structures (Current)
2026-01-31 13:15:13 +01:00
2026-01-31 13:45:06 +01:00
- [x] Custom Post Type: Buildings
2026-01-31 13:15:13 +01:00
- Meta fields: address, contact, description, images
- Admin columns and filtering
2026-01-31 13:45:06 +01:00
- Gutenberg block for display (planned for Phase 6)
2026-01-31 13:15:13 +01:00
2026-01-31 13:45:06 +01:00
- [x] Custom Post Type: Rooms
2026-01-31 13:15:13 +01:00
- Meta fields: building reference, capacity, amenities, images
- Relationship to Buildings (parent)
- Admin columns with building filter
2026-01-31 13:45:06 +01:00
- Gutenberg block for display (planned for Phase 6)
2026-01-31 13:15:13 +01:00
2026-01-31 13:45:06 +01:00
- [x] Custom Taxonomy: Room Types
2026-01-31 13:15:13 +01:00
- Standard, Suite, Family, Accessible, etc.
- Hierarchical structure
2026-01-31 13:45:06 +01:00
- [x] Custom Taxonomy: Amenities
2026-01-31 13:15:13 +01:00
- WiFi, Parking, Breakfast, etc.
- Non-hierarchical (tags)
2026-01-31 14:10:30 +01:00
## Phase 2: Pricing System (v0.2.0) - Complete
2026-01-31 13:15:13 +01:00
### Pricing Classes
2026-01-31 14:10:30 +01:00
- [x] Short-term pricing (per night, 1-6 nights)
- [x] Mid-term pricing (per week, 1-4 weeks)
- [x] Long-term pricing (per month, 1+ months)
2026-01-31 13:15:13 +01:00
### Price Configuration
2026-01-31 14:10:30 +01:00
- [x] Room-level price settings
- [x] Seasonal pricing periods
- [x] Weekend/weekday differentiation
- [x] Currency formatting and display
2026-01-31 13:15:13 +01:00
### Price Calculation
2026-01-31 14:10:30 +01:00
- [x] Automatic tier detection based on duration
- [x] Price breakdown display
- [x] Discount handling (via seasonal modifiers)
2026-01-31 13:15:13 +01:00
2026-01-31 14:37:48 +01:00
## Phase 3: Booking System (v0.3.0) - Complete
2026-01-31 13:15:13 +01:00
### Custom Post Type: Bookings
2026-01-31 14:37:48 +01:00
- [x] Guest reference
- [x] Room reference
- [x] Check-in/check-out dates
- [x] Status (pending, confirmed, checked-in, checked-out, cancelled)
- [x] Price calculation and storage
- [x] Notes field
2026-01-31 13:15:13 +01:00
### Calendar Integration
2026-01-31 14:37:48 +01:00
- [x] Availability calendar per room
- [x] Availability calendar per building
- [x] Date range picker for bookings
- [x] Conflict detection
2026-01-31 13:15:13 +01:00
### Booking Workflow
2026-01-31 14:37:48 +01:00
- [x] Booking creation (admin)
- [x] Status transitions
- [x] Email notifications
- [x] Booking confirmation
2026-01-31 13:15:13 +01:00
2026-01-31 15:19:56 +01:00
## Phase 4: Guest Management (v0.4.0) - Complete
2026-01-31 13:15:13 +01:00
### Custom Post Type: Guests
2026-01-31 15:19:56 +01:00
- [x] Personal information (name, email, phone)
- [x] Address fields
- [x] ID/Passport information
- [x] Booking history reference
- [x] Notes and preferences
2026-01-31 13:15:13 +01:00
### Privacy & Compliance
2026-01-31 15:19:56 +01:00
- [x] GDPR compliance features
- [x] Data export functionality
- [x] Data deletion on request
- [x] Consent tracking
2026-01-31 13:15:13 +01:00
2026-01-31 15:19:56 +01:00
## Phase 5: Additional Services (v0.5.0) - Complete
2026-01-31 13:15:13 +01:00
### Service Options
2026-01-31 15:19:56 +01:00
- [x] Custom Post Type: Services
- [x] Price per service (or included)
- [x] Per-booking or per-night pricing
- [x] Service categories
2026-01-31 13:15:13 +01:00
### Booking Services
2026-01-31 15:19:56 +01:00
- [x] Service selection during booking
- [x] Automatic price calculation
- [x] Service summary display
2026-01-31 13:15:13 +01:00
Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
- Room search with availability, capacity, room type, amenity, price range, and building filters
- AJAX-powered search with pagination and load more
- Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room]
- Widgets: Similar Rooms, Building Rooms, Availability Calendar
- Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List
- Frontend CSS with responsive design and CSS custom properties
- Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:08:11 +01:00
## Phase 6: Frontend Features (v0.6.0) - Complete
2026-01-31 13:15:13 +01:00
### Search & Filtering
Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
- Room search with availability, capacity, room type, amenity, price range, and building filters
- AJAX-powered search with pagination and load more
- Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room]
- Widgets: Similar Rooms, Building Rooms, Availability Calendar
- Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List
- Frontend CSS with responsive design and CSS custom properties
- Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:08:11 +01:00
- [x] Room search with filters
2026-01-31 13:15:13 +01:00
- Date range (availability)
- Capacity
- Room type
- Amenities
- Price range
- Building
### Display Components
Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
- Room search with availability, capacity, room type, amenity, price range, and building filters
- AJAX-powered search with pagination and load more
- Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room]
- Widgets: Similar Rooms, Building Rooms, Availability Calendar
- Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List
- Frontend CSS with responsive design and CSS custom properties
- Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:08:11 +01:00
- [x] Building list/grid shortcode
- [x] Room list/grid shortcode
- [x] Room detail template
- [x] Availability widget
2026-01-31 13:15:13 +01:00
### Gutenberg Blocks
Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
- Room search with availability, capacity, room type, amenity, price range, and building filters
- AJAX-powered search with pagination and load more
- Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room]
- Widgets: Similar Rooms, Building Rooms, Availability Calendar
- Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List
- Frontend CSS with responsive design and CSS custom properties
- Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:08:11 +01:00
- [x] Building block
- [x] Room block
- [x] Room search block
- [x] Buildings list block
- [x] Rooms list block
2026-01-31 13:15:13 +01:00
### Widgets
Add frontend features with search, shortcodes, widgets, and blocks (v0.6.0)
- Room search with availability, capacity, room type, amenity, price range, and building filters
- AJAX-powered search with pagination and load more
- Shortcodes: [bnb_buildings], [bnb_rooms], [bnb_room_search], [bnb_building], [bnb_room]
- Widgets: Similar Rooms, Building Rooms, Availability Calendar
- Gutenberg blocks: Building, Room, Room Search, Buildings List, Rooms List
- Frontend CSS with responsive design and CSS custom properties
- Frontend JavaScript with SearchForm, CalendarWidget, AvailabilityForm, PriceCalculator
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 14:08:11 +01:00
- [x] Similar rooms widget
- [x] Building rooms widget
- [x] Availability calendar widget
2026-01-31 13:15:13 +01:00
## 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)
2026-02-03 16:02:17 +01:00
## Phase 9: Prometheus Metrics (v0.9.0)
- [ ] Meanigful Metrics for this Plugin, see <https://src.bundespruefstelle.ch/magdev/wp-prometheus/raw/branch/main/README.md> for implementation details
- [ ] Example Grafana-Dashboard, see <https://src.bundespruefstelle.ch/magdev/wp-prometheus/raw/branch/main/README.md> for implementation details
- [ ] Update settings page to enable/disable metrics
2026-01-31 13:15:13 +01:00
## 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
2026-02-03 16:02:17 +01:00
| Version | Focus | Target |
| ------- | ------------------ | -------- |
| 0.0.1 | Initial setup | Complete |
| 0.1.0 | Data structures | Complete |
| 0.2.0 | Pricing | Complete |
| 0.3.0 | Bookings | Complete |
| 0.4.0 | Guests | Complete |
| 0.5.0 | Services | Complete |
| 0.6.0 | Frontend | Complete |
| 0.7.0 | CF7 Integration | TBD |
| 0.8.0 | Dashboard | TBD |
| 0.9.0 | Prometheus Metrics | TBD |
| 1.0.0 | Stable Release | TBD |