WWP Engine Docs
Guides

Seed Dummy Client and Activity

Create one offline demo client and populate synthetic /activity rows for UI testing

Use this when you need quick test data for /clients and /activity without pairing a real WhatsApp account.

The script creates (or reuses) one client with workerDesiredState = stopped, then inserts activity rows linked to that client.

Prerequisites

  1. PostgreSQL is reachable via DATABASE_URL.
  2. At least one auth user exists in auth.user.
  3. Run from repository root.

The script auto-loads env values from .env, apps/web/.env, and apps/server/.env (first value wins), so manual source is usually unnecessary.

Default command

SKIP_ENV_VALIDATION=true pnpm --filter @wp-engine/db seed:dummy-activity

Default behavior:

  • Picks the earliest created user.
  • Uses dummy client phone +15550000001.
  • Uses dummy client name Demo Offline Client.
  • Inserts 40 activity rows.

Target a specific user

SKIP_ENV_VALIDATION=true \
SEED_USER_EMAIL=you@example.com \
pnpm --filter @wp-engine/db seed:dummy-activity

If no user exists for SEED_USER_EMAIL, the script exits with an error.

Customize seed data

SKIP_ENV_VALIDATION=true \
SEED_USER_EMAIL=you@example.com \
SEED_CLIENT_NAME="My Offline Demo Client" \
SEED_CLIENT_PHONE="+15550000002" \
SEED_ACTIVITY_COUNT=75 \
pnpm --filter @wp-engine/db seed:dummy-activity

What gets inserted

Client (clients)

  • id: generated UUID
  • user_id: selected owner user
  • phone_number: SEED_CLIENT_PHONE or default
  • name: SEED_CLIENT_NAME or default
  • worker_desired_state: stopped

Activity (api_activity)

Rows are synthetic but shaped like real records used by /activity:

  • mixed status: success, timeout, error
  • mixed type: send-message, send-interactive, fetch-contacts
  • message_type on send-message: text, image, video
  • recent created_at timestamps for realistic sorting/filter testing

Verify in the dashboard

  1. Open /clients and confirm the demo client appears with a stopped worker state.
  2. Open /activity and verify rows render with filters and status badges.
  3. Use filters for status, type, and clientId to validate table behavior.

On this page