🧚 Premium Website Creation - Workflow

Complete flow from interview to live website

📋 Test Scenario

🤖 Testing Method

Claude will use MCP Playwright to test through Facebook Messenger.

  1. Navigate to Facebook Messenger
  2. Send: "I want a premium website"
  3. Complete entire interview with all fairies
  4. Answer as if creating Alicai's website (Fairy Digital Agency)
  5. Wait for website generation completion
  6. Send the generated website link to user

⚠️ CRITICAL: If bugs occur during test:

  • Fix the bug immediately
  • Retry the test from the beginning
  • Only stop if you have questions for the user
  • Do NOT report partial failures - fix and continue
0
👤

User Request via Messenger

Entry point - "I want a premium website"

Triggers
Routed to Madame Walicai
Steps 1-5
💃

Madame Walicai - Complete Interview

Handles entire conversation from business name to final questions

📝 Step 1: Business Name Collection

In Conversation
Asks: "What's your business name?"
Actions
Extract business_name from answer
Save to interview_progress.checklist
Trigger auto-scraping (background)

🔍 Step 2: Auto Data Fetching (Background)

Scrapes Automatically
Google Maps: reviews, rating, address, phone, hours
Website: services, about, contact
SERP: web mentions
Saves to
interview_progress.auto_fetched_data
testimonials[], rating, sources[]

🔐 Step 3: Social Media OAuth (In Conversation)

Madame Walicai Sends Links
"Connect your Facebook" (OAuth link)
"Connect your Instagram" (OAuth link)
User Clicks → Fetches Last 365 Days
Facebook: posts (365 days), photos (max 30), about, events
Instagram: posts (365 days), photos (max 30), bio, stories highlights
Merges Into
auto_fetched_data (social_posts[], social_photos[])

⚙️ Step 4: Data Processing & Gap Analysis

LLM Processing Steps
1. Merge: Google Maps + Website + Social (365 days)
2. Deduplicate and categorize all content
3. Extract key information from all sources
4. Generate business description from collected data
Key Information Extracted
Business description & value proposition
Services/products list with descriptions
Team members (from website, social, Google)
Key achievements/milestones
Common customer questions/FAQs
Media Collected for Later Use
Photos categorized (products, team, location, events)
Videos collected (social media, website)
Stored in media library for Phalicai
🔍 Gap Analysis - Determine What's Missing
Analyze collected data vs required fields
Identify missing critical information
Examples: business goals, target audience, unique selling points, pricing
Create list of questions to ask in Step 5

💬 Step 5: Conversational Interview Completion

Generate Contextual Questions Based on Collected Data
Use scraped data to create personalized, conversational questions
Reference specific information from Steps 2-3 in questions
Example: "I saw that your customers love your [service X] on Google Maps. Is that your main specialty?"
Example: "On your Instagram page, I see a lot of [theme Y]. Do you want to highlight that on the site?"
Example: "Your reviews often mention [point Z]. Is it important to emphasize?"
Conversational Gap Filling
For missing critical info, ask naturally based on context
If no pricing found: "I didn't find your pricing online. Do you prefer to display prices or 'quote on request'?"
If no hours found: "Are you open every day or do you have specific hours?"
Make it feel like a conversation, not a form
Validate with User
Present summary using their own language/tone from social posts
"So if I understand correctly: [personalized summary based on their own words]"
Ask for confirmation naturally
Determine Which Fairies Are Needed
Analyze: business_type + all gathered info → fairy requirements
Uses business_type_feature_mapper.py logic
Determines: needs_booking, needs_ecommerce, needs_blog (photos always required)
ASK USER for confirmation - don't force booking/ecommerce if they don't want
Example: "Based on your business type, I recommend adding [booking/e-commerce]. Interested?"
Push Forward
"Great! I'll create your site with all this..."
Set interview_progress.completed = true
Transfer to Phalicai (always - photo collection is mandatory)
Step 6
📸

Phalicai - Photo Collection

File: app/services/fairies/phalicai.py

🎯 Trigger Condition

ALWAYS triggered - photo collection is mandatory
Every business needs photos for the website

🔍 Photo Gap Analysis

Reviews already collected photos from Step 4 (social media scraping)
Determines what photo categories are missing
Required categories: products/services, team/staff, location/storefront, events/activities
Analyzes business_type to determine priority categories

💬 Actions in Conversation

Requests Missing Photos via Social Media
Asks for missing categories identified in gap analysis
Send request via WhatsApp/Messenger - user can take photos now, later, or use camera
User flexibility: snap photos immediately, upload from gallery, or take later

💾 Saves to Database

Table: prospect_photos (only URL saved, not the file itself)
Media uploaded to R2 before website creation
Database stores: photo_url, category, uploaded_at

🔄 When Complete

Update prospects.has_photos = true
Transfer to Gralicai (Step 7) - design consultation is ALWAYS mandatory
Step 7
🎨

Gralicai - Graphic Design Fairy

File: app/services/fairies/gralicai.py

🎯 Trigger Condition

ALWAYS triggered - design consultation is mandatory
Every business needs logo, fonts, and design guidance

📥 Inputs (from Previous Steps)

Business name, industry, target audience
Brand colors from website/social media (Step 4 scraped data)
Existing logo (if found in scraped data)
Photos collected by Phalicai

💬 Actions During Interview

1. Logo Analysis & Improvement
Check if existing logo found in scraped data (photos/website)
If logo found: Describe the logo to the user
Ask: "I found your logo. Do you need any improvements?"
If improvement requested: Ask what specific changes they want
Use HuggingFace tool to improve logo based on user request
Tool: Input existing logo + specific improvement prompt
TODO: Find proper LLM/model on HuggingFace for logo improvement
If no logo found: Generate new logo via HuggingFace
2. Google Font Selection
Think about what Google Font fits their business type
Select font pairing (heading + body font)
Show link to Google Fonts page with the selected font
Example: "I suggest Montserrat for headings. Check it out: https://fonts.google.com/specimen/Montserrat"
Ask: "Is this font ok or do you want something different?"
If different: ask for their preference and suggest alternatives
3. Color Palette Selection
Analyze existing brand colors from scraped data (website/photos)
Suggest color palette based on industry and visual identity
Present color codes (hex) with visual representation
Ask: "These are the colors I suggest. Do you like them or want something different?"
If different: ask for their color preferences or inspiration

💾 Saves to Database

prospects.has_design = true
design_config: logo_preference, generate_logo (bool), font_pairing, color_palette, design_style
If logo upload requested: logo_url (uploaded to R2)

🔄 When Complete

Design preferences confirmed
Transfer to Valicai (Step 8A) - video selection
8A
🎥

Valicai - Video Selection Fairy

File: app/services/fairies/valicai.py

🎯 Trigger Condition

ALWAYS triggered - video review is mandatory
Videos collected by Madame Walicai in Step 4

📥 Inputs (from Step 4)

Videos collected from social media (Facebook, Instagram)
Videos from website scraping
Video metadata: views, engagement, date posted

⚙️ Actions

