Temporary Wishlist to Group Overview
Introduction
The Temporary Wishlist to Group component manages temporary wishlists that users create before converting them to official wishlists. These temporary wishlists allow users to prepare their product selections, categories, and search queries without affecting their subscription usage until they're ready to finalize.
System Overview Diagram
---
config:
theme: base
layout: dagre
flowchart:
curve: linear
htmlLabels: true
themeVariables:
edgeLabelBackground: "transparent"
---
flowchart TB
%% External Services
OpenAI((OpenAI API))
CSVFile[(CSV Files)]
%% Database Tables
TempWishlistDB[(temp_wishlist_to_groups)]
TempProductDB[(temp_wishlist_products)]
TempCategoryDB[(temp_wishlist_categories)]
TempSearchQueryDB[(temp_wishlist_search_queries)]
TempViewpointDB[(temp_wl_cat_vps<br/>temp_wl_cat_vp_details<br/>temp_wl_spec_vps)]
%% User Actions Layer
subgraph UserActions["User Actions"]
direction LR
CreateWishlist[Create Temp Wishlist]
AddProducts[Add Products]
AddCategories[Add Categories]
AddSearchQueries[Add Search Queries]
ImportCSV[Import CSV Data]
GenerateViewpoints[Generate AI Viewpoints]
ConvertToOfficial[Convert to Official]
end
%% Processing Layer
subgraph ProcessingLayer["Processing Layer"]
direction LR
TempWishlistController[TempWishlistToGroupController]
TempProductController[TempWishlistProductController]
TempCategoryController[TempWishlistCategoryController]
TempSearchQueryController[TempWishlistSearchQueryController]
TempViewpointController[TempViewpointController]
CSVProcessor[CSV Import/Export Processor]
OpenAIService[OpenAI Service]
end
%% Database Layer
subgraph DatabaseLayer["Database Layer"]
direction LR
TempWishlistDB
TempProductDB
TempCategoryDB
TempSearchQueryDB
TempViewpointDB
end
%% External Layer
subgraph ExternalLayer["External Services"]
direction LR
OpenAI
CSVFile
end
%% Numbered Steps - With Left to Right and Top to Bottom Flow
CreateWishlist --- Step1[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #4CAF50 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>1</span>
<p style='margin-top: 8px'>Create Temporary Wishlist</p>
</div>
]
Step1 --> TempWishlistController
TempWishlistController --> TempWishlistDB
AddProducts --- Step2A[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #2196F3 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>2A</span>
<p style='margin-top: 8px'>Add Products</p>
</div>
]
Step2A --> TempProductController
TempProductController --> TempProductDB
AddCategories --- Step2B[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #2196F3 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>2B</span>
<p style='margin-top: 8px'>Add Categories</p>
</div>
]
Step2B --> TempCategoryController
TempCategoryController --> TempCategoryDB
AddSearchQueries --- Step2C[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #2196F3 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>2C</span>
<p style='margin-top: 8px'>Add Search Queries</p>
</div>
]
Step2C --> TempSearchQueryController
TempSearchQueryController --> TempSearchQueryDB
ImportCSV --- Step3[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #FF9800 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>3</span>
<p style='margin-top: 8px'>Bulk CSV Operations</p>
</div>
]
Step3 --> CSVProcessor
CSVProcessor <--> CSVFile
CSVProcessor --> TempWishlistDB
CSVProcessor --> TempProductDB
GenerateViewpoints --- Step4[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #9C27B0 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>4</span>
<p style='margin-top: 8px'>AI Viewpoint Generation</p>
</div>
]
Step4 --> TempViewpointController
TempViewpointController --> OpenAIService
OpenAIService <--> OpenAI
OpenAIService --> TempViewpointDB
ConvertToOfficial --- Step5[
<div style='text-align: center'>
<span style='display: inline-block; background-color: #F44336 !important; color:white; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; font-weight: bold'>5</span>
<p style='margin-top: 8px'>Convert to Official Wishlist</p>
</div>
]
Step5 --> TempWishlistController
%% Styling
style UserActions fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
style ProcessingLayer fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style DatabaseLayer fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
style ExternalLayer fill:#fff3e0,stroke:#e65100,stroke-width:2px
style OpenAI fill:#ffecb3,stroke:#f57c00,stroke-width:3px
style CSVFile fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
style Step1 fill:transparent,stroke:transparent,stroke-width:1px
style Step2A fill:transparent,stroke:transparent,stroke-width:1px
style Step2B fill:transparent,stroke:transparent,stroke-width:1px
style Step2C fill:transparent,stroke:transparent,stroke-width:1px
style Step3 fill:transparent,stroke:transparent,stroke-width:1px
style Step4 fill:transparent,stroke:transparent,stroke-width:1px
style Step5 fill:transparent,stroke:transparent,stroke-width:1px
Detail Dataflow Dependency
Key Process Flows
1. Temporary Wishlist Creation and Management
- Description: User initiates creation of a temporary wishlist with comprehensive data validation
- Controller: TempWishlistToGroupController handles the request and validates user permissions
- Processing:
- Comprehensive validation of wishlist name (max 50 characters, no emoji)
- Group membership verification with
isMemberOfGroup() method
- Transaction-safe creation with automatic slug generation
- Support for complex nested data structures (products, categories, search queries)
- Database Impact: New records in
temp_wishlist_to_groups with status TemporarySave
- Dependencies:
- User authentication and group membership verification
- Input validation rules including WithoutEmojiRule
- Automatic slug generation via TempWishlistToGroupObserver
- User Experience: Real-time validation feedback and successful creation confirmation
2. Product Management Operations
- Description: User adds products to temporary wishlist with different input types
- Controller: TempWishlistProductController handles product-specific CRUD operations
- Processing:
- Support for multiple input types (ASIN, JAN, Rakuten ID)
- Mall-specific validation and URL generation
- Duplicate detection during bulk operations
- Input sanitization and format validation
- Database Impact: Records in
temp_wishlist_products with product details
- Dependencies:
- Valid mall configurations for URL generation
- Input type validation (enum: jan, asin, rakuten_id)
- Existing temporary wishlist record
- User Experience: Immediate feedback on product addition with validation errors if applicable
3. Category Management Operations
- Description: User adds category items to temporary wishlist with mall-specific validation
- Controller: TempWishlistCategoryController handles category-specific operations
- Processing:
- Mall-specific category ID validation
- Category URL generation based on mall configuration
- Category path resolution and hierarchy validation
- Database Impact: Records in
temp_wishlist_categories with category details
- Dependencies:
- Mall-specific category database for validation
- Category hierarchy resolution system
- Existing temporary wishlist record
- User Experience: Structured category management with mall-specific validation
4. Search Query Management Operations
- Description: User adds search queries to temporary wishlist for tracking
- Controller: TempWishlistSearchQueryController handles search query operations
- Processing:
- Keyword validation and sanitization
- Mall-specific search compatibility checks
- Keyword normalization (removing special characters, normalizing spaces)
- Database Impact: Records in
temp_wishlist_search_queries with keyword details
- Dependencies:
- Mall-specific search configuration
- Keyword validation rules
- Existing temporary wishlist record
- User Experience: Efficient search query management with validation feedback
5. CSV Import and Processing
- Description: User imports bulk data via CSV files with comprehensive validation
- Controller: TempWishlistController handles CSV import/export operations
- Processing:
- Multi-layer file validation (MIME type, size, encoding)
- Row-by-row data validation with detailed error collection
- Import history tracking with complete audit trail
- Error CSV generation for failed imports
- Database Impact:
- Records in
import_histories tracking all import operations
- Records in
import_errors for detailed error reporting
- New
temp_wishlist_to_groups with status CsvImport
- Dependencies:
- File system for temporary storage
- CSV parsing libraries
- Error management system
- User Experience: Comprehensive feedback on import progress, detailed error reporting
6. AI Viewpoint Generation
- Description: User generates AI-powered category descriptions and specific viewpoints
- Controller: TempViewpointController integrates with OpenAI for content generation
- Processing:
- Three-tier viewpoint hierarchy management:
- Category viewpoints (top level with name and group context)
- Category details (AI-generated descriptions)
- Specific viewpoints (granular AI-generated analysis angles)
- OpenAI integration with retry mechanisms
- Transaction-safe creation and linking
- Database Impact:
- Records in
temp_wl_cat_vps for category viewpoints
- Records in
temp_wl_cat_vp_details for AI-generated descriptions
- Records in
temp_wl_spec_vps for specific viewpoints
- Dependencies:
- OpenAI API connectivity
- Prompt template configuration
- Error handling with retry logic
- User Experience: AI-enhanced content generation with minimal user effort
7. Official Wishlist Conversion
- Description: User converts completed temporary wishlist to official wishlist
- Controller: TempWishlistController handles conversion process
- Processing:
- Subscription quota validation
- Complete data migration (products, categories, search queries, viewpoints)
- Proper relationship preservation during migration
- Database Impact:
- Status updates in temporary wishlist records
- Data migration to official wishlist tables
- Dependencies:
- Subscription management system
- Official wishlist data structures
- Transaction safety for complete migration
- User Experience: Seamless transition from temporary to official wishlist
Integration Dependencies
| Component |
Dependencies |
Purpose |
| Wishlist Management |
User authentication, Group membership, Input validation |
Core CRUD operations for temporary wishlists |
| Product Management |
Mall configuration, Input type validation, URL generation |
Product-specific operations with mall integration |
| Category Management |
Category hierarchy, Mall-specific validation, URL generation |
Category-specific operations with hierarchy support |
| Search Query Management |
Keyword validation, Mall-specific search systems |
Search query operations with mall integration |
| CSV Operations |
File validation, CSV parsing, Error management |
Bulk data operations with comprehensive validation |
| OpenAI Integration |
API connectivity, Prompt templates, Retry mechanisms |
AI-powered content generation for viewpoints |
| Conversion Process |
Subscription validation, Data migration, Relationship preservation |
Transition from temporary to official wishlists |
Expected Outcomes
Technical Outcomes
- Flexible Data Preparation: Users can prepare wishlist data without subscription impact
- AI-Enhanced Content: Intelligent category descriptions and viewpoints
- Bulk Operations: Efficient handling of large datasets via CSV
- Seamless Conversion: Smooth transition to official wishlists
Business Value
- Reduced Subscription Pressure: Users can experiment without quota consumption
- Enhanced User Experience: AI-powered content generation
- Operational Efficiency: Bulk import capabilities for large datasets
- Quality Assurance: Comprehensive validation before official conversion
User Experience
- Preparation Workspace: Safe environment for wishlist preparation
- AI Assistance: Intelligent content suggestions and generation
- Error Management: Clear feedback and correction mechanisms
- Progress Tracking: Visible status throughout the preparation process
Module List