Certified Backstage Associate cheat sheet
Certified Backstage Associate · Keep the key ideas within reach.
Backstage Development Workflow
Scaffold a new instance with
npx @backstage/create-app@latest; the CLI prompts for an app name and creates a directory containing the frontend (packages/app), backend (packages/backend), and plugin packages.Run the local dev environment with
yarn devfrom the repo root; this starts both the frontend (default port 3000) and backend (default port 7007) with hot reload.Add a plugin dependency with
yarn add --cwd packages/app <plugin-package>for frontend plugins oryarn add --cwd packages/backend <plugin-package>for backend plugins, then register it in the appropriatepackages/*/srcentry file.The backend is composed in
packages/backend/src/index.ts; each plugin is registered by calling itscreateRouter/createServicefactory and mounting it withapiRouter.use(...)or the newer backend system'saddRouter.Frontend plugins are typically exposed as
createPlugin({ id, routes, apis })and imported into the app'sApp.tsxviacreateApp({ plugins: [...] })or by adding route elements.Use
yarn tsc(oryarn tsc:full) to type-check the whole workspace;yarn lintruns ESLint, andyarn testruns Jest across packages.The
backstage.jsonfile at the repo root records the Backstage release version; useyarn backstage-cli versions:bumpto update dependencies to a newer release.New frontend plugins can be scaffolded with
yarn new(oryarn backstage-cli new), which prompts for plugin type (frontend-plugin, backend-plugin, etc.) and generates boilerplate underplugins/.The
app-config.yamlat the repo root is the base configuration; environment-specific overrides live inapp-config.local.yaml(git-ignored) orapp-config.production.yaml.
Backstage Infrastructure
Backstage's backend is a Node.js service (Express-based) that typically runs on port 7007; it must be reachable by the frontend for API calls and by the catalog for entity processing.
The catalog database is configured under
backend.databaseinapp-config.yaml; supported clients includebetter-sqlite3(dev),pg(PostgreSQL), andmysql2(MySQL).For production, set
backend.database.clienttopgormysql2and supply connection details via environment variables (POSTGRES_HOST,POSTGRES_USER,POSTGRES_PASSWORD) referenced in config.Authentication providers are configured under
auth.providers; each provider (GitHub, Google, Okta, etc.) needs a client ID/secret and a redirect URL pointing at<frontend-url>/api/auth/<provider>/handler/frame.The frontend is a static single-page app built with
yarn buildand served by any static host (e.g., Nginx, S3+CloudFront); it calls the backend via thebackend.baseUrlconfig value.backend.listencontrols the host/port the backend binds to; setbackend.listen.portandbackend.listen.hostexplicitly in containerized deployments.Secrets should be supplied through environment variables and referenced in
app-config.yamlusing${ENV_VAR}syntax; never commit secrets toapp-config.yaml.The TechDocs builder can run locally (
techdocs.builder: 'local') or in CI ('external'); external builds require a configured publisher such asawsS3,googleGcs, orazureBlobStorage.Health and readiness endpoints are exposed by the backend at
/healthcheck; use these for Kubernetes liveness/readiness probes.
Backstage Catalog
Entities are described by YAML manifests with
apiVersion: backstage.io/v1alpha1(orbackstage.io/v1beta1for newer kinds) and akindsuch as Component, API, System, Domain, Group, User, Resource, or Location.Every entity requires
metadata.name(unique within its kind and namespace) andmetadata.namespace(defaults todefault);metadata.uidis assigned by the catalog.spec.typeclassifies a Component (e.g.,service,website,library);spec.lifecyclerecords its stage (e.g.,production,experimental,deprecated).Ownership is expressed with
spec.ownerreferencing a Group or User entity name;spec.systemlinks a Component to a System, andspec.domainlinks a System to a Domain.Relations are derived from fields such as
spec.owner,spec.system,spec.dependsOn,spec.providesApis, andspec.consumesApis; they appear on the entity page as the relationship graph.Entities are ingested via
catalog.locationsinapp-config.yaml, each with atype(url,file,github,gitlab,bitbucket, etc.) and atarget; the processor reads the target and registers discovered entities.The
catalog.rulesarray inapp-config.yamlcontrols which entities are allowed; each rule matches onkind(and optionallyspec.type) and setsallow: [Component, System, ...].Entity processing runs through a pipeline of processors (e.g.,
catalogProcessorPlaceholder,builtin-entity-relations) defined undercatalog.processors; custom processors can be added.The catalog API exposes
GET /api/catalog/entitiesfor listing andGET /api/catalog/entities/by-name/<kind>/<namespace>/<name>for a single entity; the frontend usescatalogApiRefto query it.
Customizing Backstage
The frontend theme is customized via
createThemefrom@backstage/theme; pass a theme object tocreateApp({ theme: [...] })and optionally providelight/darkvariants.Override the app's sidebar and page layout by supplying a custom
componentsobject tocreateApp, e.g.,SignInPage,Router, orSidebar.Entity pages can be extended with
EntityLayout.Routeentries insidepackages/app/src/components/catalog/EntityPage.tsx; add custom tabs by importing your component and adding a route.The
entityPagecustomization usesEntityLayout,EntitySwitch, andisKind/isComponentTypeguards to render different layouts per entity kind or type.Custom API clients are defined with
createApiRefand provided to the app viaapisincreateApporApiProvider; components consume them withuseApi.Backend plugins can be customized by wrapping the default router or replacing it in
packages/backend/src/index.ts; usecreateServiceFactoryto override service implementations.The
app-config.yamlappsection controls branding:app.titlesets the browser title, andapp.baseUrlsets the frontend base path.Custom Scaffolder actions are registered by creating a
createTemplateActionand adding it to the scaffolder backend plugin'sactionslist.The
@backstage/plugin-catalog-reactpackage provides hooks likeuseEntity,useEntityOwnership, anduseRelatedEntitiesfor building custom entity page content.