UnifiedBeez Backend Architecture

Beehive Dashboard - Testing Environment

โ† Back to Index

๐Ÿงช FRAME 1: Beehive Dashboard Overview

๐ŸŽฏ What is Beehive?

Beehive Dashboard is UnifiedBeez's secure testing and setup environment that gives new users **29 days** to configure, test, and familiarize themselves with the platform before going live. It provides a sandboxed environment where users can experiment without affecting live customer data, test automations safely, and complete all setup steps at their own pace.

โœจ Key Features

๐Ÿ”’ Sandbox Environment

  • Isolated from production
  • Test data only
  • No real customer messages
  • Safe automation testing
  • No billing during setup

โฑ๏ธ 29-Day Setup Period

  • Full platform access
  • Guided setup wizard
  • Progress tracking
  • Can extend if needed
  • Go live anytime

๐Ÿš€ Seamless Transition

  • One-click "Go Live"
  • Data migration
  • Configuration preserved
  • No data loss
  • Rollback option

๐Ÿ”„ Beehive Lifecycle

๐Ÿ Beehive to Live Workflow - 6-Stage Journey

1
ACCOUNT CREATION
โ€ข User signs up for UnifiedBeez
โ€ข Beehive environment created automatically
โ€ข 29-day countdown starts
โ†“
2
BEEHIVE SETUP (0-29 days)
โ€ข Complete 8-step setup wizard
โ€ข Connect test channels
โ€ข Configure Beezora AI
โ€ข Create automations
โ€ข Import test contacts
โ€ข Test workflows
โ€ข Customize brand kit
โ†“
3
READINESS CHECK
โ€ข System validates setup completeness
โ€ข Shows readiness score (0-100%)
โ€ข Highlights missing required steps
โ†“
4
GO LIVE DECISION
โ€ข User clicks "Go Live" button
โ€ข Confirmation modal with checklist
โ€ข Accept terms & conditions
โ†“
5
DATA MIGRATION
โ€ข Beehive data copied to production
โ€ข Channel connections activated
โ€ข Automations enabled
โ€ข Billing starts
โ†“
6
LIVE DASHBOARD ACCESS
โ€ข User redirected to Live Dashboard
โ€ข Real-time operations begin
โ€ข Support monitoring activated

๐Ÿ†š Beehive vs Live Dashboard

Feature Beehive (Testing) Live Dashboard (Production)
Environment Sandboxed, isolated Production, real-time
Data Test data only Real customer data
Channel Connections Test mode, limited Fully connected, live
Automations Test executions only Live executions with real messages
Billing No charges (setup period) Active subscription billing
Time Limit 29 days (extendable) Unlimited (with active subscription)
Support Setup assistance, tutorials Full support, monitoring

๐Ÿง™ FRAME 2: Setup Wizard Architecture

๐Ÿ“‹ 8-Step Setup Wizard

Setup Progress Tracking

๐ŸŽฏ Setup Wizard Steps - 8-Step Configuration Process

1
Plan Selection & Login
โ€ข Choose subscription plan  โ€ข  Confirm account details  โ€ข  Skip for now (trial)
2
User Type Detection & Info
โ€ข Business type selection  โ€ข  Industry selection  โ€ข  Organization size
3
Team & Role Setup
โ€ข Invite team members  โ€ข  Assign roles  โ€ข  Skip for now (solo user)
4
AI Assistant Creation (Beezora)
โ€ข Set personality  โ€ข  Add knowledge base  โ€ข  Configure auto-responses
5
Channel Integration
โ€ข Connect WhatsApp  โ€ข  Connect email  โ€ข  Connect social media (optional)
6
Pre-Channel AI Configuration
โ€ข Fine-tune Beezora for channels  โ€ข  Test AI responses
7
Web Chat Connection
โ€ข Install web chat widget  โ€ข  Customize appearance  โ€ข  Test integration
8
Automation Template Library
โ€ข Browse template library  โ€ข  Activate relevant templates  โ€ข  Customize if needed
โœจ FINAL: Readiness Check & Go Live Option

๐Ÿ’พ Database Schema

beehive_accounts

