Skip to content

Notifications

An operator reports a problem, a job creeps toward its due date, a part is finished. Notifications surface those events as a toast in the app, so nobody has to go looking for what changed.

An event in the database fires a trigger, which writes a notifications row. Supabase Realtime pushes that row to everyone it concerns and the app shows a toast. The row stays stored, so the history is available through the database and the API.

flowchart LR
  E["Event<br/>(issue, part, assignment,<br/>due date, completion)"] --> T["Database trigger"]
  T --> N[("notifications row")]
  N -->|Supabase Realtime| Toast["Toast in the app"]
  Toast -->|Pin| N
TypeWhenWho sees it
New issueAn operator reports a quality issueAdmins (severity matches the issue)
Job due soonA job’s due date is within 7 daysAdmins (high at 1 day, medium at 3, low at 7)
New partA part is addedAdmins
New assignmentWork is assigned to an operatorThe assigned operator
Part completedA part is finishedAdmins
New userSomeone joins the workspaceAdmins

Job-due checks de-duplicate within a 24-hour window, so an approaching deadline does not repeat every minute.

Every notification is scoped to its workspace and protected by row-level security. A notification targets one person (an operator’s assignment) or the whole workspace, and realtime delivery is filtered per workspace.