> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowrensic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Run Flowrensic locally and connect a Temporal worker.

# Get Flowrensic running

The standalone Compose setup starts Flowrensic, Temporal, Prometheus, Grafana, and a demo worker. The demo worker creates sample findings so you can explore the UI immediately.

Create a directory for the Compose file, then copy the YAML below into a file named `docker-compose.yml`. Use the code block's copy button to copy the full file.

```bash theme={null}
mkdir -p flowrensic-quickstart && cd flowrensic-quickstart
```

```yaml theme={null}
# Start the standalone app and its preconfigured local monitoring stack with:
#   docker compose -f deploy/standalone/docker-compose.yml up -d
# The demo worker starts workflows that fail, retry, and time out so findings
# appear in Flowrensic without connecting the stack to an external Temporal service.
#
# With the default ports, open these URLs on the Docker host:
#   Flowrensic UI:                    http://127.0.0.1:8080/
#   Flowrensic API docs:               http://127.0.0.1:8080/docs
#   Flowrensic OpenAPI spec:           http://127.0.0.1:8080/openapi.yaml
#   Flowrensic health:                 http://127.0.0.1:8080/healthz
#   Flowrensic readiness:              http://127.0.0.1:8080/readyz
#   Flowrensic Prometheus metrics:     http://127.0.0.1:9464/metrics
#   Grafana home:                      http://127.0.0.1:3000/
#   Grafana judging dashboard:         http://127.0.0.1:3000/d/flowrensic-judging/flowrensic-judging
#   Grafana platform dashboard:        http://127.0.0.1:3000/d/flowrensic-platform/flowrensic-platform
#   Grafana storage and ingest:        http://127.0.0.1:3000/d/flowrensic-storage-and-ingest/flowrensic-storage-and-ingest
#   Temporal UI:                       http://127.0.0.1:8233/
#   Temporal gRPC:                     127.0.0.1:7233
#   Temporal Prometheus metrics:       http://127.0.0.1:9233/metrics
# Prometheus itself is internal to this Compose network at http://prometheus:9090/;
# it has no host port published by default. FLOWRENSIC_PORT,
# FLOWRENSIC_METRICS_PORT, and FLOWRENSIC_GRAFANA_PORT change the host ports.

services:
  standalone:
    image: ${FLOWRENSIC_STANDALONE_IMAGE:-flowrensic/flowrensic-standalone:latest}
    restart: unless-stopped
    environment:
      FLOWRENSIC_ENVS: '${FLOWRENSIC_ENVS:-[{"name":"local","kind":"dev","accessKey":"${FLOWRENSIC_LOCAL_ENV_KEY:-local-access-key}","readKey":"local-read-key","address":"temporal:7233","metricsAddress":"temporal:9233","namespaces":[{"name":"default"}]}]}'
      FLOWRENSIC_REQUIRED_ENVS: ${FLOWRENSIC_REQUIRED_ENVS:-local}
    depends_on:
      temporal:
        condition: service_healthy
    ports:
      - "${FLOWRENSIC_PORT_BIND:-127.0.0.1}:${FLOWRENSIC_PORT:-8080}:8080"
      - "${FLOWRENSIC_METRICS_BIND:-127.0.0.1}:${FLOWRENSIC_METRICS_PORT:-9464}:9464"
    volumes:
      - postgres-data:/var/lib/postgresql/data
      - blobs:/var/lib/flowrensic/blobs

  temporal:
    image: temporalio/temporal:1.5.0
    restart: unless-stopped
    command:
      - server
      - start-dev
      - --ip
      - 0.0.0.0
      - --ui-ip
      - 0.0.0.0
      - --metrics-port
      - "9233"
    ports:
      - "${TEMPORAL_PORT_BIND:-127.0.0.1}:${TEMPORAL_PORT:-7233}:7233"
      - "${TEMPORAL_UI_BIND:-127.0.0.1}:${TEMPORAL_UI_PORT:-8233}:8233"
      - "${TEMPORAL_METRICS_BIND:-127.0.0.1}:${TEMPORAL_METRICS_PORT:-9233}:9233"
    healthcheck:
      test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "127.0.0.1:7233"]
      interval: 2s
      timeout: 5s
      retries: 15

  demo-worker:
    image: ${FLOWRENSIC_DEMO_WORKER_IMAGE:-flowrensic/flowrensic-demo-worker:latest}
    restart: unless-stopped
    depends_on:
      temporal:
        condition: service_healthy
      standalone:
        condition: service_healthy
    environment:
      TEMPORAL_ADDRESS: temporal:7233
      TEMPORAL_NAMESPACE: default
      TEMPORAL_TLS: "false"
      TEMPORAL_TASK_QUEUE: flowrensic-demo
      FLOWRENSIC_URL: http://standalone:8080
      FLOWRENSIC_DEPLOY_ENV: local
      FLOWRENSIC_ENV_KEY: ${FLOWRENSIC_LOCAL_ENV_KEY:-local-access-key}
      START_EVERY_SECONDS: ${FLOWRENSIC_DEMO_START_EVERY_SECONDS:-10}

  prometheus:
    image: ${FLOWRENSIC_PROMETHEUS_IMAGE:-flowrensic/flowrensic-prometheus:latest}
    restart: unless-stopped
    depends_on:
      - standalone
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --storage.tsdb.path=/prometheus
      - --storage.tsdb.retention.time=15d
    volumes:
      - prometheus-data:/prometheus

  grafana:
    image: ${FLOWRENSIC_GRAFANA_IMAGE:-flowrensic/flowrensic-grafana:latest}
    restart: unless-stopped
    depends_on:
      - prometheus
    environment:
      GF_AUTH_ANONYMOUS_ENABLED: "true"
      GF_AUTH_ANONYMOUS_ORG_ROLE: Viewer
      GF_AUTH_DISABLE_LOGIN_FORM: "true"
    ports:
      - "${FLOWRENSIC_GRAFANA_BIND:-127.0.0.1}:${FLOWRENSIC_GRAFANA_PORT:-3000}:3000"

volumes:
  postgres-data:
  blobs:
  prometheus-data:
```