CREATE TABLE beehive_accounts ( id BIGSERIAL PRIMARY KEY, organization_id BIGINT NOT NULL UNIQUE REFERENCES organizations(id), -- Status status VARCHAR(50) DEFAULT 'active', -- 'active', 'completed', 'expired' -- Setup progress (8 steps) setup_progress JSONB DEFAULT '{ "step1_plan": false, "step2_usertype": false, "step3_team": false, "step4_beezora": false, "step5_channels": false, "step6_ai_config": false, "step7_webchat": false, "step8_automations": false }', -- Readiness score (0-100) readiness_score INT DEFAULT 0, -- Dates created_at TIMESTAMP DEFAULT NOW(), expires_at TIMESTAMP, -- 29 days from creation went_live_at TIMESTAMP, INDEX idx_beehive_accounts_org (organization_id), INDEX idx_beehive_accounts_status (status) );

beehive_data_sync

CREATE TABLE beehive_data_sync ( id BIGSERIAL PRIMARY KEY, beehive_account_id BIGINT NOT NULL REFERENCES beehive_accounts(id), -- Sync status sync_status VARCHAR(50) DEFAULT 'pending', -- 'pending', 'in_progress', 'completed', 'failed' -- Data counts contacts_synced INT DEFAULT 0, automations_synced INT DEFAULT 0, templates_synced INT DEFAULT 0, settings_synced BOOLEAN DEFAULT FALSE, -- Error tracking errors JSONB DEFAULT '[]', started_at TIMESTAMP, completed_at TIMESTAMP, INDEX idx_beehive_sync_account (beehive_account_id) );

๐Ÿ“ก API Endpoints (Beehive)

Method Endpoint Description
GET /api/beehive/status Get Beehive setup status
GET /api/beehive/progress Get setup wizard progress
POST /api/beehive/step/:stepNumber/complete Mark setup step as complete
GET /api/beehive/readiness Get readiness score & checklist
POST /api/beehive/go-live Initiate go-live process
POST /api/beehive/extend Request setup period extension
GET /api/beehive/days-remaining Get remaining setup days

๐Ÿงช FRAME 3: Testing Features & Limitations

โœ… What You CAN Do in Beehive

Full Access Features

  • โœ… Create unlimited test contacts
  • โœ… Build & test automations
  • โœ… Configure Beezora AI personality
  • โœ… Customize brand kit
  • โœ… Create message templates
  • โœ… Set up team members (test mode)
  • โœ… Configure settings
  • โœ… Test web chat widget
  • โœ… Create custom fields
  • โœ… Import CSV contacts (test data)

Limited/Test Features

  • โš ๏ธ Channel connections (test mode only)
  • โš ๏ธ Automation executions (simulated)
  • โš ๏ธ Email sending (sandbox mode)
  • โš ๏ธ WhatsApp (test number only)
  • โš ๏ธ Payment processing (disabled)
  • โš ๏ธ External integrations (limited)

โŒ What You CANNOT Do in Beehive

  • โŒ Send real messages to customers
  • โŒ Connect live WhatsApp Business account
  • โŒ Process real payments
  • โŒ Access production customer data
  • โŒ Execute live automations with real effects
  • โŒ Receive webhook events from live channels

๐Ÿ”ข Usage Limits in Beehive

Resource Beehive Limit Live Dashboard Limit
Test Contacts Up to 1,000 Based on plan
Automations Unlimited creation, 100 test runs/day Unlimited
Templates Unlimited Unlimited
Team Members Up to 5 test accounts Based on plan
Message Sending 50 test messages/day Based on plan

๐Ÿ”„ FRAME 4: Beehive to Live Data Sync Architecture

๐Ÿ—๏ธ Data Migration Flow

๐Ÿ”„ Beehive โ†’ Live Data Migration - 10-Step Process

1
USER CLICKS "GO LIVE"
โ€ข Readiness validation (must be >80%)  โ€ข  Display confirmation modal  โ€ข  User confirms go-live
โ†“
2
CREATE MIGRATION JOB
โ€ข Queue migration task in Bull  โ€ข  Set status to 'in_progress'  โ€ข  Notify user (email + in-app)
โ†“
3
MIGRATE CONFIGURATION
โ€ข Copy organization settings  โ€ข  Migrate brand kit  โ€ข  Copy Beezora AI config  โ€ข  Preserve custom fields
โ†“
4
MIGRATE CONTACTS & DATA
โ€ข Copy contacts (deduplicate)  โ€ข  Migrate tags & lists  โ€ข  Copy custom field values
โ†“
5
MIGRATE AUTOMATIONS
โ€ข Copy automation configs  โ€ข  Set status to 'inactive' initially  โ€ข  Preserve trigger & action settings
โ†“
6
MIGRATE TEMPLATES
โ€ข Copy message templates  โ€ข  Copy WhatsApp templates (for re-approval)  โ€ข  Copy canned responses
โ†“
7
ACTIVATE LIVE CHANNELS
โ€ข Upgrade channel connections to live  โ€ข  Verify webhook endpoints  โ€ข  Test channel health
โ†“
8
ENABLE BILLING
โ€ข Activate subscription  โ€ข  Start billing cycle  โ€ข  Send welcome email with invoice
โ†“
9
FINALIZE MIGRATION
โ€ข Mark beehive_account as 'completed'  โ€ข  Redirect user to Live Dashboard  โ€ข  Lock Beehive access (read-only 7 days)
โ†“
10
POST-MIGRATION
โ€ข Monitor for 24 hours  โ€ข  Send success email  โ€ข  Archive Beehive data after 7 days

