Skip to content

[FEATURE] Add test environment: bootstrap mechanism & minimal demo scenario - #2269

Draft
thomaslow wants to merge 79 commits into
kitodo:mainfrom
thomaslow:add-test-environment
Draft

thomaslow wants to merge 79 commits into
kitodo:mainfrom
thomaslow:add-test-environment

Conversation

@thomaslow

@thomaslow thomaslow commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

This pull request adds a bootstrap mechanism that creates pre-configured pages, indexes examples documents and shows them in a simple demo user interface.

This PR is based on and includes the Typo3 v14 update (see #2236). Actual changes of this PR can be viewed by comparing the diff between the Typo3 v14 update PR and this PR, see diff.

Todo

  • Create first draft of test environment (see demo video below)
  • Discuss approach with Kitodo.Presentation community
  • Document (and maybe fix) various discovered unrelated bugs
  • Wait for Typo3 v14 update to be merged

More demo scenarios covering all Kitodo.Presentation plugins will be added in additional PRs.

Scenarios

The bootstrap mechanism is designed to support multiple demo scenarios. For example, when getting started with Kitodo.Presentation, it might be useful to have a minimal example with only basic features (search, collections, viewer).

Other features like the multimedia support, dynamic dfg-viewer-like experience, or the basket flow should be demonstrated in dedicated demo scenarios.

Also, for future end-to-end tests (e.g. with selenium or playwright), it makes sense to be able to test different plugin configurations requiring different page configurations (e.g. searching with full-text support and without full-text support).

Maybe, it is possible to combine every feature of Kitodo.Presentation into a single combined showcase demo. Let's see.

Creating Demo Sites

Demo sites can be created via a CLI command kitodo:bootstrap and interactively from the "New Tenant" page inside the admin interface.

Bootstrapping works like this:

  1. Pages are created one after the other based on a yaml configuration file (see minimal.yaml)
  2. Kitodo.Presentation plugins are added to pages and configured also based on the yaml configuration file
  3. Example METS documents are copied into the "fileadmin" area, such that they can be access via http
  4. Example images are generated for each mets:file entry as simple SVG files and copied into the "fileadmin" area
  5. Indexing is triggered for these example documents

Demo sites are created with new page ids (and not with static page ids). Meaning, demo sites can be added to existing Typo3 installations regardless of what pages already exist. Multiple different demo scenarios can be deployed on the same Typo3 installation (not tested yet). Bootstrapping the same demo scenario again overwrites existing pages of the demo scenario site (due to overlapping baseUrls).

Refactoring

Three classes had to be refactored a bit such that their methods can be used both interactively from the admin user interface as well as from CLI commands:

  • Methods from NewTenantController.php have been moved to TenantService.php
  • Methods from IndexCommand.php and BaseCommand.php have been moved to IngestService.php

Relation to other PRs

This PR was inspired by #1978, #1979, #1980 (created by @csidirop), but does not reuse its code. A major difference is the support for different demo scenarios, and logic to add and index example mets documents. Some parts overlap with #1978, #1979, #1980 though, e.g., the refactoring of the NewTenantController.php.

Code contributions were
Assisted-by: Claude Code Opus 5.5 (Anthropic)

…nd spaces from default "fluid_styled_content" layout.
… 8.3 although Typo3 v13 should be compatible with PHP 8.2.
…seem to be necessary and was removed in Typo3 v14.
…fter merge with main in PageViewProxyTest. Remove unnecessary injection of hash service in AbstractController.
…rvice for Typo3 v14 upgrade after merge with main.
…d to redirection logic in the Typo3 base ActionController.
…stead of LazyObjectStorage class due to deprecation 110347 for Typo3 v14 upgrade.
…edData which has different array structure in Typo3 v14.
… scenario yaml file and auto-initializes the storage page.
…ice, which needs to be called by admin interface when creating demo sites.
…that all documents were successfully indexed.
…e and add basic css for better viewer layout.
@thomaslow

Copy link
Copy Markdown
Member Author

Demo video of current draft status:

2026-11-13.13-17-06.mp4

This branch has not been deployed

No deployments
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.

1 participant