---
id: SEED-004
status: dormant
planted: 2026-03-26
planted_during: v1.1 Phase 17 — GH Issues Client and Product Catalog
trigger_when: any phase touching image loading, GitHub API auth, or product-images branch access
scope: Small
---

# SEED-004: Product image URL auth strategy for private repo

## Why This Matters

Product images uploaded via Set Image go to the `product-images` branch of `BigscreenVR/beyond-outgoing` (private repo). The stored URL (`raw.githubusercontent.com/.../product-images/images/{id}.jpg`) requires GitHub authentication to access. The GH Issue body also stores this URL, and the Shopify image auto-fetch stores Shopify CDN URLs. The app needs a consistent strategy for loading images that may require auth.

## When to Surface

**Trigger:** Any phase touching image loading, GitHub API auth, or product-images branch access.

This seed should be presented during `/gsd:new-milestone` when the milestone scope matches any of these conditions:
- Async image loading pipeline (SEED-001)
- GitHub API authentication refactoring
- Offline mode or caching infrastructure
- Product image display in any context

## Scope Estimate

**Small** — Decision + implementation: either (a) use GitHub Contents API with auth token to fetch image bytes and cache locally, (b) switch to a public-accessible URL scheme, or (c) download-on-upload and store images locally in the app data directory. Option (c) is simplest — upload to GH branch for cloud backup, but always read from local cache.

## Breadcrumbs

Related code and decisions found in the current codebase:

- `crates/integrations/src/github/product_images_branch_client.rs` — `build_raw_url()` produces `raw.githubusercontent.com` URL
- `crates/app/src/main.rs` — Set Image handler uploads bytes then stores `raw_url` in SQLite
- `crates/app/src/live_client.rs` — Shopify image auto-fetch stores CDN URL directly
- User confirmed the image exists at `https://github.com/BigscreenVR/beyond-outgoing/blob/product-images/images/{id}.jpg?raw=true` but it requires auth

## Notes

The simplest viable path: when uploading via Set Image, also save the image bytes to a local cache directory (`%APPDATA%/witwhat/images/{product_id}.jpg`). The app loads from local cache first, falls back to HTTP fetch with auth. This also enables offline image display. The GH branch upload remains the cloud backup. Shopify CDN URLs are public and can be fetched without auth.