๐Ÿ”’ Data Integrity & Safety

Safety Mechanisms

  • Pre-Migration Backup: Full Beehive data snapshot
  • Rollback Window: 7-day rollback capability if issues found
  • Validation Checks: Data integrity checks before/after migration
  • Deduplication: Automatic duplicate detection & merging
  • Error Recovery: Automatic retry for failed migrations
  • Zero Downtime: Migration happens in background

โš™๏ธ AWS Infrastructure for Migration

Infrastructure Components

  • Lambda Function: Orchestrate migration process
  • SQS Queue: Queue migration tasks
  • RDS PostgreSQL: Source (Beehive) & destination (Live) database
  • S3: Backup Beehive data before migration
  • SNS: Notify stakeholders of migration status
  • CloudWatch: Monitor migration progress & errors

๐Ÿš€ FRAME 5: Go Live Transition Process

โœ… Readiness Checklist

Required Steps (Must Complete)

  • โœ… Select subscription plan
  • โœ… Configure Beezora AI assistant
  • โœ… Connect at least 1 channel (WhatsApp, Email, or Social)
  • โœ… Add payment method (credit card)
  • โœ… Accept Terms of Service & Privacy Policy

Recommended Steps (Highly Suggested)

  • โš ๏ธ Complete brand kit customization
  • โš ๏ธ Create at least 3 message templates
  • โš ๏ธ Activate at least 1 automation
  • โš ๏ธ Import initial contacts
  • โš ๏ธ Invite team members
  • โš ๏ธ Test web chat widget

๐Ÿ“Š Readiness Score Calculation

// Readiness Score Algorithm function calculateReadinessScore(beehiveAccount) { let score = 0; // Required steps (60% weight) if (beehiveAccount.planSelected) score += 15; if (beehiveAccount.beezoraCon figured) score += 15; if (beehiveAccount.channelsConnected >= 1) score += 15; if (beehiveAccount.paymentMethodAdded) score += 10; if (beehiveAccount.termsAccepted) score += 5; // Recommended steps (40% weight) if (beehiveAccount.brandKitComplete) score += 10; if (beehiveAccount.templatesCreated >= 3) score += 10; if (beehiveAccount.automationsActive >= 1) score += 10; if (beehiveAccount.contactsImported >= 10) score += 5; if (beehiveAccount.teamMembersInvited >= 1) score += 3; if (beehiveAccount.webChatTested) score += 2; return Math.min(score, 100); // Cap at 100% } // Can go live if score >= 80% const canGoLive = score >= 80;

๐ŸŽ‰ Post-Go-Live Experience

What Happens After Going Live

  1. Immediate Access: Redirected to Live Dashboard
  2. Welcome Email: Confirmation with quick start guide
  3. Onboarding Tour: Interactive guide in Live Dashboard
  4. Support Monitoring: 72-hour proactive support monitoring
  5. First Invoice: Prorated first month billing
  6. Success Check-in: Support call within 7 days

โš™๏ธ AWS Infrastructure (Beehive)

Beehive Infrastructure Components

  • RDS PostgreSQL: Separate database schema for Beehive (beehive_*)
  • ECS Fargate: Same application, environment flag for Beehive mode
  • Lambda: Scheduled job to check expired Beehive accounts
  • SNS: Reminders at 7 days, 3 days, 1 day before expiry
  • CloudWatch Events: Daily readiness score recalculation
  • S3: Backup Beehive data before archival

๐Ÿ“ก API Endpoints Summary

Method Endpoint Description
POST /api/beehive/go-live Initiate go-live migration
GET /api/beehive/migration-status Check migration progress
POST /api/beehive/rollback Rollback to Beehive (within 7 days)
GET /api/beehive/comparison Compare Beehive vs Live data
โ†‘