What Are Golden Paths
Golden Paths (or Golden Roads) are standardized, optimized routes that guide developers through the most common workflows: from creating a new service to deploying to production, from infrastructure configuration to monitoring setup. They represent the organization's best practices condensed into reusable templates, automations, and workflows.
The Golden Path concept was popularized by Spotify as part of their Internal Developer Platform. The fundamental idea is simple: instead of letting every developer reinvent the wheel (with inconsistent results), you define optimal paths that incorporate all security, performance, observability, and compliance best practices.
It is crucial to emphasize that Golden Paths are not golden cages. They do not prevent developers from deviating from the standard path when necessary, but they make the standard choice so simple and attractive that it becomes the natural choice in the vast majority of cases.
What You'll Learn
- The Golden Path concept and why it reduces cognitive load by 60%
- How to define Golden Paths for web apps, APIs, microservices, and infrastructure
- Templating engines: Cookiecutter, Helm, Kustomize, and custom solutions
- Automated scaffolding with Yeoman, Nx generators, and custom CLIs
- Template governance: versioning, approval, maintenance
- Adoption metrics and how to avoid over-standardization traps
Defining Golden Paths by Application Type
The first step in building Golden Paths is identifying the most common application types in the organization and creating optimized paths for each. Typical categories include:
- Web Application: React/Angular/Vue frontend with SSR, CDN, frontend monitoring, and A/B testing
- REST API: backend service with database, caching, rate limiting, OpenAPI documentation, and health checks
- Event-Driven Worker: Kafka/RabbitMQ consumer with retry policy, dead letter queue, throughput metrics
- Scheduled Job: Kubernetes CronJob with alerting, structured logging, and automatic retry
- Infrastructure Module: reusable Terraform/Pulumi module with testing, documentation, and semantic versioning
For each type, the Golden Path defines: project structure, dependencies, CI/CD configuration, Dockerfile, Kubernetes manifests, monitoring, logging, and documentation.
# Golden Path: definition for REST API service
golden-path-rest-api:
name: "REST API Microservice"
description: "Standard path for creating a new REST microservice"
version: "2.1.0"
scaffolding:
language: TypeScript
framework: NestJS
structure:
- src/
- controllers/ # Route handlers
- services/ # Business logic
- models/ # Data models
- middleware/ # Auth, logging, validation
- config/ # Environment configuration
- test/
- unit/
- integration/
- e2e/
- docs/ # API documentation
- .github/workflows/ # CI/CD pipelines
included-features:
- health-check: "/health and /ready endpoints"
- openapi-docs: "Swagger UI at /api/docs"
- structured-logging: "JSON logs with correlation ID"
- metrics: "Prometheus metrics at /metrics"
- tracing: "OpenTelemetry auto-instrumentation"
- error-handling: "Centralized error handler with standard format"
- authentication: "JWT validation middleware"
- rate-limiting: "Per-client rate limiting"
ci-cd:
pipeline: GitHub Actions
stages:
- lint-and-format
- unit-tests (coverage > 80%)
- integration-tests
- security-scan (Snyk/Trivy)
- build-docker-image
- push-to-registry
- deploy-staging
- smoke-tests
- deploy-production (manual approval)
Templating and Scaffolding
Templates are the technical heart of Golden Paths. They allow generating a complete project in seconds, already configured with all organizational best practices. The main templating tools are:
- Cookiecutter: Python-based template engine, simple and widespread, ideal for multi-language projects
- Backstage Software Templates: scaffolding system integrated into Backstage with web UI and approval workflows
- Yeoman: Node.js generator with interactive prompts, sub-generators, and composition
- Nx Generators: generators integrated into the Nx monorepo tool, ideal for Angular, React, and Node.js projects
- Custom CLI: internal CLI tools built with Commander.js, Inquirer.js, or Click (Python)
# Backstage Software Template: scaffolding REST API
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: rest-api-template
title: REST API Microservice
description: "Create a new REST microservice with NestJS, Docker, and CI/CD"
tags:
- typescript
- nestjs
- rest-api
- recommended
spec:
owner: platform-team
type: service
parameters:
- title: Service Info
required: [name, description, owner]
properties:
name:
title: Service Name
type: string
pattern: "^[a-z][a-z0-9-]*$"
description: "Service name (lowercase, hyphens)"
description:
title: Description
type: string
owner:
title: Owner Team
type: string
ui:field: OwnerPicker
- title: Technical Options
properties:
database:
title: Database
type: string
enum: [postgresql, mysql, mongodb, none]
default: postgresql
cache:
title: Cache Layer
type: string
enum: [redis, memcached, none]
default: redis
messageQueue:
title: Message Queue
type: string
enum: [kafka, rabbitmq, none]
default: none
steps:
- id: fetch-template
name: Fetch Template
action: fetch:template
input:
url: ./skeleton
values:
name: 






