Skip to main content

Create Application with Local Starter

In this section, you will find a guide on how to create your Application with a local Starter.


To create an Application, you need to choose a Starter that contains the set of Plugins you want to apply when generating the Application.

The Application can be created inside or outside a Workspace, but the Starter must have Plugins that are published and available in a Studio on the StackSpot Platform.

To facilitate Application development and testing, it is possible to create your Starter locally and use published Plugins to create an Application.

Before creating an Application with a local Starter, consider the following observations:

caution
  1. When creating the Application, the local Starter will ignore the Workspace. Therefore, Applications created with a local Starter cannot be registered or deployed on StackSpot.

  2. The Starter file must be inside a local Stack folder.

Generate local Starter structure

First, you need to access the Stack folder locally.

If you don't have a Stack, check out the section to create a Stack with the STK CLI.

Step 1. Create the Starter

Inside your Stack folder, run the command below and fill in the Starter information.

stk create starter

Answer the questions in your terminal:

  • Name your starter: Enter a name for your Starter.
  • Type: Enter the Starter type. To create an Application, choose the App type.
  • Do you want to start a git repository?: Enter Y to start a Git repository or N to not start one.
  • Add remote?: If you started the Git repository, answer Y to add a remote repository or N to not add it.
  • Git URL to set as remote origin: Add the URL of the remote repository (for example, a GitHub repository).
  • Starter Description: Add a description for the Starter explaining its purpose.

Make sure the Starter name is added to your stack.yaml file.

Step 2. Add Plugins to Starter

Within the Stack, you will find:

  • The starters folder;
  • And inside that folder, the starter.yaml file.

The structure created is similar to the example below:

/starters/starter.yaml
schema-version: v1
kind: starter
metadata:
name: local-starter-test
description: Describe your starter explaining its purpose
spec:
type: app
docs:
en-us: docs/en_us/docs.md
pt-br: docs/pt_br/docs.md

The Starter is minimally functional, and you need to add the Plugins from the Studios you can access.

To add Plugins, use the following pattern:

/starters/starter.yaml
schema-version: v1
kind: starter
metadata:
name: local-starter-test
description: Describe your starter explaining its purpose
spec:
type: app
docs:
en-us: docs/en_us/docs.md
pt-br: docs/pt_br/docs.md
plugins:
required:
- name: studio-slug/<plugin-name>
optional:
- name: studio-slug/<plugin-name>

Check out the following example:

Animation of a code editor displaying the starter.yaml structure and the addition of a Plugin

With the Stack and Starter ready, you can now move on to creating the Application.

Create Application with Local Starter

Run the command to create the Application using the option --starter and add the full path of the Starter file:

stk create app app-with-local-starter --starter /User/Documents/Stacks/my-stack-test/starters/starter.yaml

The previous command creates an Application named app-with-local-starter. This is just an example; you can enter whatever name you want.

Note: the full Starter file path used above is just an example. You must enter the full path of the Starter that you created in your Stack folder.

The Application will be created, and the Plugins listed in the Starter will be applied.

See other options for creating an Application: