[IMPLEMENTED] Option for "inject" schema from UI

Another idea may be related to this
is the support for “inject” app templates to already existing app.

So for example now you need to start with identity or manually copy all schemes to already existing app. It is fine for a smaller app (thanks for the ability to just copy past JSON it is great!) but can be annoying for the bigger app.

MVP concept:

Makes sense, but in combination with your other proposal, the UI should look differently I think.

Totally agree this was just a fast concept to illustrate an idea.

I am still thinking about this. In general it is not a good idea to generate the schemas over the UI, because it is easier to do it in the client app.

I do not what exactly you mean by generating schemas over the UI. As you say I expecting it was possible to achieve this via a client app (or CLI which I do not use yet). A few days later I think this was more proposal to simplify use case when you want to add some common functionality to your application and you can do it basically instantly without even touching code. Something like, you want to add Identity to your project and you want to have it as part of your application (for some project I think you do not need separate project/application etc…). And then it can be something like Squidex.Extensions.Identity and with one line services.AddSquidexIdentity(..config..) you have an identity in your project.

Another example can be adding a blog scheme to an already existing application. For example, someone starts with whatever project and later decides to provide basic blog functionality, and this way they can start with just a few seconds, and even without developer they can start filling content. Same for simple eshop solution.

Obviously, I do not if this how common this use case can be and for best user experience it will be much better if someone (community?) prepare for example entities and datastores as NuGet package then it will be really great (do not expect this from you of course).

I do not look to another headless CMS (I discover headless CMS just with Squidex and I really like it so far) so I do no know if something like this can is available somewhere and if it could be considered as an advantage again competition.

I mean over the management UI. Lets imagine you have a client application and you rollout a new version. The best approach would be to have it self contained, e.g. you want to have the schema definition as part of this client application as well. So when you deploy a new version of this application the schemas get updated automatically.

When you create or update schemas over the UI, you have a manual step in your CI process.

I think the CLI already allows to inject schemas, because you can create an app config as yaml files and when you use the sync command with a flag to not delete things, new schemas are added but old schemas are not removed.

If this is not supported yet, we should add a flag for that.

But I don’t say that an integration into the Management UI is a bad idea. It should just be reusable and also independent of the programming language you are using.

Yes, I do not think about versioning that required additional step and complicating the whole process.

So for the thing that I describe with identity will be better to have a package that contains a scheme. What on other hand is a lot of work if the better practice is to have a separate service.

One thing when it can be useful is the ability to add some common features without even start developing (involve developer). Do not know how many this use case can exist (blog, e-commerce, reservation system, locations & review). What even could start as an internal system. And best think about it was mainly the ability scaffolding basic scheme from UI what for most people including some developer, can be possibly easier. As in my use case when for “simple identity” for a small app was easiest to just copy-pasting JSON scheme from the sample app.

And more or less this is not something that cannot be achieved otherwise (cli, client, copy-pasting) so it mainly depends if it has any real use case and what is even current use case for app templates. It is for quick exploring or it serves as real app templates (as identity). I quickly check GraphCMS and they have a similar main page. Where it is looking to be more like an example then a real app (they even ask in the second step if you want to fill with sample data). In squidex (mainly identity) is more as a real starting point for an application.

Yes, I see it like you. it is even a good place to communicate patterns. Often I am asked questions like

“How can I model XYZ”, so it would be possible to create samples for that.

If this is the main and only reason then it not worth adding this feature to UI.

Maybe now I have one idea if it will be a function for inject scheme with options to populate data. Example countries, languages, currencies. Maybe it should be named differently from UI (dataset?) but under the hood, it will be the same. But again do no know how many people use it.

To even enable this first step need to be enabled somehow (github repo) manage samples.

I have this in my roadmap for a long time now: https://trello.com/c/ymRLWCfO/10-prefilled-schemas :wink:

1 Like

Oh sorry, I didn’t check it.

Basically, this sounds to me as the most oblivious use case for “injecting scheme from UI”. With few think to consider as dependencies between dataset which could make it really powerful and also harder to implement.

1 Like

It is kind of implemented with the new templates.

This topic was automatically closed after 2 days. New replies are no longer allowed.