DIY Set Feature - Quick Reference Summary
What is DIY Set?
A flexible booking system that allows customers to customize group packages by selecting quantities from different menu categories instead of using fixed packages.
📊 15 Main Tasks Breakdown
🔥 PHASE 1: FOUNDATION (High Priority)
Task 1: Database Schema Design [6 subtasks]
Task 2: Package Management Service [7 subtasks]
Task 3: Basic Pricing Calculator [6 subtasks]
Task 4: Admin Dashboard Interface [8 subtasks]
Task 5: Client-Side Package Display [7 subtasks]
Task 6: Basic DIY Booking Flow [6 subtasks]
⚡ PHASE 2: ENHANCED FEATURES (Medium Priority)
Task 7: Spending Tier Discount System [7 subtasks]
Task 8: Enhanced Admin Dashboard [7 subtasks]
Task 9: Partner Portal Integration [7 subtasks]
Task 10: Enhanced Client Interface [7 subtasks]
Task 11: Menu System Integration [7 subtasks]
Task 12: Email Templates & Confirmation [7 subtasks]
🚀 PHASE 3: POLISH & OPTIMIZATION (Low Priority)
Task 13: Advanced Reporting Features [7 subtasks]
Task 14: Mobile App Implementation [7 subtasks]
Task 15: Performance & Analytics [7 subtasks]
🔗 Key Dependencies Chain
Task 1 → Task 2 → Task 3 → Task 4 → Task 6
↘ ↘ ↘ ↘
Task 5 Task 7 → Task 8
↘ ↘
Task 9 → Task 10 → Task 12
Task 11 ↗ ↘
Task 13 → Task 14 → Task 15
🎨 Key Features to Implement
Core Functionality
- ✅ Database schema for DIY packages
- ✅ Package creation and management
- ✅ Real-time pricing calculations
- ✅ Admin dashboard interface
- ✅ Client booking flow
Advanced Features
- 💰 Spending tier discounts
- 🤝 Partner portal integration
- 📱 Mobile app support
- 📧 Enhanced email templates
- 📊 Advanced reporting
Design Requirements
- 🟡 Yellow color coding throughout all interfaces
- 📱 Mobile-responsive design
- 🔄 Real-time price updates
- ✨ Intuitive quantity selectors
- 📋 Package customization summary
📈 Development Milestones
| Milestone | Tasks Complete | Features Available |
|---|---|---|
| MVP | Tasks 1-6 | Basic DIY package creation & booking |
| Beta | Tasks 1-10 | Full admin/client functionality |
| Launch | Tasks 1-12 | Complete feature set |
| Optimized | Tasks 1-15 | Performance & analytics |
🛠️ Technology Stack
Backend
- Database schema (4 new entities)
- RESTful APIs for package management
- Pricing calculation engine
- Integration with existing booking system
Frontend
- Admin dashboard (React/Vue/Angular)
- Client-side booking interface
- Partner portal integration
- Mobile app components
Integrations
- HH Menu v2/v3 systems
- Image Menu/iMenuPro
- Email service
- Existing voucher/points systems
📝 Next Steps
- Start with Task 1: Database schema design
- Parallel development: Begin Task 2 after Task 1.1-1.3 complete
- Early testing: Use Task 4 (Admin Dashboard) for immediate validation
- Incremental rollout: Deploy MVP after Task 6, then enhance Estimated Timeline: 12-16 weeks for full implementation Team Size: 3-4 developers (Backend, Frontend, Mobile, QA)
DIY Set Feature - Tasks & Subtasks Summary
Overview
The DIY Set feature allows customers to customize group bookings by selecting quantities from different menu categories instead of fixed packages. This provides flexibility for varying group preferences and includes optional minimum spend requirements with spending tier discounts.
📋 Task Summary by Phase
Phase 1: Foundation (High Priority)
Tasks 1-6: Core infrastructure and basic functionality
Task 1: Database Schema Design for DIY Packages
- Dependencies: None
- Subtasks:
- 1.1: Design DIY Package table schema (package_id, name, description, min/max_persons, has_min_spend, currency)
- 1.2: Design Menu Section table schema (section_id, package_id, original_price, selling_price, quantity_options)
- 1.3: Design Spending Tier table schema (tier_id, package_id, min_amount, discount_type, discount_value, applies_to)
- 1.4: Design DIY Booking table schema (booking_id, package_id, selected_quantities, total_price, tier_discount_applied)
- 1.5: Create database migrations and indexes
- 1.6: Test schema with sample data and validate relationships
Task 2: DIY Package Management Service
- Dependencies: Task 1
- Subtasks:
- 2.1: Implement Package CRUD operations API
- 2.2: Implement Menu Section management (add/remove/modify)
- 2.3: Implement Spending Tier configuration logic
- 2.4: Create pricing calculation service
- 2.5: Add validation for sequential spending tiers
- 2.6: Integrate with restaurant currency settings
- 2.7: Add business logic for person limits validation
Task 3: Basic Pricing Calculator without Spending Tiers
- Dependencies: Tasks 1, 2
- Subtasks:
- 3.1: Implement total price calculation logic
- 3.2: Handle original vs selling price calculations
- 3.3: Add minimum spend requirement validation
- 3.4: Integrate with existing voucher/points systems
- 3.5: Implement per-person pricing model
- 3.6: Add currency formatting based on restaurant settings
Task 4: Admin Dashboard DIY Package Creation Interface
- Dependencies: Tasks 2, 3
- Subtasks:
- 4.1: Create package creation form UI
- 4.2: Implement menu section configuration interface
- 4.3: Add min/max person settings controls
- 4.4: Create minimum spend toggle and configuration
- 4.5: Implement package listing with filters/search
- 4.6: Add edit/delete package functionality
- 4.7: Apply yellow color coding for DIY packages
- 4.8: Add form validation and error handling
Task 5: Basic Client-Side Package Display
- Dependencies: Task 3
- Subtasks:
- 5.1: Create DIY package cards for store page
- 5.2: Implement yellow color coding and D.I.Y Set labeling
- 5.3: Add price display with minimum spend indication
- 5.4: Create package description and details display
- 5.5: Implement 'Select Set' button functionality
- 5.6: Ensure responsive design for mobile/desktop
- 5.7: Integrate with existing store page layout
Task 6: Basic DIY Booking Flow
- Dependencies: Tasks 4, 5
- Subtasks:
- 6.1: Create menu section quantity selection interface
- 6.2: Implement real-time price updates
- 6.3: Add minimum spend validation
- 6.4: Integrate with existing checkout process
- 6.5: Create booking confirmation with DIY details
- 6.6: Add error handling for invalid selections
Phase 2: Enhanced Functionality (Medium Priority)
Tasks 7-12: Advanced features and integrations
Task 7: Spending Tier Discount System
- Dependencies: Tasks 2, 3
- Subtasks:
- 7.1: Implement configurable discount tiers with sequential validation
- 7.2: Add percentage and fixed amount discount types
- 7.3: Implement per booking and per person calculation modes
- 7.4: Create automatic tier calculation logic
- 7.5: Integrate with existing pricing calculator
- 7.6: Build admin interface for tier configuration
- 7.7: Add validation for tier ordering and conflicts
Task 8: Enhanced Admin Dashboard with Full Package Management
- Dependencies: Tasks 4, 7
- Subtasks:
- 8.1: Create spending tier configuration interface
- 8.2: Add advanced package filtering and search
- 8.3: Implement bulk operations for packages
- 8.4: Create export functionality for package data
- 8.5: Enhance validation and error handling
- 8.6: Add package duplicate/clone functionality
- 8.7: Admin Booking List
Task 9: Partner Portal DIY Integration
- Dependencies: Tasks 6, 7
- Subtasks:
- 9.1: Create DIY booking creation interface for partners
- 9.2: Implement DIY package listing and management
- 9.3: Add booking list with DIY package display
- 9.4: Integrate billing with DIY packages
- 9.5: Implement commission calculation for DIY bookings
- 9.6: Add report generation including DIY data
- 9.7: Apply yellow color coding throughout partner portal
Task 10: Enhanced Client-Side Package Selection and Booking
- Dependencies: Tasks 6, 7
- Subtasks:
- 10.1: Create advanced menu section quantity selection
- 10.2: Implement spending tier discount visualization
- 10.3: Add real-time pricing updates with discount display
- 10.4: Enhance checkout experience
- 10.5: Optimize mobile interface
- 10.6: Create package customization summary
- 10.7: Integrate with existing voucher/points systems
Task 11: Menu System Integration (HH Menu v2/v3)
- Dependencies: Tasks 2, 8
- Subtasks:
- 11.1: Integrate with HH Menu v2 (quantity and pricing)
- 11.2: Implement HH Menu v3 dedicated DIY settings
- 11.3: Add Image Menu/iMenuPro manual section management
- 11.4: Implement automatic price calculation from menu items
- 11.5: Create menu section synchronization
- 11.6: Add QR code menu support for DIY packages
- 11.7: Implement sticky total display on menu pages
Task 12: Enhanced Booking Confirmation and Email Templates
- Dependencies: Task 10
- Subtasks:
- 12.1: Create DIY package-specific email templates
- 12.2: Add menu selection display in confirmation emails
- 12.3: Include spending tier discount information
- 12.4: Create package customization summary
- 12.5: Apply yellow color coding in email design
- 12.6: Ensure mobile-responsive email templates
- 12.7: Integrate with existing email system
Phase 3: Polish & Optimization (Low Priority)
Tasks 13-15: Advanced features and performance
Task 13: Advanced Reporting and Export Features
- Dependencies: Tasks 9, 11
- Subtasks:
- 13.1: Create DIY package booking reports
- 13.2: Implement revenue analysis by package type
- 13.3: Add menu section popularity analysis
- 13.4: Create spending tier effectiveness reports
- 13.5: Implement export to Excel/PDF formats
- 13.6: Integrate with existing reporting system
- 13.7: Add dashboard analytics for DIY performance
Task 14: Mobile App Feature Implementation
- Dependencies: Tasks 10, 12
- Subtasks:
- 14.1: Implement DIY package display in mobile app
- 14.2: Create mobile-optimized booking flow
- 14.3: Add quantity selection interface for mobile
- 14.4: Implement spending tier visualization on mobile
- 14.5: Add push notification support for DIY bookings
- 14.6: Create mobile-specific UI/UX optimizations
- 14.7: Ensure feature parity with web platform
Task 15: Performance Optimization and Analytics
- Dependencies: Tasks 13, 14
- Subtasks:
- 15.1: Optimize database queries for DIY operations
- 15.2: Implement caching strategies for package data
- 15.3: Add API performance monitoring
- 15.4: Implement advanced analytics and KPI tracking
- 15.5: Conduct load testing and optimization
- 15.6: Add error monitoring and alerting
- 15.7: Implement system scalability improvements
📊 Summary Statistics
- Total Tasks: 15
- Total Subtasks: 105 (7 subtasks per task average)
- High Priority: 6 tasks (Foundation phase)
- Medium Priority: 6 tasks (Enhanced functionality)
- Low Priority: 3 tasks (Polish & optimization)
🔄 Development Flow
- Foundation First: Complete tasks 1-6 to establish core functionality
- Visible Progress: Task 4 (Admin Dashboard) and Task 5 (Client Display) provide immediate testable features
- Enhanced Features: Tasks 7-12 add advanced functionality and integrations
- Polish: Tasks 13-15 optimize performance and add advanced features
🎯 Key Milestones
- MVP Ready: After Task 6 completion
- Feature Complete: After Task 12 completion
- Production Ready: After Task 15 completion
DIY Set Discussion
TODO:
- Release Menu v3 first?
- Testing Phase
- What is the expected result if no minimum required in the hh search?
Example packages serializer:
.....
"min_person": 2,
"require_min_spending": true,
"min_spending": {
"pricing_model": 'per_item',
"price": 100000,
"currency": 'THB',
"format": '฿1,000'
},
"has_spending_tier_discount": true,
"spending_tier": {
"spending_type": "per_person/per_booking",
"discount_tye": "amount/percentage",
"pricing_spending_tiers": [
// example fixed price
{
"id": 111,
"name": 'Spending Incentive Tier 1',
"price": {
"price": 100000,
"currency": 'THB',
"format": '฿1,000'
},
"discount_value": '฿300',
"discount_percent": null,
"currency": "THB"
},
// example relative/percent
{
"id": 112,
"price": {
"price": 150000,
"currency": 'THB',
"format": '฿1,500'
}
"discount_value": null,
"discount_percent": 10,
"currency": "THB"
},
]
},
"group_menu_sections": [
{
"id": 1779,
"name": "Main",
"section_type": "food",
"original_price": {
"price": 50000,
"currency": 'THB',
"format": '฿500'
},
"selling_price": {
"price": 40000,
"currency": 'THB',
"format": '฿400'
}
},
{
"id": 1780,
"name": "Appetizer",
"section_type": "food",
"original_price": {
"price": 25000,
"currency": 'THB',
"format": '฿250'
},
"selling_price": {
"price": 20000,
"currency": 'THB',
"format": '฿200'
}
},
{
"id": 1781,
"name": "Beverages",
"section_type": "beverage",
"original_price": {
"price": 30000,
"currency": 'THB',
"format": '฿300'
},
"selling_price": {
"price": 20000,
"currency": 'THB',
"format": '฿200'
}
}
]
.....
Example package_bought payload in calculate package price:
{
"package_bought": [
{
"id": 3685,
"quantity": 1,
"group_sections": [
{
"id": 1779,
"quantity": 1
},
{
"id": 1780,
"quantity": 2
},
{
"id": 1781,
"quantity": 5
}
]
}
]
}
Notes:
- If quantity = 0 client still send payload with quantity = 0
Event: onCheckout
{
.....
"packages": [
{
"id": "27660",
"quantity": 1,
"group_sections": [
{
"id": 1779,
"quantity": 1
},
{
"id": 1780,
"quantity": 2
},
{
"id": 1781,
"quantity": 5
}
.......