flowchart LR
  subgraph Trigger[Trigger]
    A[Create / Update Domain]
    B[Manual Check List / Detail]
  end

  subgraph UI[Web UI]
    C[Submit form domain]
    D[Call domains.check]
    E[Invalidate query + toast]
  end

  subgraph API[tRPC domainsRouter]
    F[Save / load domain]
    G[Run domain check]
  end

  subgraph DNS[DNS Check]
    H[Resolve IPv4 A record]
    I{Expected IP found?}
  end

  subgraph Result[Persisted Status]
    J[MATCH]
    K[MISMATCH]
    L[UNRESOLVED]
  end

  A --> C --> F --> D
  B --> D
  D --> G --> H --> I
  I -- Ya --> J
  I -- Tidak --> K
  H -- Lookup gagal --> L
  J --> E
  K --> E
  L --> E
