Skip to content

Support remote Lightning apps templates  #13757

@manskx

Description

@manskx

🚀 Feature

Allowing to use lightning app templates independently from the lightning package.

Motivation

Currently, lightning app templates are part of the lightning package, which has some pros and cons.

Pitch

The proposed solution could be a hybrid, some essential templates should stay as part of the lightning package but other templates could stay outside of the repo.
Templates to be in the lightning repo:
1- app-template
2- component-template
3- pl-app-template or trainer-app-template

All other templates can be located either together in a separate package maybe lightning-apps-templates or each app independently in its own repo so we allow users to do something like

lightning init app <github_url_of_lightning_app_template>

Workflow

1- lightning init app app-template
The app-template is part of the lightning package so the framework will copy the template and initialize it easily.

2- app-my-awesome-template This app template is pretty advanced, it may contain a template to train, serve and monitor a model with dashboards. So it's located in its own repo perhaps: gitub.com/manskx/lighting-awesome-app-template

If this repo is accepted in the lightning gallery, the user can do lightning init app app-my-awesome-template
otherwise lightning init app gitub.com/manskx/lighting-awesome-app-template. The framework clones the compatible version of the template repo and initializes it.

Additional context

pros/cons

Having app templates in the lightning package:

  • pros:
  1. can use the templates to create an app offline without internet
  2. Having control of the templates at the same place as the framework
  • cons:
  1. Size of the package increases and unnecessary files are included in the package
  2. Not scalable solution, imagine having 100/1000 app templates in the same lightning package.
  3. An issue was introduced as the templates were not added to the package: Lightning init [app/pl-app] issues #13745

- Separate app templates from the lightning package:

  • pros:
  1. Scalable solution,
  2. Allowing users to use community app templates
  3. Keeping the lightning framework package as focused as possible.
  • cons:
  1. Need to ensure that app templates versions are compatible with different lightning framework versions, which introduces some complexities
  2. Remote templates cannot be used offline.

cc: @Borda @lantiga

Metadata

Metadata

Assignees

No one assigned

    Labels

    app (removed)Generic label for Lightning App package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions