Skip to Content
Welcome to the new Haccpy docs! đź‘‹
User GuideViolations

Violations

Overview

The Violations page (/{tenant}/violations) lists food safety issues detected by the AI system. Violations are created by the detection pipeline, not manually; users can view, filter, and open details.

What is a violation?

A violation typically includes:

  • ID — Unique identifier
  • Timestamp — When it was detected (ISO datetime)
  • Location — Which location (kitchen, warehouse, etc.)
  • Camera — Which camera captured it
  • Detections — One or more detections, each with:
    • Bounding box — Coordinates of the detected area in the image
    • Tags — Labels (e.g. “no_hat”, “dirty_surface”)
    • Confidence — Detection confidence score
  • Tags — Aggregated or high-level tags for the violation (e.g. for filtering)

The detail view usually shows a signed image URL so the user can see the snapshot associated with the violation.

Violations list

  • Table or card list — Columns often include: timestamp, location, camera, tags, and actions (e.g. “View”).
  • Stats — Summary cards (e.g. total violations, by severity or time range).
  • Filters — Common filters:
    • Location — Filter by location ID or name
    • Tags — Filter by one or more tags (e.g. from query params: ?tags=no_hat)
    • Date / time range — If supported by the API
  • Pagination — page and perPage (or size) in query params.

Violation detail

Opening a violation (e.g. row action or “View”) opens a detail view (modal or page) that shows:

  • Full violation metadata (timestamp, location, camera)
  • Image — From the signed imageUrl
  • Detections — Bounding boxes and tags per detection
  • Tags — All tags associated with the violation

Violations are read-only; users do not create or edit them in the app. They are generated by the backend/AI pipeline.

URL and query params

  • List: /{tenant}/violations
  • Optional query params (depend on implementation): locationId, tags (single or multiple), page, perPage

Example: /{tenant}/violations?locationId=loc-123&tags=no_hat&page=1&perPage=20

Last updated on