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 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 high-level tags for the violation (used for filtering)

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


Period filter

A dropdown in the toolbar controls the time window for all violation data on the page. Options:

OptionRange
TodayFrom midnight to now
YesterdayThe full previous day
Last 7 DaysRolling 7-day window
Last 30 DaysRolling 30-day window

The selected period affects the violations table, the stats sidebar, and the By Use Case tab.


Stats sidebar

The panel on the right side of the page shows three sections for the selected period:

By Use Case

A list of every active detection use case with the number of violations detected in the selected period, ordered by count (highest first).

By Hour

A bar chart showing how violations are distributed across the 24 hours of the day for the selected period.

By Location

A donut chart showing the proportion of violations per location for the selected period. A legend beneath the chart lists up to 4 locations with their counts.


Views

The toolbar has two tab buttons to switch the main panel:

Table view (default)

A paginated table of violations. Columns include: timestamp, location, camera, tags, and a view action.

Filters:

  • Location β€” Filter by location
  • Tags β€” Filter by one or more detection tags
  • Date / time range β€” Narrow to a specific window within the selected period

Pagination: page and perPage query params.

By Use Case view

A card grid β€” one card per detection use case β€” showing:

  • Use case logo and name
  • Category label
  • Total violation count for the selected period, colour-coded:
    • Muted β€” 0 violations
    • Blue β€” 1–4 violations
    • Yellow β€” 5–19 violations
    • Red β€” 20 or more violations
  • Timestamp of the most recent violation

Violation details sheet

Clicking a use case card opens a slide-in panel on the right with all violations for that use case:

  • The period filter is inherited from the parent page but can be changed independently within the sheet
  • A Location dropdown lets you narrow results to a specific location
  • A paginated table lists violations sorted by timestamp (newest first)
  • Columns can be sorted by clicking the column header

Violation detail

Opening a violation (row action or β€œView”) opens a detail view (modal or page) showing:

  • Full violation metadata (timestamp, location, camera)
  • Image β€” From the signed image URL
  • Detections β€” Bounding boxes overlaid on the image, with tags per detection
  • Tags β€” All tags associated with the violation

Violations are read-only; they are generated by the backend AI pipeline and cannot be created or edited in the app.


URLs and query params

ViewURL
Violations list/{tenant}/violations

Optional query params: locationId, tags (single or multiple), page, perPage

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

Replace {tenant} with the tenant slug (e.g. acme).

Last updated on