How naaturel/gamebook-editor works
This is a JavaFX game-book editor: an editor starts the application, selects or creates a book, edits its pages and branching destinations, and can publish or delete content. Presenters mediate between the views, domain models, and repository interface; the sampled edition flow retrieves books and pages and submits validated changes through that interface. The application starts with a database-backed repository, and the sampled storage code performs SQL operations. Creation and startup presenter internals, and the repository-to-storage implementation, were not sampled, so those connections are not asserted.
Main entry points: EditionPresenter.java Edition presenter · App.java Application entry · Book.java Book rules and state · EditionView.java Book and page editor
Components 23
Application UI
- Application entry
src/main/java/org/helmo/gbeditor/App.java - View container
src/main/java/org/helmo/gbeditor/views/ContainerView.java - Start screen
src/main/java/org/helmo/gbeditor/views/StartView.java - Book creation
src/main/java/org/helmo/gbeditor/views/CreationView.java - Book and page editor
src/main/java/org/helmo/gbeditor/views/EditionView.java
Editing workflow
- Start presenter
src/main/java/org/helmo/gbeditor/presenters/StartPresenter.java - Navigation presenter
src/main/java/org/helmo/gbeditor/presenters/MainPresenter.java - Creation presenter
src/main/java/org/helmo/gbeditor/presenters/CreationPresenter.java - Edition presenter
src/main/java/org/helmo/gbeditor/presenters/EditionPresenter.java
Book domain
- Book rules and state
src/main/java/org/helmo/gbeditor/models/Book.java - Book collection
src/main/java/org/helmo/gbeditor/models/Shelf.java - Page content
src/main/java/org/helmo/gbeditor/models/Page.java - Branch destination
src/main/java/org/helmo/gbeditor/models/Path.java - Author identity
src/main/java/org/helmo/gbeditor/models/Editor.java - ISBN validation
src/main/java/org/helmo/gbeditor/models/Isbn.java
Persistence
- Repository interface
src/main/java/org/helmo/gbeditor/repo/Repo.java - Database repository
src/main/java/org/helmo/gbeditor/repo/dbRepo.java - Storage factory
src/main/java/org/helmo/gbeditor/infrastructure/GameBookStorageFactory.java - SQL storage
src/main/java/org/helmo/gbeditor/infrastructure/GameBookStorage.java - Data transfer objects
src/main/java/org/helmo/gbeditor/infrastructure/DTOBook.java - Model mapper
src/main/java/org/helmo/gbeditor/infrastructure/Mapper.java
Other components
- Editor
- SQL database
Connections 20
- Editor → Application entry: starts
- Application entry → View container: creates
- Application entry → Start screen: shows
- Application entry → Navigation presenter: creates
- Application entry → Start presenter: creates
- Editor → Book and page editor: uses
- Book and page editor → Edition presenter: dispatches actions
- Edition presenter → Book and page editor: updates display
- Edition presenter → Repository interface: retrieves and saves
- Edition presenter → Book collection: updates collection
- Edition presenter → Book rules and state: validates edits
- Edition presenter → Page content: creates and edits
- Edition presenter → Branch destination: checks destinations
- Edition presenter → Navigation presenter: requests navigation
- Book rules and state → ISBN validation: holds identifier
- Book rules and state → Author identity: holds author
- Book rules and state → Page content: contains pages
- Page content → Branch destination: contains destinations
- Storage factory → SQL storage: creates
- SQL storage → SQL database: queries and updates