Start the stack from that directory:

```bash theme={null}
docker compose up -d
```

The first start downloads the images. When the containers are healthy, open:

* [Flowrensic](http://127.0.0.1:8080/)
* [Grafana dashboards](http://127.0.0.1:3000/)
* [Temporal UI](http://127.0.0.1:8233/)

Flowrensic findings appear after the demo worker runs. Prometheus is included on the private Compose network and scrapes Flowrensic and Temporal metrics. The bundled Grafana is preconfigured with Flowrensic dashboards and opens without a login for local use.

To stop the stack, run `docker compose down`. To stop it and remove its persisted data, run `docker compose down -v`.

> [!NOTE]
>
> This Compose file is a local standalone demo. It starts its own Temporal server and demo worker. For an existing Temporal deployment, configure the standalone service to connect to that server and remove the demo worker service.

## Add the Node SDK to a worker

Install the package in your Temporal worker project:

```bash theme={null}
npm install @flowrensic/node
```

The standalone image registers a `local` environment and the `default` namespace. For a worker running on your host, use Flowrensic at `http://127.0.0.1:8080` and the local environment key `local-access-key` (change it before exposing the service beyond your machine). Get the namespace ID with:

```bash theme={null}
curl -sS http://127.0.0.1:8080/flowrensic.v1.CatalogService/ListNamespaces \
  -H 'content-type: application/json' \
  -d '{}'
```

Use the `id` of the `default` namespace in the response below. Create a sink once when your worker process starts, then attach the activity interceptor. `envInstanceId` should identify this worker process; `version` can be your deployed code version.

```ts theme={null}
import { Worker } from '@temporalio/worker';
import { createAttemptSink, flowrensicInterceptor } from '@flowrensic/node';

const namespaceId = process.env.FLOWRENSIC_NAMESPACE_ID!;
const env = {
  env: 'local',
  envInstanceId: process.env.HOSTNAME ?? 'my-worker',
  version: process.env.GIT_SHA,
};
const sink = createAttemptSink({
  baseUrl: process.env.FLOWRENSIC_URL ?? 'http://127.0.0.1:8080',
  envKey: process.env.FLOWRENSIC_ENV_KEY ?? 'local-access-key',
});

const worker = await Worker.create({
  // Keep your existing connection, namespace, taskQueue, and workflowsPath settings.
  connection,
  namespace: 'default',
  taskQueue: 'my-task-queue',
  workflowsPath,
  activities,
  interceptors: {
    activity: [flowrensicInterceptor(sink, namespaceId, env)],
  },
});

try {
  await worker.run();
} finally {
  await sink.close();
}
```

The SDK records one event per activity attempt and sends it to Flowrensic in batches. Telemetry failures do not fail the activity. Install Temporal's Node SDK packages alongside `@flowrensic/node`; the SDK requires Temporal 1.24 or newer.

## Screenshots

Browse the screens for each browser-accessible URL in the standalone Compose setup. Select a tab or use the arrow keys.

> [tab] Findings
>
> ![Flowrensic findings page](https://mintcdn.com/flowrensic/5S1xCK1lVtRXqx3x/images/standalone/flowrensic-findings.png?fit=max\&auto=format\&n=5S1xCK1lVtRXqx3x\&q=85\&s=aebd896097cde759360e81ec9ef8efd5)
>
> [Open Flowrensic findings](http://127.0.0.1:8080/findings)

> [tab] Temporal UI
>
> ![Temporal workflows page with demo runs](https://mintcdn.com/flowrensic/g81Vo7i9oOrg9RvK/images/standalone/temporal.png?fit=max\&auto=format\&n=g81Vo7i9oOrg9RvK\&q=85\&s=d064eb5a50cbed0ab254d6a60885aea2)
>
> [Open Temporal UI](http://127.0.0.1:8233/)

> [tab] API docs
>
> ![Flowrensic API documentation](https://mintcdn.com/flowrensic/g81Vo7i9oOrg9RvK/images/standalone/api-docs.png?fit=max\&auto=format\&n=g81Vo7i9oOrg9RvK\&q=85\&s=ee3d4983b7af00c4c7cde6cce1d4f389)
>
> [Open API docs](http://127.0.0.1:8080/docs)

> [tab] Flowrensic metrics
>
> ![Flowrensic Prometheus metrics](https://mintcdn.com/flowrensic/g81Vo7i9oOrg9RvK/images/standalone/flowrensic-metrics.png?fit=max\&auto=format\&n=g81Vo7i9oOrg9RvK\&q=85\&s=5805bb6862af4c7ac38b341fcfc9b9fc)
>
> [Open Flowrensic metrics](http://127.0.0.1:9464/metrics)

> [tab] Judging dashboard
>
> ![Grafana Flowrensic judging dashboard](https://mintcdn.com/flowrensic/5S1xCK1lVtRXqx3x/images/standalone/grafana-judging.png?fit=max\&auto=format\&n=5S1xCK1lVtRXqx3x\&q=85\&s=bd46f02553c5403b51d0fc27e0fff74e)
>
> [Open judging dashboard](http://127.0.0.1:3000/d/flowrensic-judging/flowrensic-judging)

> [tab] Platform dashboard
>
> ![Grafana Flowrensic platform dashboard](https://mintcdn.com/flowrensic/5S1xCK1lVtRXqx3x/images/standalone/grafana-platform.png?fit=max\&auto=format\&n=5S1xCK1lVtRXqx3x\&q=85\&s=1a4708b115a2cf2a80b72ba410b23c1c)
>
> [Open platform dashboard](http://127.0.0.1:3000/d/flowrensic-platform/flowrensic-platform)

> [tab] Storage and ingest
>
> ![Grafana Flowrensic storage and ingest dashboard](https://mintcdn.com/flowrensic/5S1xCK1lVtRXqx3x/images/standalone/grafana-storage.png?fit=max\&auto=format\&n=5S1xCK1lVtRXqx3x\&q=85\&s=a9b561789a85ca0393d622081921d5a3)
>
> [Open storage and ingest dashboard](http://127.0.0.1:3000/d/flowrensic-storage-and-ingest/flowrensic-storage-and-ingest)

> [tab] Temporal metrics
>
> ![Temporal Prometheus metrics](https://mintcdn.com/flowrensic/g81Vo7i9oOrg9RvK/images/standalone/temporal-metrics.png?fit=max\&auto=format\&n=g81Vo7i9oOrg9RvK\&q=85\&s=fb01cde5db2ce202ec5ad05ed3289a2e)
>
> [Open Temporal metrics](http://127.0.0.1:9233/metrics)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.