apps/gpui-photo-grid/QUICKSTART.md
A standalone GPUI application that:
cd apps/gpui-photo-grid
./run.sh
This will:
# Find your library ID
cat "$HOME/Library/Application Support/spacedrive/libraries"/*.sdlibrary/library.json | grep '"id"'
# Run with env vars
export SD_LIBRARY_ID="your-library-uuid-here"
cargo run --release
This is a proof of concept, so:
/Phase 2 improvements:
ls ~/.spacedrive/daemon.sock./run.sh to auto-detect/SD_INITIAL_PATH to point to your photos directory--release to see debug outputSD_HTTP_URL environment variableYour Terminal
│
└─> ./run.sh
│
├─ Finds library ID from filesystem
├─ Sets env vars (SD_LIBRARY_ID, SD_SOCKET_PATH, SD_HTTP_URL)
└─ Runs: cargo run --release
│
└─> GPUI App Window
│
├─ Connects to ~/.spacedrive/daemon.sock
├─ Sends: { "Query": { "method": "files.media_listing", ... } }
├─ Receives: [{ file1 }, { file2 }, ...]
│
└─ For each file:
├─ Extracts content_identity.uuid
├─ Builds URL: http://127.0.0.1:54321/sidecar/{lib}/{uuid}/thumb/[email protected]
└─ GPUI img() element fetches and renders
apps/gpui-photo-grid/
├── Cargo.toml # Dependencies (gpui, sd-client)
├── src/
│ ├── main.rs # Entry point, window setup
│ └── photo_grid_view.rs # Main view component
├── run.sh # Helper script (auto-finds library)
├── README.md # Full documentation
└── QUICKSTART.md # This file
Loading files: photo_grid_view.rs:37 - load_files() method
Grid rendering: photo_grid_view.rs:140 - render_grid() method
Thumbnail URLs: Uses sd-client's thumbnail_url() method
GPUI setup: main.rs:25 - Application creation with HTTP client
./run.sh