๐ Project MB - System Health
The ROAS Solution That The World Has Been Waiting For...
โ
ALL ISSUES RESOLVED
- โ
Import/Export: Function names now match between files
- โ
Case Sensitivity: Using correct uppercase /API/ directory paths
- โ
TypeScript: No compilation errors
- โ
Routing: Live traffic vs API management properly separated
๐ง Auto-Generated Brand ID System:
- Format: BR0001, BR0002, BR0003... (sequential)
- Setup: Only 2 fields required (brand_name + brand_domain)
- Benefits: Zero conflicts, clean hierarchy, easy debugging
๐ Complete API Reference
๐ข Brand Management APIs:
๐ฏ Experience/Campaign Management:
- POST /api/create-experience - Create production experience (4 fields: brand_id, experience_id, slots, test_percentage)
- POST /api/create-test-experience - Create test experience (with auto-generated templates)
- GET /api/get-experience?brand_id=X&experience_id=Y - Get experience config
- GET /api/list-experiences?brand_id=X - List experiences for brand
- PUT /api/update-experience-config - Update experience configuration
- POST /api/pause-experience - Pause experience
- POST /api/resume-experience - Resume experience
๐ Template Management:
โ๏ธ Slot Variant Management:
- POST /api/pause-slot-variant - Pause specific slot variants
- POST /api/resume-slot-variant - Resume specific slot variants
- GET /api/list-slot-variants?brand_id=X&experience_id=Y - List slot variant status
- POST /api/add-slot - Add new slot to experience
- POST /api/add-variants-to-slot - Add variants to existing slot
- POST /api/preview-slot-changes - Preview slot/variant changes
โก Bulk Operations:
๐ Analytics & Session Management:
๐ง Debug & Health:
๐ค Admin APIs:
- GET /api/admin/brand-health - Brand lookup system status
- POST /api/admin/sync-brands - Sync brands from BigQuery to KV cache
- POST /api/admin/invalidate-brand-cache - Clear brand cache entries
๐งช Live Test URLs
Brand-Aware Testing:
๐ Quick Start Guide
Create Your First Brand & Experience:
Step 1: Create Brand (Auto-Generated ID)
POST https://projmb.dev/api/setup-client
{"brand_name": "Nike Inc", "brand_domain": "nike.com"}
โ Returns: {"brand_id": "BR0001", ...}
Step 2: Create Experience
POST https://projmb.dev/api/create-test-experience
{"brand_id": "BR0001", "experience_id": "PDP", "slots": [{"slot": 1, "variants": 3}]}
โ Creates 3 test templates automatically
Step 3: Test Live
https://mb.nike.com/?mbxp=PDP
โ Serves personalized experience with A/B testing
๐งน Cleanup Tools:
Test Cleanup: DELETE /api/bulk-delete-test-brands {"dry_run": true}
KV Only: DELETE /api/cleanup-brand-kv {"brand_id": "BR0001", "confirm_cleanup": true}
Full Delete: DELETE /api/delete-brand {"brand_id": "BR0001", "confirm_delete": true}
๐ System Status
- Architecture: v4.0-brand-centric-auto-id-COMPLETE
- โ
Import/Export: Fixed function name mismatches
- โ
Case Sensitivity: Fixed directory path casing
- โ
TypeScript: No compilation errors
- โ
Routing: Live traffic (mb.*) โ handleExperienceEngine
- โ
API Management: Admin/config (/api/*) โ handleExperienceAPI
- Storage: KV-first (brands) + R2 (campaigns) + BigQuery (analytics)
- Brand ID Format: Auto-generated BR0001, BR0002, BR0003...
- Setup Fields: 2 required (brand_name + brand_domain)
- Sync Schedule: Every 5min (sessions), Daily 2AM (brands)
- Performance: Sub-10ms brand lookups, 5ms experience rendering
- Capacity: Unlimited brands, unlimited experiences per brand, bulk operations
- Current: Check live brand count โ
Last Updated: 2025-06-27T06:37:09.025Z