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
- PostgreSQL is reachable via
DATABASE_URL. - At least one auth user exists in
auth.user. - 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-activityDefault behavior:
- Picks the earliest created user.
- Uses dummy client phone
+15550000001. - Uses dummy client name
Demo Offline Client. - Inserts
40activity rows.
Target a specific user
SKIP_ENV_VALIDATION=true \
SEED_USER_EMAIL=you@example.com \
pnpm --filter @wp-engine/db seed:dummy-activityIf 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-activityWhat gets inserted
Client (clients)
id: generated UUIDuser_id: selected owner userphone_number:SEED_CLIENT_PHONEor defaultname:SEED_CLIENT_NAMEor defaultworker_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_typeonsend-message:text,image,video- recent
created_attimestamps for realistic sorting/filter testing
Verify in the dashboard
- Open
/clientsand confirm the demo client appears with a stopped worker state. - Open
/activityand verify rows render with filters and status badges. - Use filters for
status,type, andclientIdto validate table behavior.