Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 71 additions & 5 deletions docs/schemas/gallery-api.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
"date": {
"type": "object",
"additionalProperties": false,
"required": ["date_folder", "count", "first_at", "latest_at", "duration_ms", "cover_thumbnail_url", "has_explore"],
"required": ["date_folder", "count", "first_at", "latest_at", "duration_ms", "cover_base", "cover_fallback_active", "cover_is_custom", "cover_thumbnail_url", "has_explore"],
"properties": {
"date_folder": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
"count": { "type": "integer", "minimum": 1 },
"first_at": { "type": ["string", "null"], "format": "date-time" },
"latest_at": { "type": ["string", "null"], "format": "date-time" },
"duration_ms": { "type": "integer", "minimum": 0 },
"cover_base": { "type": ["string", "null"], "pattern": "^[A-Za-z0-9_-]+$" },
"cover_fallback_active": { "type": "boolean" },
"cover_is_custom": { "type": "boolean" },
"cover_thumbnail_url": { "type": ["string", "null"], "pattern": "^/gallery/thumb/" },
"has_explore": { "type": "boolean" }
}
Expand All @@ -22,7 +25,6 @@
"required": [
"base",
"date_folder",
"image_url",
"thumbnail_url",
"width",
"height",
Expand All @@ -34,7 +36,6 @@
"properties": {
"base": { "type": "string", "pattern": "^[A-Za-z0-9_-]+$" },
"date_folder": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
"image_url": { "type": "string", "pattern": "^/gallery/image/" },
"thumbnail_url": { "type": "string", "pattern": "^/gallery/thumb/" },
"width": { "type": ["integer", "null"], "minimum": 1 },
"height": { "type": ["integer", "null"], "minimum": 1 },
Expand Down Expand Up @@ -105,20 +106,48 @@
"required": ["url", "width", "height", "updated_at"],
"properties": {
"url": { "type": "string", "pattern": "^/gallery/branding/logo\\.webp\\?v=" },
"width": { "type": "integer", "minimum": 1, "maximum": 360 },
"height": { "type": "integer", "minimum": 1, "maximum": 120 },
"width": { "type": "integer", "minimum": 1, "maximum": 720 },
"height": { "type": "integer", "minimum": 1, "maximum": 240 },
"updated_at": { "type": "string", "format": "date-time" }
}
},
"socialGraphic": {
"type": "object",
"additionalProperties": false,
"required": ["url", "width", "height", "updated_at"],
"properties": {
"url": { "type": "string", "pattern": "^/gallery/branding/socials/[A-Za-z0-9_-]{1,64}/graphic\\.webp\\?v=" },
"width": { "type": "integer", "minimum": 1 },
"height": { "type": "integer", "minimum": 1 },
"updated_at": { "type": "string", "format": "date-time" }
}
},
"social": {
"type": "object",
"additionalProperties": false,
"required": ["id", "platform", "url"],
"properties": {
"id": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" },
"platform": {
"type": "string",
"enum": ["website", "instagram", "tiktok", "youtube", "twitch", "facebook", "x", "threads", "bluesky", "discord", "linkedin", "reddit", "snapchat", "flickr"]
},
"label": { "type": "string", "minLength": 1, "maxLength": 60 },
"url": { "type": "string", "maxLength": 2048, "pattern": "^https?://" },
"graphic": { "$ref": "#/$defs/socialGraphic" }
}
},
"branding": {
"type": "object",
"additionalProperties": false,
"required": [
"brand_name",
"gallery_title",
"show_download_button",
"mode",
"profile_id",
"custom_profiles",
"socials",
"logo",
"updated_at",
"active_profile",
Expand All @@ -127,14 +156,43 @@
"properties": {
"brand_name": { "type": "string", "minLength": 1, "maxLength": 60 },
"gallery_title": { "type": "string", "minLength": 1, "maxLength": 80 },
"show_download_button": { "type": "boolean", "default": false },
"mode": { "type": "string", "enum": ["system", "day", "night"] },
"profile_id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
"custom_profiles": { "type": "array", "items": { "$ref": "#/$defs/profile" } },
"socials": { "type": "array", "maxItems": 32, "items": { "$ref": "#/$defs/social" } },
"logo": { "$ref": "#/$defs/logo" },
"updated_at": { "type": "string", "format": "date-time" },
"active_profile": { "$ref": "#/$defs/profile" },
"presets": { "type": "array", "minItems": 5, "items": { "$ref": "#/$defs/profile" } }
}
},
"tile": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y", "width", "height", "url"],
"properties": {
"x": { "type": "integer", "minimum": 0 },
"y": { "type": "integer", "minimum": 0 },
"width": { "type": "integer", "minimum": 1, "maximum": 512 },
"height": { "type": "integer", "minimum": 1, "maximum": 512 },
"url": { "type": "string", "pattern": "^/gallery/tile/[A-Za-z0-9_-]{43}/(?:0|[1-9][0-9]*)/(?:0|[1-9][0-9]*)\\.webp$" }
}
},
"tileView": {
"type": "object",
"additionalProperties": false,
"required": ["handle", "width", "height", "tile_size", "overlap", "columns", "rows", "tiles"],
"properties": {
"handle": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" },
"width": { "type": "integer", "minimum": 1 },
"height": { "type": "integer", "minimum": 1 },
"tile_size": { "type": "integer", "const": 512 },
"overlap": { "type": "integer", "const": 1 },
"columns": { "type": "integer", "minimum": 1 },
"rows": { "type": "integer", "minimum": 1 },
"tiles": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/tile" } }
}
}
},
"oneOf": [
Expand Down Expand Up @@ -163,6 +221,14 @@
"branding": { "$ref": "#/$defs/branding" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["view"],
"properties": {
"view": { "$ref": "#/$defs/tileView" }
}
},
{
"type": "object",
"additionalProperties": false,
Expand Down
17 changes: 13 additions & 4 deletions services/frame-gallery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Use it if you want to:
- Explore a day's route and jump between mapped photos.
- Hide or restore photos from the gallery.
- Permanently delete published gallery copies when needed.
- Customize gallery branding, colors, and logo.
- Choose each album's gallery cover.
- Customize gallery branding, logo, and visitor download controls.

## What You Use It For

Expand All @@ -31,6 +32,7 @@ Common uses:
- Remove unwanted photos from public view.
- Restore photos that were hidden by mistake.
- Match the gallery branding to your stream, event, or production.
- Control whether visitors can view and download the full gallery JPEG.
- Correct camera-to-GPX clock differences and manually place unmatched photos.

Photo Gallery does not receive uploads directly. Photos come from Photo Upload or Photo FTP, then
Expand Down Expand Up @@ -76,7 +78,7 @@ On the public gallery, viewers can:

- Browse available photo days.
- Open one day's album.
- View photos in the selected style.
- View photos through page-bound tiles when downloads are disabled, or the full gallery JPEG when downloads are enabled.
- Switch between Photos and Explore when a day has attached route data.
- Select a mapped photo from its thumbnail, lightbox, map marker, or Explore photo strip.
- Switch day/night mode when enabled.
Expand All @@ -89,8 +91,9 @@ On the admin page, operators can:
- Empty the gallery trash.
- Add or remove multiple GPX sessions for one day.
- Adjust camera-to-GPX timing and manually place photos that do not match a route.
- Change the gallery title, brand name, logo, and colors.
- Save custom gallery styles.
- Choose or clear a custom cover for each album.
- Change the gallery title, brand name, and logo.
- Enable or disable full gallery JPEG downloads for every public gallery.

Trash is reversible. Permanent delete is not.

Expand Down Expand Up @@ -128,6 +131,12 @@ The admin page should stay login-protected.
Photo Gallery asks Photo Pipeline to hide, restore, or delete photos. It does not edit the published
photo files directly.

When downloads are disabled, public lightbox photos are delivered as short-lived, page-bound tiles and
FRAME does not expose a public full-image route. When downloads are enabled, the lightbox and Download
action use the full normalized gallery JPEG; the archived camera file remains private. Tiles can still
be captured or reassembled by a determined visitor, and anything visible in a browser can be
screenshotted; this is download deterrence and archive-file protection, not image DRM.

Explore uses the camera capture clock retained in the photo sidecar, not the time FRAME processed the
photo. If the camera clock and GPX clock differ, Gallery Admin can infer the coarse timezone shift and
apply a fine seconds adjustment. Manual photo placements survive trash and restore; permanent photo
Expand Down
Loading
Loading