Skip to content

svc-gear-inventory

NovaTrek Adventures - Gear Inventory Service  |  Logistics  |  v2.4.0  |  NovaTrek Platform Engineering

Manages rental equipment inventory, gear packages, guest assignments,

Swagger UI Download OpenAPI Spec


Integration Context

svc-gear-inventory C4 context diagram

Data Store

Overview

Property Detail
Engine PostgreSQL 15
Schema gear
Tables gear_items, gear_packages, gear_assignments, maintenance_records, inventory_levels
Estimated Volume ~1,500 assignments/day peak season
Connection Pool min 5 / max 20 / idle timeout 10min
Backup Strategy Daily pg_dump, 30-day retention

Key Features

  • RFID tag tracking via unique identifiers
  • Scheduled maintenance alerts with cron triggers
  • Location-based inventory partitioning

Table Reference

gear_items

Individual gear items tracked by RFID tag

Column Type Constraints
item_id UUID PK
rfid_tag VARCHAR(64) NOT NULL, UNIQUE
gear_type VARCHAR(50) NOT NULL
size VARCHAR(20) NULL
condition VARCHAR(20) NOT NULL, DEFAULT 'good'
location_id UUID NOT NULL
last_inspected DATE NULL
acquired_date DATE NOT NULL

Indexes:

  • idx_gear_rfid on rfid_tag (UNIQUE)
  • idx_gear_type_loc on gear_type, location_id
  • idx_gear_condition on condition

gear_assignments

Gear lent to guests for specific check-ins

Column Type Constraints
assignment_id UUID PK
check_in_id UUID NOT NULL
item_id UUID NOT NULL, FK -> gear_items
assigned_at TIMESTAMPTZ NOT NULL
returned_at TIMESTAMPTZ NULL
condition_on_return VARCHAR(20) NULL

Indexes:

  • idx_assign_checkin on check_in_id
  • idx_assign_item on item_id
  • idx_assign_outstanding on returned_at (WHERE returned_at IS NULL)

maintenance_records

Maintenance and inspection history for gear items

Column Type Constraints
record_id UUID PK
item_id UUID NOT NULL, FK -> gear_items
maintenance_type VARCHAR(30) NOT NULL
performed_by VARCHAR(100) NOT NULL
notes TEXT NULL
performed_at TIMESTAMPTZ NOT NULL
next_due DATE NULL

Indexes:

  • idx_maint_item on item_id, performed_at DESC
  • idx_maint_due on next_due

Endpoints (12 total)


GET /gear-items -- Search gear inventory

Returns a paginated list of gear items matching the provided filters.

View in Swagger UI

GET /gear-items sequence diagram

POST /gear-items -- Add new inventory item

Registers a new piece of gear in the inventory system.

View in Swagger UI

POST /gear-items sequence diagram

GET /gear-items/{item_id} -- Get gear item details

Returns full details for a single gear item including current status and maintenance schedule.

View in Swagger UI

GET /gear-items/{item_id} sequence diagram

PATCH /gear-items/{item_id} -- Update gear item

Partially updates a gear item record. Only provided fields are modified.

View in Swagger UI

PATCH /gear-items/{item_id} sequence diagram

GET /gear-packages -- List gear packages

Returns all predefined gear bundles, optionally filtered by activity type.

View in Swagger UI

GET /gear-packages sequence diagram

GET /gear-packages/{package_id} -- Get gear package details

Returns full details for a gear package including the list of included items and pricing.

View in Swagger UI

GET /gear-packages/{package_id} sequence diagram

POST /gear-assignments -- Assign gear to a participant

Creates a gear assignment linking inventory items to a trip participant.

View in Swagger UI

POST /gear-assignments sequence diagram

GET /gear-assignments/{assignment_id} -- Get gear assignment details

Returns full details of a gear assignment including item list and return status.

View in Swagger UI

GET /gear-assignments/{assignment_id} sequence diagram

DELETE /gear-assignments/{assignment_id} -- Return gear (close assignment)

Marks gear as returned and closes the assignment. Accepts optional

View in Swagger UI

DELETE /gear-assignments/{assignment_id} sequence diagram

PUT /gear-items/{item_id}/maintenance -- Log a maintenance event

Records a maintenance event (inspection, repair, or part replacement) for a gear item and updates its condition and next-due date.

View in Swagger UI

PUT /gear-items/{item_id}/maintenance sequence diagram

GET /gear-items/{item_id}/maintenance-history -- Get maintenance history

Returns the chronological maintenance history for a specific gear item.

View in Swagger UI

GET /gear-items/{item_id}/maintenance-history sequence diagram

GET /inventory-levels -- Get stock levels by location and category

Returns current inventory counts broken down by location and gear category, including available, assigned, and in-maintenance tallies.

View in Swagger UI

GET /inventory-levels sequence diagram

Consuming Applications

Application Screens Using This Service
Operations Dashboard Check-In Station, Inventory Management
Adventure App Self Check-In, Digital Wristband