svc-safety-compliance¶
NovaTrek Safety and Compliance Service | Safety | v1.0.0 | NovaTrek Safety Operations
Manages guest safety waivers, incident reporting, safety inspections, and
Swagger UI Download OpenAPI Spec
Integration Context¶
Data Store¶
Overview¶
| Property | Detail |
|---|---|
| Engine | PostgreSQL 15 |
| Schema | safety |
| Tables | waivers, incidents, safety_inspections, audit_log |
| Estimated Volume | ~3,000 waiver checks/day |
| Connection Pool | min 5 / max 20 / idle timeout 10min |
| Backup Strategy | Continuous WAL archiving, daily base backup, 7-year retention (regulatory) |
Key Features¶
- Immutable audit log (append-only)
- Digital signature verification for waivers
- Regulatory compliance retention (7 years)
Table Reference¶
waivers¶
Signed liability waivers with digital signature verification
| Column | Type | Constraints |
|---|---|---|
waiver_id | UUID | PK |
guest_id | UUID | NOT NULL |
trip_id | UUID | NOT NULL |
waiver_type | VARCHAR(50) | NOT NULL |
signed_at | TIMESTAMPTZ | NULL |
signature_ref | VARCHAR(255) | NULL (DocuSign envelope ID) |
status | VARCHAR(20) | NOT NULL, DEFAULT 'pending' |
expires_at | TIMESTAMPTZ | NULL |
created_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_waiver_guest_triponguest_id, trip_ididx_waiver_statusonstatus
incidents¶
Safety incident reports with severity classification
| Column | Type | Constraints |
|---|---|---|
incident_id | UUID | PK |
trip_id | UUID | NULL |
location_id | UUID | NULL |
severity | VARCHAR(20) | NOT NULL |
description | TEXT | NOT NULL |
reported_by | VARCHAR(100) | NOT NULL |
reported_at | TIMESTAMPTZ | NOT NULL |
resolved_at | TIMESTAMPTZ | NULL |
resolution_notes | TEXT | NULL |
Indexes:
idx_incident_severityonseverity, reported_at DESCidx_incident_tripontrip_id
audit_log¶
Immutable append-only audit trail for regulatory compliance
| Column | Type | Constraints |
|---|---|---|
log_id | BIGSERIAL | PK |
entity_type | VARCHAR(50) | NOT NULL |
entity_id | UUID | NOT NULL |
action | VARCHAR(20) | NOT NULL |
actor | VARCHAR(100) | NOT NULL |
details | JSONB | NOT NULL |
logged_at | TIMESTAMPTZ | NOT NULL, DEFAULT NOW() |
Indexes:
idx_audit_entityonentity_type, entity_ididx_audit_timeonlogged_at
Endpoints (8 total)¶
GET /waivers -- List waivers by guest¶
POST /waivers -- Guest signs a safety waiver¶
GET /waivers/{waiver_id} -- Get a specific waiver¶
POST /incidents -- File an incident report¶
GET /incidents/{incident_id} -- Get an incident report¶
PATCH /incidents/{incident_id} -- Update an incident report (add follow-up, change status)¶
GET /safety-inspections -- List safety inspections for a location¶
POST /safety-inspections -- Record a safety inspection¶
Consuming Applications¶
| Application | Screens Using This Service |
|---|---|
| Guest Portal | Waiver Signing |
| Operations Dashboard | Check-In Station, Safety Incident Board |
| Adventure App | Self Check-In |
Events Published¶
| Event | Channel | Trigger | Consumers |
|---|---|---|---|
incident.reported | novatrek.safety.incident.reported | POST /incidents | svc-notifications, svc-analytics |
Events Consumed¶
| Event | Producer | Channel |
|---|---|---|
emergency.triggered | svc-emergency-response | novatrek.safety.emergency.triggered |