Skip to content

svc-guest-profiles

NovaTrek Adventures - Guest Profiles Service  |  Guest Identity  |  v2.4.0  |  NovaTrek Platform Engineering

Manages guest registration, profile management, preferences, medical

Swagger UI Download OpenAPI Spec Live Service (Dev) Azure Portal CI/CD Pipeline Source Code Technology Stack

Delivery Status

Delivery Wave: 1 -- Guest Identity and Product Catalog

Stage Status
Infrastructure (Bicep) ✅ complete
Database Schema (Flyway) ✅ complete
Deployed to Dev ✅ complete
Smoke Tested ✅ complete
Deployed to Prod not-started
Pipeline Status
CI Pipeline ✅ complete
CD Pipeline ✅ complete

Azure Resources (Dev):


Integration Context

svc-guest-profiles C4 context diagram

Generated from architecture/specs/svc-guest-profiles.yaml + cross-service-calls.yaml

Data Store

Entity Relationship Diagram

svc-guest-profiles entity relationship diagram

Generated from architecture/metadata/data-stores.yaml

Overview

Property Detail
Engine PostgreSQL 15
Schema guests
Tables guest_profiles, certifications, medical_info, emergency_contacts, adventure_history
Estimated Volume ~800 new profiles/day peak season
Connection Pool min 10 / max 30 / idle timeout 10min
Backup Strategy Continuous WAL archiving, daily base backup, 90-day PITR (GDPR)

Key Features

  • PII encrypted at rest (AES-256)
  • Composite index on (last_name, date_of_birth)
  • Soft delete with GDPR data retention policy

Table Reference

guest_profiles

Core guest identity records with PII encryption

Column Type Constraints
guest_id UUID PK
first_name VARCHAR(100) NOT NULL, ENCRYPTED
last_name VARCHAR(100) NOT NULL, ENCRYPTED
email VARCHAR(255) NOT NULL, UNIQUE, ENCRYPTED
phone VARCHAR(30) NULL, ENCRYPTED
date_of_birth DATE NOT NULL
loyalty_tier VARCHAR(20) DEFAULT 'bronze'
identity_verified BOOLEAN NOT NULL, DEFAULT FALSE
deleted_at TIMESTAMPTZ NULL (soft delete)
created_at TIMESTAMPTZ NOT NULL
updated_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_guest_email on email (UNIQUE)
  • idx_guest_name_dob on last_name, date_of_birth
  • idx_guest_loyalty on loyalty_tier

certifications

Guest adventure certifications (scuba, climbing, etc.)

Column Type Constraints
cert_id UUID PK
guest_id UUID NOT NULL, FK -> guest_profiles
cert_type VARCHAR(50) NOT NULL
issuer VARCHAR(100) NOT NULL
issued_date DATE NOT NULL
expiry_date DATE NULL
document_url TEXT NULL

Indexes:

  • idx_cert_guest on guest_id
  • idx_cert_expiry on expiry_date

medical_info

Guest medical conditions and allergy records (encrypted PII)

Column Type Constraints
medical_id UUID PK
guest_id UUID NOT NULL, FK -> guest_profiles
conditions JSONB ENCRYPTED
allergies JSONB ENCRYPTED
emergency_medications JSONB ENCRYPTED
updated_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_medical_guest on guest_id (UNIQUE)

emergency_contacts

Emergency contact information for each guest

Column Type Constraints
contact_id UUID PK
guest_id UUID NOT NULL, FK -> guest_profiles
name VARCHAR(200) NOT NULL, ENCRYPTED
phone VARCHAR(30) NOT NULL, ENCRYPTED
relationship VARCHAR(50) NOT NULL
is_primary BOOLEAN NOT NULL, DEFAULT TRUE

Indexes:

  • idx_emg_guest on guest_id

adventure_history

Record of completed adventures per guest for profile display

Column Type Constraints
history_id UUID PK
guest_id UUID NOT NULL, FK -> guest_profiles
trip_id UUID NOT NULL
trip_date DATE NOT NULL
adventure_category VARCHAR(50) NOT NULL
rating SMALLINT NULL, CHECK (1-5)
completed_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_hist_guest on guest_id, trip_date DESC

Solutions Affecting This Service

Ticket Solution Capabilities Date
NTK-10008 Guest Reviews and Ratings Platform CAP-1.7, CAP-1.2 2026-03-06

Endpoints (9 total)


GET /guests -- Search guests

Search and filter the guest registry. Supports partial name matching,

View in Swagger UI

GET /guests sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


POST /guests -- Register a new guest

Create a new guest profile. The email address must be unique across

View in Swagger UI

POST /guests sequence diagram

Architect-authored — overrides auto-generated baseline Source: architecture/diagrams/endpoints/svc-guest-profiles--post-guests.puml


GET /guests/{guest_id} -- Get guest profile

Retrieve the full profile for a specific guest by ID.

View in Swagger UI

GET /guests/{guest_id} sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


PATCH /guests/{guest_id} -- Update guest profile

Partially update a guest profile. Only the fields provided in the

View in Swagger UI

PATCH /guests/{guest_id} sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


GET /guests/{guest_id}/certifications -- List guest certifications

Retrieve all certifications on file for a guest, including expired

View in Swagger UI

GET /guests/{guest_id}/certifications sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


POST /guests/{guest_id}/certifications -- Add a certification

Record a new certification for a guest. Certification documents

View in Swagger UI

POST /guests/{guest_id}/certifications sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


GET /guests/{guest_id}/medical-info -- Get guest medical information

Retrieve the medical information on file for a guest. Access to this

View in Swagger UI

GET /guests/{guest_id}/medical-info sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


PUT /guests/{guest_id}/medical-info -- Update guest medical information

Replace the medical information record for a guest. This is a full

View in Swagger UI

PUT /guests/{guest_id}/medical-info sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


GET /guests/{guest_id}/adventure-history -- Get guest adventure history

Retrieve the adventure participation history for a guest. Each entry

View in Swagger UI

GET /guests/{guest_id}/adventure-history sequence diagram

Generated from architecture/specs/svc-guest-profiles.yaml Auto-generated baseline — shows standard request flow. For detailed behavioral sequences, see the relevant solution design.


Consuming Applications

Application Screens Using This Service
Guest Portal Booking Flow, Guest Profile, Waiver Signing
Operations Dashboard Check-In Station, Safety Incident Board
Adventure App Self Check-In, Earn Loyalty Points

Events Published

Event Channel Trigger Consumers
guest.registered novatrek.guest-identity.guest.registered POST /guests svc-loyalty-rewards, svc-analytics