---
id: TASK-118.8
title: Add lightweight sync to rphotos (shared album curation)
status: Done
assignee: []
created_date: '2026-03-16 00:06'
updated_date: '2026-03-16 00:50'
labels:
  - multiplayer
  - tier-3
milestone: Multiplayer Everything
dependencies: []
parent_task_id: TASK-118
priority: low
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
rphotos wraps Immich for photo display. Add Automerge sync for shared album curation and selections.

## New files:
- `modules/rphotos/schemas.ts` — PhotosDoc with albums, selections, annotations
- `modules/rphotos/local-first-client.ts` — CRUD: createAlbum, addToAlbum, annotatePhoto

## Schema:
```
PhotosDoc {
  meta: { module: 'photos', collection: 'curation', version: 1 }
  albums: Record<string, { id, name, photoIds[], createdBy, updatedAt }>
  selections: Record<string, { photoId, selectedBy[], note }>
  activeAlbumId: string
}
```

Photo IDs reference the external Immich instance — this syncs curation metadata only.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Shared albums sync across space members
- [ ] #2 Photo selections and annotations visible to all
- [ ] #3 Demo mode works with local-only state
<!-- AC:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
schemas.ts + local-first-client.ts created
<!-- SECTION:NOTES:END -->
