PlatformEngr® Backstage plugins course

Backstage plugins: printable course notes

Build a Backstage plugin end to end: the backend and frontend systems, a backend plugin with an API, a database, config and a schedule, tests, an extension point and a module, a frontend plugin with a utility API, an entity card and tab, permissions, and a capstone.

These pages are the same content as the interactive course, on one page per module, for reading and printing.

Four pieces

PieceWhat it is
See the end resultNot the first step: a 20-minute run of the finished plugins from the reference repo. Useful to know where you are heading.
Full course10 modules from yarn new to a permissioned plugin: backend, database, scheduler, tests, an extension point, a frontend plugin, entity cards, permissions and a capstone.
Reference repoThe finished plugins in portal/plugins, at tag course-2-done. You copy a few files from it.
Your portal repoThe portal repo from the first course. Every plugin goes in its plugins/ folder.

Your setup

Commands in these notes use these values (shared with the interactive course, stored only in this browser).

Outline

ModulePartTimeYou areYou will
00 Orientation: how a Backstage plugin is builtOrientation20 minPlatform and productKnow the pieces of the backend and frontend systems, the packages a full plugin is split into, and the readiness plugin you will build. Get your portal from the first course running again.
01 A backend plugin with an APIThe backend plugin45 minPlatform teamGenerate a backend plugin and a common package, write an HTTP API that reads the catalog as the caller, and call it with a token.
02 Database, config and a scheduleThe backend plugin60 minPlatform teamStore scorecards in the plugin's own Postgres database, make the plugin configurable with a schema, and evaluate every component on a schedule.
03 Test the backend pluginThe backend plugin30 minPlatform teamStart the real plugin in a test backend with mocked services and test it over HTTP.
04 An extension point and a moduleThe backend plugin45 minPlatform and productLet other teams add checks without touching the plugin: an extension point in a -node package, and team-checkout's first module.
05 A frontend plugin in the new frontend systemThe frontend plugin40 minPlatform teamGenerate a frontend plugin, give it a page with a blueprint, find it in the app, and move it with config alone.
06 Talk to the backend: a utility APIThe frontend plugin40 minPlatform teamWrite an API client, provide it to the app with ApiBlueprint, and show every scorecard on the page.
07 On the entity page: a card and a tabThe frontend plugin45 minPlatform and productPut the scorecard where teams look: a card on each component's overview and a Readiness tab, with a pass score set in config.
08 Permissions: who may evaluateSecure and extend60 minPlatform teamDefine permissions in the common package, enforce them in the backend, write a policy, and hide the button for people who may not use it.
09 Capstone: team-checkout's ownership checkSecure and extend60 minPlatform and productWithout the steps: team-checkout adds a check that uses the catalog, gets checkout to 100, and the platform team proves it all works.

Where the portal runs

Everything runs on your laptop with Node, Yarn and Docker, in the portal from the first course.

Between you and production