Sign inSign up

optiwariindia/survey-pm-tester

By optiwariindia

•Updated 6 days ago

**Survey PM Tester** is a tool to test survey project management software

Image
Developer tools
0

42

optiwariindia/survey-pm-tester repository overview

⁠Survey PM Tester — Multitenant Survey Endpoint Simulator

Docker Image Size Base Image React Build Tool License

A lightweight, high-performance, multitenant web application designed for Market Research Project Managers (PMs), Sample Operations Specialists, and Router Integration QA Engineers.

It acts as an interactive dummy survey destination page during sample routing tests to verify tracking parameters, monitor real-time Length of Interview (LOI), and test callback return redirects (complete, terminate, overquota, security).


⁠⚡ Quick Start with Docker

Run the container directly using Docker:

docker run -d \
  --name survey-pm-tester \
  -p 80:80 \
  --restart unless-stopped \
  frfs/survey-pm-tester:latest

Open your browser and navigate to:

http://localhost/default

⁠🐳 Docker Compose Example

Create a docker-compose.yml file:

version: '3.8'

services:
  survey-tester:
    image: frfs/survey-pm-tester:latest
    container_name: survey-pm-tester
    restart: always
    ports:
      - "80:80"
    volumes:
      # Optional: Mount your directory of custom tenant JSON configuration files
      - ./custom-tenants:/usr/share/nginx/html/tenants:ro

Run with:

docker compose up -d

⁠🌟 Key Features

  • 🏢 Dynamic Multitenancy: Automatically resolves vendor configurations from the URL path ([app origin]/[tenant-slug]) without hardcoding.
  • ⏱️ Top-Left LOI Stopwatch: Live read-only Length of Interview timer (LOI: 00:00) pinned to the top-left corner that forwards duration to callback endpoints.
  • 🎯 Compact Survey Status Block: Single compact section with 4 outcome actions:
    • Complete Survey (Status: complete)
    • Terminate Survey (Status: terminate / Screenout)
    • Over Quota (Status: overquota)
    • Security Terminate (Status: security / Fraud/Bot)
  • 🔍 Query Parameter Retention: Automatically captures all inbound tracking parameters (rid, uid, pid, session tokens), stores them in local storage, and allows adding, editing, or exporting as JSON / Query strings.
  • ⚠️ 404 Service Not Available with Templates: Navigating to an unconfigured tenant displays a clean diagnostic screen with copyable JSON guidelines to bootstrap the configuration in seconds.
  • ✏️ Tenant-Isolated Endpoint Overrides: Edit redirect targets directly from the browser UI; modifications are saved separately per tenant in browser storage.
  • 📱 Single-Screen Compact Layout: Engineered with auto-fitting responsive grids (minmax(0, 1fr)) that adapt smoothly without horizontal blowout or forced vertical scrolling.

⁠🏢 How Multitenancy Works

The application inspects the first segment of the URL pathname:

http://[host]:[port]/[tenant-slug]?[query-parameters]
Inbound URLActive TenantConfiguration File Loaded
http://localhost/defaultdefault/default.json or /config.json
http://localhost/my-org?pid=proj99my-org/my-org.json

⁠📁 Adding Custom Tenant Configurations

To add a new tenant configuration (e.g., my-org), create my-org.json:

{
  "tenantId": "my-org",
  "name": "My Org Research Router",
  "description": "My Org panel partner redirect endpoints",
  "redirectUrls": {
    "complete": "https://router.my-org.com/api/callback/complete",
    "terminate": "https://router.my-org.com/api/callback/screenout",
    "overquota": "https://router.my-org.com/api/callback/overquota",
    "security": "https://router.my-org.com/api/callback/security"
  }
}
⁠In Docker:

Mount your tenant file directly into the container's web root:

docker run -d -p 80:80 \
  -v $(pwd)/my-org.json:/usr/share/nginx/html/my-org.json:ro \
  frfs/survey-pm-tester:latest

Now access: http://localhost/my-org?rid=test_respondent


⁠🔄 Callback Telemetry Payload

When any outcome button is clicked, the application preserves all original inbound parameters and appends survey telemetry:

https://router.example.com/callback/complete?rid=123&uid=456&status=complete&loi=45&timestamp=2026-10-15T05%3A30%3A00.000Z
  • status: Outcome trigger (complete | terminate | overquota | security)
  • loi: Active interview duration in integer seconds
  • timestamp: ISO 8601 UTC timestamp of execution

⁠🛠️ Tech Stack & Footprint

  • Runtime: Pure static Single Page Application (SPA) served by Alpine Nginx.
  • Frontend: React 19, TypeScript, Lucide Icons.
  • Build Tool: Vite 8.
  • Container: Multi-stage build (node:24-alpine → nginx:alpine).
  • Memory Footprint: ~10 MB RAM in production.
  • Image Size: < 35 MB compressed.

⁠📄 License

This project is licensed under the MIT License.

Tag summary

Content type

Image

Digest

sha256:18d739826…

Size

27.5 MB

Last updated

6 days ago

docker pull optiwariindia/survey-pm-tester:web-1.0.0