Preparing your design workspace

Loading the problem and your saved attempt…

Design a Bookshelf with Reading Progress

Design a personal bookshelf whose CRUD operations preserve a valid, durable bookmark for every existing book.

For this exercise, assume one reader manages a personal bookshelf. A book has a stable identifier, title, author, and positive page count. The reader can add, retrieve, list, edit, and remove books, open a book at its saved position, and move its bookmark.

Every existing book has exactly one bookmark from page 1 through its current page count; a newly added book starts at page 1. Editing title or author preserves progress. Reducing page count below the saved position is rejected, and deleting a book removes its bookmark.

Duplicate identifiers, missing books, invalid metadata, and invalid pages return explicit domain errors without partially changing state.

Books and bookmarks must survive application restarts through a repository boundary, but database technology, UI, search, sharing, digital-content delivery, and multi-reader accounts are out of scope. Produce an object-oriented design; implementation code is not required.