Apps Development, Cloud Computing

4 Mins Read

Developing Custom Backstage Plugins with React

Voiced by Amazon Polly

Overview

Backstage is designed to be highly customizable. Beyond providing a central place for service catalogs and developer tools, it allows teams to tailor the user interface and extend platform capabilities through plugins.

Plugins are the foundation of Backstage’s extensibility. They allow developers to integrate internal tools, external APIs, dashboards, and automation workflows directly into the developer portal. We will create a simple frontend plugin that fetches random advice from an external API and displays it on an entity page.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Creating Your Own Backstage Plugin

We will build a simple frontend plugin named advice. This plugin will:

  • Provide a full-page route at /advice
  • Expose a reusable AdviceCard component
  • Fetch random advice from an external API
  • Display the advice on an entity page

Each time the entity page is refreshed, the plugin retrieves a new piece of advice and renders it inside a card component.

Step-by-Step Guide

Step 1: Scaffold the Plugin

Backstage provides a CLI tool that automatically generates plugin boilerplate.

From the root of your Backstage project, run:

When prompted, select:

Then enter the plugin ID:

After the command completes, Backstage generates the plugin directory and initial files.

Generated Directory Structure

The plugin ID is important because it determines routing paths, packaging, and workspace commands.

Step 2: Understanding the Generated Files

The CLI creates several files that define how the plugin works.

routes.ts

This file defines a route reference used for navigation inside Backstage.

This route reference is later used when registering the plugin page.

plugin.ts

This file registers the plugin and defines its routable extension.

This configuration registers the plugin and specifies where its page should appear in Backstage.

Step 3: Register the /advice Route

To make the plugin accessible, add the page route to the main application router.

Inside packages/app/src/App.tsx:

Now visiting:

Will display the plugin page.

Step 4: Create the AdviceCard Component

Next, create a reusable component that can be embedded within entity pages.

Create the file:

Basic component example:

Add an index file for easier imports:

Step 5: Expose the Component as an Extension

To allow Backstage to use the component, it must be exposed through the plugin.

Update plugin.ts:

Then export the plugin components in index.ts:

Step 6: Embed the Plugin on an Entity Page

To display the plugin inside Backstage’s entity pages, add the card component to the entity layout.

Open:

Add the card inside the overview grid:

After refreshing the application, the AdviceCard will appear alongside other entity overview cards.

Step 7: Style the Card with InfoCard

Backstage provides UI components that follow the platform’s design system. Instead of using a simple <div>, we can use the InfoCard component.

This improves the visual consistency with the rest of the Backstage interface.

Step 8: Fetch Live Advice from an API

Finally, we enhance the component to fetch data dynamically using Backstage’s API utilities.

Every time the entity page is refreshed, the component retrieves a new piece of advice from the API and displays it inside the card.

Running the Plugin in Development

You can run the plugin independently while developing it.

From the plugin directory:

Or from the monorepo root:

This launches a development server that allows you to test plugin functionality quickly without starting the entire Backstage application.

Conclusion

Backstage’s plugin architecture makes it easy to extend the developer portal with custom features tailored to your organization.

In this guide, we created a simple plugin that fetches data from an external API and displays it within the platform. Along the way, we covered how to scaffold a plugin, register routes, create reusable components, and integrate them with entity pages.

Using these same techniques, teams can build plugins that integrate internal tools, automate workflows, display operational metrics, or connect to external systems, turning Backstage into a powerful and customizable developer platform.

Drop a query if you have any questions regarding Backstage and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

FAQs

1. Do I need to create a backend service for every Backstage plugin?

ANS: – No. Many plugins are purely frontend and interact directly with external APIs. Backend services are required only when you need server-side logic, authentication, or integrations with internal infrastructure.

2. Can a Backstage plugin be reused across multiple projects?

ANS: – Yes. Plugins can be packaged and shared across Backstage deployments. Many organizations maintain internal plugin libraries so multiple teams can reuse common integrations and components.

WRITTEN BY Anirudh Singh

Anirudh works as a DevOps Engineer at CloudThat. He specializes in building scalable, automated, and secure cloud infrastructure solutions. With hands-on experience in tools like Terraform, Kubernetes, Jenkins, and AWS services, he plays a key role in streamlining CI/CD pipelines and improving deployment efficiency. Anirudh is passionate about infrastructure as code, cloud-native architectures, and automation best practices. In his free time, he explores new trends and enjoys optimizing workflows to enhance system reliability and performance.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!