The current system has a few limitations:
- It only supports a subset of what is possible through an easy interface. Theoretically you can create everything using code, but it is not that easy.
- There is not progress tracking or so, which is a problem for large samples. In case the system or node is restarted while a large sample is integrated you cannot restart or continue.
- You need to modify the code to make custom samples. It would be normal for a CMS, but for a headless CMS nobody is doing that.
- You can use the samples only for new apps, e.g. you cannot add a sample to an existing app. For example when you have a article system and also need comments or whatever.
Therefore I want to get rid of the current system.
My idea is to use the CLI for that:
The CLI has this sync feature, which stores all settings in the file system. Futhermore the CLI supports virtual file systems, so a file system can be…
- A ZIP Archive
- An actual file system
- An git repository.
The idea is to use a git repository for that and to store samples there. A sample is then just a list of files, that can be imported to an existing app. There will be an official repository for that and the Squidex UI will probably have a menu item for that to show all the samples from this repository.
As a sample user you have to do the following things:
- Create a new app.
- Download the CLI
- Configure the CLI
- Import the Sample, e.g. with.
sq.exe sync in https://github.com/squidex/templates/applications/blog
Perhaps there is a way to streamline that and to provide a script for this.
The big advantage is that we can also create samples for datasets. There is a lot of common data that is used in a lot of applications…
- Cities / Capitals
We can create templates for that and you can get this data with a single command into your app.
If you create a template you have to do the following things:
- Create a new app.
- Clone the official repository.
- Create a folder in the repository.
- Export your app to the repository.
- Create a pull request.
There are a few things to do until we can make this happen:
- Create the repository
- Extend the CLI to create a README.md file for an export.
- Add a new menu item to the UI for all templates.