Skip to content

Erghi Manual Test Guide

Fresh-environment walkthrough from zero to a working integration + chat test.

Prerequisites

  • shared-infra running (Postgres, Redis, GoTrue)
  • Erghi stack: docker compose up -d in Erghi/
  • .env includes SUPABASE_SERVICE_ROLE_KEY and ADMIN_PORTAL_URL=http://localhost:4210

Step 0 — Wipe old data

bash
cd Erghi
chmod +x scripts/reset_local_environment.sh
./scripts/reset_local_environment.sh --yes

This removes all users, workspaces, conversations, integrations, and RAG documents. Schema is preserved.

Step 1 — Register workspace (Admin)

  1. Open http://localhost:4210/register
  2. Fill: workspace name, company website, your name, email, password
  3. You become Owner/Admin with a new workspace

Verify: Dashboard shows zeros/empty (no mock data).

Step 2 — Start company sandbox

The sandbox is a temporary project outside ErghiPlatform:

bash
cd ../../Erghi.ManualTestSandbox   # from Erghi/
dotnet run

Delete when done — see Erghi.ManualTestSandbox/REMOVE_AFTER_TESTING.md.

Open http://localhost:5199 — note sample customers/orders.

Step 3 — Add API integration

  1. Admin Portal → Integrations → Add integration
  2. Upload ../../Erghi.ManualTestSandbox/wwwroot/openapi.json
  3. Base URL: http://host.docker.internal:5199 (if chat-service runs in Docker)
  4. Credential: API Key, header X-Api-Key, value acme-sandbox-key-dev
  5. Click Test — should succeed

Step 4 — RAG knowledge (optional)

Admin → RAG → add document:

Returns accepted within 30 days. Gold tier customers get free return shipping.

Step 5 — Create widget

  1. Admin → Widgets → Create widget
  2. Copy embed code
  3. Open User Portal http://localhost:4211 and test chat

Step 6 — Invite agent

  1. Admin → Users → Invite Agent (email only)
  2. Check MailHog http://localhost:8025 for invite link
  3. Agent sets password at /accept-invite, then logs in
  4. Agent sees Dashboard + Conversations only

Step 7 — End-to-end chat test

In the widget, try:

  • "What is the status of order ord-1001?"
  • "List products in stock"
  • "What is your return policy?" (RAG)

URLs

ServiceURL
Admin portalhttp://localhost:4210
User portalhttp://localhost:4211
API gatewayhttp://localhost:5080
Sandbox company APIhttp://localhost:5199
MailHoghttp://localhost:8025

CI-only seeds (do not use for manual testing)

bash
# Optional E2E auth accounts
SEED_E2E_ACCOUNTS=1 ./scripts/phase2/prepare_phase2_tests.sh

# Optional integration fixture workspaces
psql $DATABASE_URL -f scripts/phase2/seed_integration_sample_data.sql

After testing — remove sandbox

See TEMP_SANDBOX_CHECKLIST.md.

Embed AI-powered live chat into any product.