feat(editor): bridge the advanced photo editor into the event workflow
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
Event photos can now be opened in Lumenroom, a WebGL2 develop module, from the photo editor's Advanced button. The dashboard signs a short-lived token scoped to one user and event; Lumenroom exchanges it, imports the event's photo list and proxies bytes on demand, so nothing is copied and the temporary catalog expires with the bridge session. Saving in Lumenroom renders the photo and writes it back as the event's edited JPEG, with the advanced recipe kept in event_photos.advanced_edit_json. Lumenroom is vendored under lumenroom/ and built as a second compose service, so one clone and `docker compose up -d --build` deploys both apps. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
@@ -1039,6 +1039,8 @@ export const eventPhotos = pgTable(
|
||||
kind: text("kind", { enum: EVENT_PHOTO_KINDS }).notNull(),
|
||||
/** Last saved adjustment recipe (JSON); the original is never overwritten. */
|
||||
editJson: text("edit_json"),
|
||||
/** Recipe from the advanced (Lumenroom) editor, kept apart from the simple one. */
|
||||
advancedEditJson: text("advanced_edit_json"),
|
||||
/** Generated full-resolution JPEG. Null until the first edit is saved. */
|
||||
editedStoredName: text("edited_stored_name"),
|
||||
editedSizeBytes: integer("edited_size_bytes"),
|
||||
@@ -1059,6 +1061,31 @@ export const eventPhotos = pgTable(
|
||||
],
|
||||
);
|
||||
|
||||
/**
|
||||
* Short-lived hand-off to the advanced editor (Lumenroom). A row exists only
|
||||
* while the editor is open; the signed token the editor holds is scoped to it.
|
||||
*/
|
||||
export const bridgeSessions = pgTable(
|
||||
"bridge_sessions",
|
||||
{
|
||||
id: text("id").primaryKey(),
|
||||
userId: text("user_id")
|
||||
.notNull()
|
||||
.references(() => users.id, { onDelete: "cascade" }),
|
||||
eventId: text("event_id")
|
||||
.notNull()
|
||||
.references(() => events.id, { onDelete: "cascade" }),
|
||||
expiresAt: timestamp("expires_at", {
|
||||
mode: "date",
|
||||
withTimezone: true,
|
||||
}).notNull(),
|
||||
createdAt: timestamp("created_at", { mode: "date", withTimezone: true })
|
||||
.notNull()
|
||||
.defaultNow(),
|
||||
},
|
||||
(table) => [index("bridge_sessions_event_idx").on(table.eventId)],
|
||||
);
|
||||
|
||||
/* ------------------------------------------------------- event videos */
|
||||
|
||||
/** Processing state for an uploaded event video. */
|
||||
|
||||
Reference in New Issue
Block a user