Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
110 stars 72 forks source link

Analysis - org level resources #12875

Open nkylstad opened 1 month ago

nkylstad commented 1 month ago

Description

An organization should have some sort of organization-level repository. Similar to the datamodels-repo, but for other static resources that an organization might want to re-use accross apps.

We need to determine how we will support this.

In scope

Use codelists as initial case, and focus on how we will support this case. Is FDK an option?

Out of scope

Solve this for all org level resources at once.

Additional information

Analysis

Some notes from our first meeting discussing this:

There are many resources that could be placed on the ORG level. F.ex:

These are all libraries of shareable resources/configuration. Some libraries could be shared on org level, using an org repo.

In many cases there will be a need for some metadata about the different resources. Every repo in Studio has a .altinnstudio folder which currently only contains a settings.json file that is not really used. We could use this folder to add some library config/metadata. One example is tags, which would allow the app developer to tag a specific resource for easier filtering in the future. A tag could be added f.ex. to a codelist, or to a specific text.

Codelists in particular

One consideration that must be made is that a static codelist will generally have texts that come from a text resource file. Thus, we need to consider how we "ship" a shared code list. Some options:

In both alternatives, Studio needs to do some mapping with texts to the apps text resources to ensure that all data is available in the correct places for the app when a codelist is imported to the app.

For the first alternative, one advantage could be that we can generate the text keys based on codelist id and value for each code. This makes it a lot less likely that we will have any conflict on text keys in the apps.

Is there any need for multiple resource repos? Datamodels is a separate repo - the argument for this was to allow for separate access control to the datamodels repo. Not sure this was a real need.

Conclusion

Status: Pending

General:

General for ORG resource repo:

Specifically for codelists (UP FOR DISCUSSION):