Platform Engineering: Spotify Backstage & Golden Path Scaffolding
When to Use This Skill
Triggers — load this skill when:
- A platform team needs a catalog, scaffolder template, or golden path defined
- Service onboarding and ownership metadata must be standardized
- Platform adoption or DevEx needs to be measured as a product
Route elsewhere when:
- Underlying delivery automation ->
cicd-pipeline-design and gitops-multi-cluster-argo-flux
- Delivery performance measurement ->
devops-metrics-dora-kpis
1. Backstage Software Template Definition (template.yaml)
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: springboot-microservice-template
title: Production Spring Boot Microservice
description: Scaffolds a 12-factor Spring Boot service with CI/CD, Helm charts, and OpenTelemetry
spec:
owner: platform-team
type: service
parameters:
- title: Service Configuration
required: [component_id, description, owner]
properties:
component_id:
title: Unique Service Name
type: string
pattern: '^[a-z0-9-]+$'
description:
title: Description
type: string
owner:
title: Owner Team
type: string
ui:field: OwnerPicker
steps:
- id: fetch-base
name: Fetch Template Skeleton
action: fetch:template
input:
url: ./skeleton
values:
component_id: ${{ parameters.component_id }}
owner: ${{ parameters.owner }}
- id: publish-github
name: Publish Repository to GitHub
action: publish:github
input:
repoUrl: github.com?owner=my-org&repo=${{ parameters.component_id }}
defaultBranch: main
- id: register-catalog
name: Register in Backstage Catalog
action: catalog:register
input:
repoContentsUrl: ${{ steps['publish-github'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
2. Platform Engineering Golden Rules
- Paved Road over Mandates: Build self-service workflows that make the secure and reliable way the easiest way for product engineers.
- Treat the Platform as a Product: Measure internal customer Net Promoter Score (NPS), Time to 10th Deployment, and lead time for changes (DORA).
- Service Ownership via Catalog: Require clear team ownership, on-call links, and API specifications for every registered component.
3. TechDocs as the Documentation Plane
TechDocs renders docs-as-code from each service's own repository into the portal, so
documentation lives beside the code it describes and is reviewed in the same PR:
# catalog-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: payments-api
annotations:
backstage.io/techdocs-ref: dir:. # mkdocs.yml at the repo root
backstage.io/source-location: url:https://github.com/acme/payments-api
spec:
type: service
lifecycle: production
owner: group:payments
system: checkout
# mkdocs.yml
site_name: Payments API
nav: [Overview: index.md, Runbook: runbook.md, API: api.md]
plugins: [techdocs-core]
Build docs in CI and publish to object storage (the external build pipeline), not on the Backstage
server — in-server builds make the portal slow and couple its uptime to doc rendering. Make the
scaffolder template emit mkdocs.yml, an index.md and a runbook.md stub so every new service
starts with a documentation surface, and treat a missing runbook annotation as a catalog lint
failure rather than a suggestion.
4. Anti-Patterns
| Anti-pattern |
Why it fails in production |
| Launching the catalog by bulk-importing every repository |
Thousands of entities with stale or absent owners, so the first lookup a developer tries returns garbage and they never come back. Onboard the services people actually page for, with real owners. |
| Mandating platform adoption instead of earning it |
Teams comply on paper and keep their own pipelines underneath, so you now maintain two systems. Golden paths must be the fastest route to production, or they are shelfware. |
| A scaffolder template that generates a repository and nothing else |
The developer still has to request CI, credentials, infrastructure and on-call registration by hand — the one-click promise breaks at step two. A golden path provisions the whole chain or it is a file generator. |
| Treating the portal as a project with an end date |
The catalog rots the moment nobody owns it; six months later ownership data is wrong and the portal is a liability during incidents. Staff it as a product with a roadmap. |
| Measuring adoption by page views |
Views measure curiosity. Measure the outcomes the platform exists to change: time from repo creation to first production deploy, share of services on the golden path, and change failure rate for those services. |
| Building the portal before talking to developers |
You automate the steps that were easy to automate rather than the ones that hurt. Start from the top three sources of developer friction, evidenced by a survey or by watching an onboarding. |
| Running TechDocs builds on the Backstage server |
Doc rendering competes with the portal's own uptime and gets slow as the catalog grows. Build docs in CI and publish to object storage. |
1---2name: internal-developer-portal-backstage3description: Internal Developer Platform engineering: Backstage software catalog and entity model, Golden Path scaffolder templates, TechDocs, and platform-as-product adoption and DevEx metrics. Use when building self-service so developers can create a new production-ready service in one click, defining golden paths, onboarding services into a catalog, or measuring platform adoption.4---56# Platform Engineering: Spotify Backstage & Golden Path Scaffolding78## When to Use This Skill910**Triggers — load this skill when:**1112- A platform team needs a catalog, scaffolder template, or golden path defined13- Service onboarding and ownership metadata must be standardized14- Platform adoption or DevEx needs to be measured as a product1516**Route elsewhere when:**1718- Underlying delivery automation -> `cicd-pipeline-design` and `gitops-multi-cluster-argo-flux`19- Delivery performance measurement -> `devops-metrics-dora-kpis`2021## 1. Backstage Software Template Definition (`template.yaml`)2223```yaml24apiVersion: scaffolder.backstage.io/v1beta325kind: Template26metadata:27 name: springboot-microservice-template28 title: Production Spring Boot Microservice29 description: Scaffolds a 12-factor Spring Boot service with CI/CD, Helm charts, and OpenTelemetry30spec:31 owner: platform-team32 type: service3334 parameters:35 - title: Service Configuration36 required: [component_id, description, owner]37 properties:38 component_id:39 title: Unique Service Name40 type: string41 pattern: '^[a-z0-9-]+$'42 description:43 title: Description44 type: string45 owner:46 title: Owner Team47 type: string48 ui:field: OwnerPicker4950 steps:51 - id: fetch-base52 name: Fetch Template Skeleton53 action: fetch:template54 input:55 url: ./skeleton56 values:57 component_id: ${{ parameters.component_id }}58 owner: ${{ parameters.owner }}5960 - id: publish-github61 name: Publish Repository to GitHub62 action: publish:github63 input:64 repoUrl: github.com?owner=my-org&repo=${{ parameters.component_id }}65 defaultBranch: main6667 - id: register-catalog68 name: Register in Backstage Catalog69 action: catalog:register70 input:71 repoContentsUrl: ${{ steps['publish-github'].output.repoContentsUrl }}72 catalogInfoPath: '/catalog-info.yaml'73```7475---7677## 2. Platform Engineering Golden Rules7879- **Paved Road over Mandates**: Build self-service workflows that make the secure and reliable way the easiest way for product engineers.80- **Treat the Platform as a Product**: Measure internal customer Net Promoter Score (NPS), Time to 10th Deployment, and lead time for changes (DORA).81- **Service Ownership via Catalog**: Require clear team ownership, on-call links, and API specifications for every registered component.8283---8485## 3. TechDocs as the Documentation Plane8687TechDocs renders docs-as-code from each service's own repository into the portal, so88documentation lives beside the code it describes and is reviewed in the same PR:8990```yaml91# catalog-info.yaml92apiVersion: backstage.io/v1alpha193kind: Component94metadata:95 name: payments-api96 annotations:97 backstage.io/techdocs-ref: dir:. # mkdocs.yml at the repo root98 backstage.io/source-location: url:https://github.com/acme/payments-api99spec:100 type: service101 lifecycle: production102 owner: group:payments103 system: checkout104```105106```yaml107# mkdocs.yml108site_name: Payments API109nav: [Overview: index.md, Runbook: runbook.md, API: api.md]110plugins: [techdocs-core]111```112113Build docs in CI and publish to object storage (the external build pipeline), not on the Backstage114server — in-server builds make the portal slow and couple its uptime to doc rendering. Make the115scaffolder template emit `mkdocs.yml`, an `index.md` and a `runbook.md` stub so every new service116starts with a documentation surface, and treat a missing runbook annotation as a catalog lint117failure rather than a suggestion.118119---120121## 4. Anti-Patterns122123| Anti-pattern | Why it fails in production |124| --- | --- |125| Launching the catalog by bulk-importing every repository | Thousands of entities with stale or absent owners, so the first lookup a developer tries returns garbage and they never come back. Onboard the services people actually page for, with real owners. |126| Mandating platform adoption instead of earning it | Teams comply on paper and keep their own pipelines underneath, so you now maintain two systems. Golden paths must be the fastest route to production, or they are shelfware. |127| A scaffolder template that generates a repository and nothing else | The developer still has to request CI, credentials, infrastructure and on-call registration by hand — the one-click promise breaks at step two. A golden path provisions the whole chain or it is a file generator. |128| Treating the portal as a project with an end date | The catalog rots the moment nobody owns it; six months later ownership data is wrong and the portal is a liability during incidents. Staff it as a product with a roadmap. |129| Measuring adoption by page views | Views measure curiosity. Measure the outcomes the platform exists to change: time from repo creation to first production deploy, share of services on the golden path, and change failure rate for those services. |130| Building the portal before talking to developers | You automate the steps that were easy to automate rather than the ones that hurt. Start from the top three sources of developer friction, evidenced by a survey or by watching an onboarding. |131| Running TechDocs builds on the Backstage server | Doc rendering competes with the portal's own uptime and gets slow as the catalog grows. Build docs in CI and publish to object storage. |