Certified Backstage Associate (CBA)

Templates

Why Templates

In this lesson, we explore why Backstage introduced templates and how they solve the challenges of manual project setup. By automating repetitive tasks—ranging from repository creation to infrastructure provisioning—templates enable teams to launch new applications faster and with consistent quality.

Challenges of Manual Project Setup

When starting a new project, teams often perform these manual steps:

  1. Create a GitHub repository and request access
  2. Provision deployment environments (e.g., a Kubernetes cluster)
  3. Configure tooling (linting, formatting, testing)
  4. Set up the CI/CD pipeline
  5. Assign repository permissions
  6. Provision dependent resources (databases, DNS)
  7. Deploy the application

The image is a flowchart illustrating the steps involved in using templates for software deployment, including creating a GitHub repo, setting up permissions, tooling, and deploying applications.

Each project repeats these steps, which is time-consuming and error-prone. Backstage templates automate the entire workflow: with a single click, developers trigger all these tasks under the hood.

Solution: Backstage Templates

Templates in Backstage provide a one-click experience for:

  • Repository creation with best-practice code scaffolding
  • Environment and infrastructure provisioning
  • CI/CD pipeline configuration
  • Permission assignments and resource dependencies

Note

Templates enforce organizational best practices by centralizing project definitions. A dedicated team maintains these templates to ensure consistent structure, tooling, and security settings.

Key Benefits

BenefitDescription
StandardizationUniform project layouts reduce onboarding friction and simplify cross-team collaboration.
Speed & ReliabilityAutomated steps cut setup time and minimize human errors in the scaffolding process.
CustomizationDefine multiple templates tailored to languages, frameworks, and deployment targets.

1. Standardization

By using the same template across projects, teams benefit from:

  • Consistent directory structure and file conventions
  • Pre-configured linting, formatting, and testing rules
  • Streamlined onboarding with a familiar project layout

The image is a presentation slide titled "Out-of-the-Box Features – Templates," highlighting the benefits of standardization in project scaffolding, such as maintaining consistency, simplifying onboarding, and facilitating smoother transitions. It features a wavy blue line design on the right.

2. Speed & Reliability

Automating repetitive tasks not only accelerates project setup but also reduces mistakes:

  • One-click scaffolding of code, CI/CD pipelines, and environment configs
  • Guaranteed application of security and compliance checks
  • Repeatable outcomes that you can trust

The image is a presentation slide titled "Out-of-the-Box Features – Templates," highlighting the benefits of automation in scaffolding new projects, such as saving time and reducing errors. It features a stylized blue and pink path design on the right.

3. Customization

Backstage templates can be extended or forked to support:

  • Different languages (Node.js, Java, Python)
  • Framework-specific scaffolds (Spring Boot, Express, Flask)
  • Various deployment scenarios (microservices, data science environments)

The image lists "Out-of-the-Box Features – Templates" with options for Node.js Template, Java Template, and Node.js API with API Gateway, each accompanied by relevant icons.

Supported Template Types

Template TypeUse CaseLanguage / Framework
Service TemplateMicroservice scaffoldingJava, Node.js, Python
Data Science TemplateNotebook environmentPython
API Gateway TemplateAPI with built-in gatewayNode.js

Developer Workflow

A typical developer interaction with a Backstage template involves:

  1. Select the desired template (e.g., a Python service)
  2. Provide metadata such as project name, owning team, and repository path
  3. Optionally Specify deployment options (e.g., compute platform: EC2)

The image shows a Python template setup interface with steps for filling in details, choosing a location, deploying, and reviewing. It includes fields for the name, repository location, and compute platform, with options to go back or create.

After clicking Create, Backstage handles:

  • GitHub repository creation with an initial codebase (linting, formatting, tests, CI/CD)
  • Infrastructure provisioning (e.g., EC2 instance)
  • Application deployment

All manual steps run automatically once the simple form is completed.

Centralized Template Management

Templates provide a single source of truth for project scaffolding. Features include:

  • Central repository of template definitions
  • Versioning and lifecycle management
  • Alignment with security, compliance, and architectural standards
  • Ready-to-use scaffolds for multiple languages and frameworks

The image outlines the benefits of templates, including centralized management, standardized practices, language support, and framework support. It highlights features like handling baseline templates, aligning projects with standards, and providing ready-to-use templates for various languages and frameworks.

Further Reading

Watch Video

Watch video content

Previous
Demo Integrations Org Data