Template Group

Cateogrize and manage your templates.

Template Group The above image shows a sample Ecommerce template group with multiple templates.

What is a Template Group?

  • A Template Group is a collection of templates that can be used to generate code for a specific project or repository.
  • It allows users to organize templates based on their needs.
  • Each template group can have its own set of templates and CLI commands.
  • Template groups can be used to manage templates for different repositories within a project.
  • CLI commands can be added to template groups to automate tasks related to the templates.
    For example, you can add commands to run a formatter or run migrations.

Best Practices and Tips

  • Create a template group for each repository.
    For example, a Fitness app with iOS, Android, and Web create the following template groups: Ios, Android, Web.
  • Data source in a project will be accessible to all template groups.

Creating a Template Group

  1. Click the [+] button in the project panel and in the dropdown select the Add Template group option.
  2. Enter the required fields:
    • Name: Name of the template group.
    • Description: Description of the template group.
  3. Click the Create button to create the template group.
  4. Now you can navigate to the template group tab and add CLI commands using the Add CLI command button.
  • CLI commands

    CLI commands can be added to execute specific tasks when code is generated from templates. These commands are executed sequentially.
    • To add a cli command, click on the + Add CLI command button in the template group section. This will open a modal where you can add the cli command and the description. You can also add multiple cli commands. The cli commands will be executed in the order they are added.
    • To edit a cli command, click on the name of the cli command. This will open a modal where you can edit the cli command and the description.
    • To delete a cli command, click on the name of the cli command. This will open a modal where you can delete the cli command.

On this page