svc-media-gallery¶
NovaTrek Media Gallery Service | Support | v1.0.2 | NovaTrek Digital Experience Team
Manages trip photos, videos, and media content captured during NovaTrek adventures.
Swagger UI Download OpenAPI Spec
Integration Context¶
Data Store¶
Overview¶
| Property | Detail |
|---|---|
| Engine | PostgreSQL 15 + S3-Compatible Object Store |
| Schema | media |
| Tables | media_items, share_links, albums |
| Estimated Volume | ~500 uploads/day peak season |
| Connection Pool | min 3 / max 15 / idle timeout 10min |
| Backup Strategy | Daily pg_dump, S3 cross-region replication |
Key Features¶
- S3-compatible storage for photos and videos
- Presigned URLs for secure direct upload and download
- Automatic thumbnail generation on upload
Table Reference¶
media_items¶
Metadata for uploaded photos and videos (binary stored in S3)
| Column | Type | Constraints |
|---|---|---|
media_id | UUID | PK |
guest_id | UUID | NOT NULL |
trip_id | UUID | NULL |
media_type | VARCHAR(20) | NOT NULL (photo/video) |
s3_key | VARCHAR(512) | NOT NULL |
thumbnail_key | VARCHAR(512) | NULL |
file_size_bytes | BIGINT | NOT NULL |
width | INTEGER | NULL |
height | INTEGER | NULL |
gps_lat | DECIMAL(9,6) | NULL |
gps_lng | DECIMAL(9,6) | NULL |
uploaded_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_media_guestonguest_id, uploaded_at DESCidx_media_tripontrip_id
share_links¶
Shareable links for media items with expiry
| Column | Type | Constraints |
|---|---|---|
link_id | UUID | PK |
media_id | UUID | NOT NULL, FK -> media_items |
token | VARCHAR(128) | NOT NULL, UNIQUE |
expires_at | TIMESTAMPTZ | NOT NULL |
created_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_share_tokenontoken(UNIQUE)idx_share_expiryonexpires_at
albums¶
Guest-created photo albums grouping media items
| Column | Type | Constraints |
|---|---|---|
album_id | UUID | PK |
guest_id | UUID | NOT NULL |
name | VARCHAR(200) | NOT NULL |
cover_media_id | UUID | NULL, FK -> media_items |
created_at | TIMESTAMPTZ | NOT NULL |
Indexes:
idx_album_guestonguest_id
Endpoints (5 total)¶
GET /media -- List media by reservation or trip¶
POST /media -- Upload a media item¶
Uploads a new photo, video, or panorama. The media is associated with a
GET /media/{media_id} -- Get media item details¶
DELETE /media/{media_id} -- Delete a media item¶
Soft-deletes the media item. Underlying storage is purged after 30 days.
POST /media/{media_id}/share -- Create a shareable link for a media item¶
Generates a time-limited, tokenized URL for sharing with non-authenticated users.
Consuming Applications¶
| Application | Screens Using This Service |
|---|---|
| Guest Portal | Trip Browser, Trip Gallery |
| Adventure App | Photo Upload |