Step 18 - library

1 min read

Build the /boards library page.

  • Grid of board cards for my org: title, updatedAt, participant-facing join code, and a live thumbnail.
  • Thumbnail: a renderBoardPreview(elements, w, h) function reusing the util painters on an offscreen canvas (content-cropped, padded); a BoardThumbnail component that caches rendered previews in-memory with a ~30 s TTL keyed by boardId.
  • Actions per card: open, rename (inline), share (same panel as on the canvas: link + code + QR), duplicate, delete.
  • Duplicate board: copy the doc with a fresh join code and " (copy)" suffix, then copy all elements with FRESH element ids, re-pointing fromId/toId through an id map, committed in batches of 450.
  • Soft delete: set deletedAt instead of deleting; a "show deleted" toggle reveals them with restore and delete-forever actions. Delete-forever purges elements, presence, comments, votes, then the board doc.
  • Create board: one click, navigates straight onto the fresh canvas.

Acceptance: create, rename, duplicate (connections intact), soft-delete, restore and purge all work; thumbnails reflect recent edits within the TTL.

Discussion

0 comments

No comments yet. Start the discussion.