1. Review Collected Videos
Check each video from Step 4 collection
Determine if video describes the business OR relates to recent action/event
2. Suggest Publication
If video describes business → suggest publishing on website
If video relates to recent action → suggest publishing on website
Otherwise → skip video (don't publish)

💾 Saves to Database

Table: prospect_videos (video_url, category, selected_for_website)
prospects.has_videos = true

🔄 Transfer Conditions

Videos selected for website generation
Transfer to Boolicai (8B) if booking needed, otherwise Calicai (8C)
8B
📅

Boolicai - Calendar & Booking Fairy

File: app/services/fairies/boolicai.py

🎯 Trigger Condition

Determined in Step 5 - needs_booking = true
User confirmed they want booking functionality
Business type: appointments, reservations, consultations

📥 Inputs (from Interview)

business_name
opening_hours (if available)
services[] (to create booking types)
phone, email (for notifications)

⚙️ Actions

1. Create Merchant in Calendar System
INSERT INTO merchants (business_name, contact_phone, contact_email)
Returns: merchant_id
2. Configure Services
Add each service as a bookable item
For each service: name, duration, price (if applicable)
Ask if payment required to book (deposit or full payment)
If payment required: payment_required = true, payment_amount, payment_type (deposit/full)
If no payment: payment_required = false (free booking)
3. Configure Availability
Parse opening_hours → availability_slots
Default: Mon-Fri 9am-6pm if not provided
Set buffer time between appointments (if applicable)
Set max bookings per day/week (if applicable)
4. Payment Setup Note (if payment_required = true)
Inform merchant: Stripe Connect onboarding can be done later
Booking system will be created, payment setup can be completed after website launch
Generate Stripe Connect onboarding link (stored for later use)
Store link in merchants.stripe_onboarding_link
Merchant can complete Stripe setup anytime after website is live
5. Generate Booking Links
WhatsApp: https://wa.me/{phone}?text=Book%20{service}
Messenger: https://m.me/{page_id}
Direct: https://alicai.app/book/{merchant_id}

💾 Saves to Database

prospects.calendar_merchant_id = {merchant_id}
merchants table: business_name, contact info, stripe_onboarding_link, stripe_account_id (null until completed)
services table: service_id, merchant_id, name, duration, price, payment_required, payment_type
availability_slots table: merchant_id, day_of_week, start_time, end_time
booking_contacts table: WhatsApp/Messenger links

🔄 Transfer Conditions

Booking system configured
Transfer to Calicai (8C) if ecommerce needed, otherwise Blalicai (8D)
8C
🛍️

Calicai - E-Commerce Setup Fairy

File: app/services/fairies/calicai.py

🎯 Trigger Condition

AI Analysis: ecommerce = true
OR business_type in: retail, shop, store, e-commerce

📥 Inputs (from Interview)

business_name
products[] (only physical/digital products, not services)
currency (default: EUR)
shipping_zones (if physical products)

⚙️ Actions

1. Product Import/Creation
Check for existing integrations (Shopify, WooCommerce)
Import products if integration exists
OR create products from interview data
2. Payment Setup Note
Inform merchant: Payment integration can be done after website launch
E-commerce system will be created, payment setup completed later
Store note in prospects.payment_pending = true
3. Inventory & Shipping
Set stock levels (if provided)
Configure shipping zones & rates
Set tax rates (based on location)

💾 Saves to Database

Table: products (product_id, name, price, stock, merchant_id)
prospects.has_ecommerce = true
prospects.payment_config (Stripe/Mollie tokens)
shipping_config table: zones & rates

🔄 Transfer Conditions

Products available for website shop page generation
Payment gateway configured for checkout
Transfer to Blalicai (8D) if blog needed, otherwise Final Confirmation (Step 9)
8D
✍️

Blalicai - Blog & Content Fairy

File: app/services/fairies/blalicai.py

🎯 Trigger Condition

AI Analysis: blog_content = true
OR business needs SEO/thought leadership

📥 Inputs (from Interview)

business_name, business_type
services[], target_audience
Auto-fetched data (reviews, social posts)
Social media connections (for posting)

💬 Actions During Interview

1. Analyze Current Posting Frequency
Check how many times per week they currently post on Instagram
Check how many times per week they currently post on Facebook
Review posting patterns from Step 4 collected data
2. Confirm Posting Frequency
Ask for confirmation: "I see you post X times/week on Instagram. Want to keep that?"
Ask for confirmation: "I see you post Y times/week on Facebook. Want to keep that?"
Ask for website blog: "How many times per week for blog posts on your site?"
3. Suggest Content Topics
Analyze what topics they usually post about (from Step 4 data)
Suggest topics based on their existing content patterns
Ask for confirmation: "You usually post about [topics]. Should I continue with these?"
Offer additional topic suggestions based on business type
4. Inform About Flexibility
Tell them: "You can always contact me later to change posting frequency or topics"
Blalicai is available for adjustments anytime after launch

🔄 What Happens Later (After Website Launch)

Generate blog posts based on confirmed frequency and topics
Auto-publish to website blog section
Generate social media variants and post to Instagram/Facebook
Content creation happens automatically based on interview confirmation

💾 Saves to Database

prospects.has_blog = true
content_config: posting_frequency (Instagram, Facebook, blog), topics[]
Note: Blog posts and social content generated AFTER website launch, not during interview

🔄 Transfer Conditions

Posting frequency and topics confirmed
Content preferences saved
Transfer to Final Confirmation (Step 9)
Step 9
👩‍💼

Madame Walicai - Final Confirmation

Before calling website generator

✅ Verify Everything is Collected

Confirm all data collected: business info, auto-scraped data, photos, videos
Confirm fairy configurations completed (Phalicai, Gralicai, Valicai, Boolicai, Calicai, Blalicai)
Review checklist of what was gathered

🔄 Offer Possibility to Go Back

Ask: "Everything looks good? Or do you want to change something?"
Offer to go back to any fairy if user wants to adjust
Options: "Go back to photos", "Change booking settings", "Adjust content topics", etc.
If user wants changes → transfer back to relevant fairy
If everything confirmed → proceed to website generation
Step 10
🎨

Madame Walicai Calls Website Generator

Uses MCP tool to call premium_website_generator.py

Generator Actions
1. Load all interview data + auto_fetched_data + photos
2. Load all fairy data (booking, ecommerce, blog)
3. Generate logo (HuggingFace or text)
4. Build rich context from ALL scraped data
5. Generate pages with AI (home, about, services, contact, shop, blog, booking)
6. Upload to R2 storage
Result
Live site: https://{slug}.alicai.app
prospects.generated_site_slug
🎉
🌐

Live Premium Website

Professional multi-page site with all features

Maps Category Mapping

3,968 categories mapped
Source: static/google_maps_categories_mapping.json
Auto-generated from app/services/business_type_feature_mapper.py
📊 E-commerce: 572 | Booking: 1,051 | Quotation: 406 | Portfolio: 5 | FAQ: 1,623 | Testimonials: 3,968

Category 🛍️ 📅 📸 🍽️ 👥 💰 🎨

📊 Legend

🛍️ = E-commerce (Calicai)
📅 = Booking (Boolicai)
📸 = Photos (Phalicai)
🍽️ = Menu Page
👥 = Team Page
💰 = Quotation
🎨 = Portfolio
= Testimonials
= FAQ

⚡ Malicai - Content Edits

Malicai is NOT part of the generation workflow.
Malicai handles content edits AFTER creation (change photos, edit text, update sections, etc.)

Last Updated: 2025-10-19
System: AlicAI Premium Website Generation