I have an idea to somehow provide a way to add application templates (or how it is called default “samples” in the dashboard). If understand correctly currently it is hardcoded in middlewares.
For example here you provide an update for the Identity template and in this way, it can be easy to distribute even for non updated instance.
Also, I can imagine it may in future work like “marketplace” with app templates but it is required to much work (with a similar model as google play for “paid” templates).
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.
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.
Usage
User
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…
Languages
Currencies
Cities / Capitals
Countries.
We can create templates for that and you can get this data with a single command into your app.
Creator
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.
Todos
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.