Skip to content

Ubiquitous language

The Eriga API uses a small, consistent vocabulary. The same words appear in request paths, payload fields, and error messages — this page lists them in one place.

For the formal schema of each aggregate (fields, relations, invariants) see Domain model.

Billing entity and data isolation boundary. Represents a company, a consulting practice, or any organization using Eriga. Every other entity belongs to exactly one Space. The ability to operate depends on the subscription status, not on the Space status.

A tag that labels Resources inside a Space. Units are logical groupings — sites, teams, cost centers — not a structured org chart. There is no hierarchy between Units. A Resource can carry multiple Unit tags.

A person or asset registered in a Space. Resources can exist without any Unit assignment. The type field is immutable after creation and determines which Actions can apply.

A compliance requirement defined at Space level. Describes a recurring obligation that some Resources must fulfill (a training course, a medical check, an equipment inspection). Optionally associated with Units to limit scope. The targetResourceType is immutable after creation.

Proof of fulfillment linking a Resource to an Action. Carries an explicit expiresAt — expired certificates do not count as coverage. If a real-world document fulfills multiple Actions, one Certificate per Action is issued.

Embedded value object on a Certificate. Holds an opaque URL pointing to an external store (Google Drive, Dropbox, SharePoint, etc.) plus a descriptive label. Eriga never stores the file itself.

Domain fact: “user X has role Y on Unit Z”. A user has at most one role per Unit; assigning a new one replaces the previous assignment.

Placeholder for a pending role assignment to a user who has not signed up yet. Keyed by (unitId, email). Consumed into a UnitRoleAssignment when the user registers.

Grants the Admin role at Space level. Only the Space Owner can create or remove Admin assignments.

Conformance state of a Resource with respect to an Action. Never persisted — computed on the fly from the join of Resource → Unit ← Action plus type matching and Certificate validity.

ValueMeaning
activeSpace is operational
deletedTombstone — the Space record remains for historical reference

Subscription-driven blocks (expired, payment failed, etc.) are not modeled on SpaceStatus — they are checked against the subscription state and apply independently.

ValueMeaning
personEmployee, consultant, contractor
equipmentMachine, vehicle, tool
environmentLaboratory, work area, site
substanceChemical, hazardous substance
ValueMeaning
trainingTraining course
healthHealth surveillance (medical exam)
checkInspection or verification
ppePersonal protective equipment
maintenanceMaintenance task

Composite value — how long a Certificate for a given Action stays valid.

  • value — integer (e.g. 4)
  • unit — one of year, month, day
ValueMeaning
operatorCan issue, update, and revoke Certificates on the assigned Unit
viewerRead-only access on the assigned Unit
ValueMeaning
compliantA valid Certificate covers the obligation
expiringCertificate exists but will expire within the configured threshold
non_compliantNo valid Certificate for an existing obligation

A (Resource, Action) pair is an obligation when:

  1. the Resource is assigned to at least one Unit, and
  2. the Action is associated with the same Unit, and
  3. resource.type === action.targetResourceType.

Obligations are never materialized in a table — they are computed via joins at query time.

An obligation is fulfilled when a valid (non-expired) Certificate exists for the (Resource, Action) pair.

An obligation without a valid Certificate. Returned by GetComplianceGaps and similar queries.

Every entity belongs to exactly one Space and no operation ever crosses that boundary. The Space is the unit of security, multi-tenancy, and billing.

All associations must stay within one Space:

  • a Resource’s Units must belong to the Resource’s Space
  • an Action’s Units must belong to the Action’s Space
  • a Certificate’s Resource and Action must share the same Space

An Action applies to a Resource only when action.targetResourceType === resource.type. Pairs that do not match on type do not produce an obligation and are rejected when issuing a Certificate.