Skip to content

Add API to generate demodata during Project creation.

API: Demodata

Description

Template cevelopers should be able to provide a config file, which includes basic demo data to create a fresh QUIQQER instance matching the visual style of the template.

This should include:

  • Sites
  • Bricks
  • Template settings
  • Project settings

Implementation

Config files

The config files will be implemented as XML files at first, but we may include more formats (JSON and YAML) later.
The config files will be placed in the template package.
Templates that provide demo data need to publish this fact by adding an entry into their extrasection within their composer.json package. This allows us to check the templates ability to provide demo data without unpacking it first.

'Big' QUIQQER Setup

The Setup will check if the desired template supports demo data when configuring the preset (web and console).
If the template does provide data, the user will be prompted if he wishes to install the demo data or not.

Admin interface

The "Create Project" dialog will be extended by the same method:

  • Allow template selection
  • If template supports demo data -> display checkbox
  • If user ticks checkbox -> install demo data

Create data

The data will be consumed during the Projectsetup within QUIQQER.
The config file will be parsed and the according steps will be taken (Site creation, brick insertion etc)

Example XML

Provide an example XML before implementation start, to allow further discussion and give @michael.daniel the chance to suggest changes and start developing XML configs for his templates.

@mor , @henbug Bitte einmal gegen prüfen