Skip to content

Export and import a project file#49

Merged
ankitsejwal merged 3 commits into
mainfrom
feat/project-file
Jun 28, 2026
Merged

Export and import a project file#49
ankitsejwal merged 3 commits into
mainfrom
feat/project-file

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

Closes #40.

Now you can Save your work to a single file and Open it later or on another machine — captions, crop, orientation, settings, and the images themselves, all self-contained.

How it works

  • Save serializes the photos (images embedded as base64 data URLs) + the settings snapshot into one polaroid-project.json.
  • Open parses it back into live photos with fresh ids and object URLs, replaces the working set, and restores settings. Invalid files are rejected with a message.
  • Pure client-side — no account, no cloud, no upload. Just a file you own. (Open works even with an empty canvas; Save is enabled once you have photos.)
  • Opening a project flows through the existing persistence, so it's also written to IndexedDB.

Verification
14/14 headless assertions on a full export→import round-trip: captions, place, takenAt, camera line, crop, orientation and settings all survive, image bytes are byte-identical, new ids are assigned, and malformed files throw. typecheck / oxlint / build green.

@ankitsejwal ankitsejwal merged commit dcc4447 into main Jun 28, 2026
1 check passed
@ankitsejwal ankitsejwal deleted the feat/project-file branch June 28, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export/import a project file to resume a layout

1 participant