The Unsung Heroes of Backstage: A Comprehensive Overview of Backend Plugin Responsibilities and Roles

Hello everyone! Today, we’re going to delve into the core roles and responsibilities of Backend Plugins, the robust pillars supporting Backstage’s powerful ecosystem. πŸš€

When you first encounter Backstage, you might focus on its dazzling frontend UI, but all the magic of fetching, processing, and securing data actually happens in the backend. Through this article, gain a complete understanding of why backend plugins are crucial and what responsibilities they hold! πŸ’‘


πŸ—οΈ What are Backstage Backend Plugins?

The Backstage architecture is broadly divided into Frontend (App) and Backend. Backend plugins operate in a Node.js environment, providing data or functionality required by frontend plugins in the form of APIs, acting as independent service modules.

Simply put, if the frontend is the ‘face’ that users see, backend plugins are the ‘brain and muscles’ working diligently behind it. πŸ’ͺ🧠


🌟 Three Core Responsibilities of Backend Plugins

The core responsibilities that best characterize the role of backend plugins can be summarized into three main categories.

1. Integration with External Systems (Data Aggregation & Integration) πŸ”—

The most direct responsibility of backend plugins is to communicate with various internal and external systems to fetch data.

  • API Calls: Calls APIs of external services such as GitHub, Jira, AWS, and Sentry.
  • Data Transformation: Transforms external data arriving in different formats into a common model that Backstage can understand (Normalize).
  • Intermediary Role: Acts as a secure proxy and intermediary when it’s difficult for the browser (frontend) to directly call external APIs due to security reasons.

2. Business Logic and Data Processing (Logic & Processing) βš™οΈ

Beyond simply transmitting data, they execute Backstage’s unique business logic.

  • Catalog Management: Handles logic for registering or updating entities in the software catalog.
  • Background Tasks: Performs scheduled tasks such as periodically crawling data or sending notifications.
  • Complex Calculations: Combines data from multiple sources to generate processed statistics or insights.

3. Security and Access Control (Security & Auth) πŸ›‘οΈ

This is one of the most critical responsibilities. It verifies if a user has permission to access data and delivers it securely.

  • Authentication and Authorization: Validates Backstage ID tokens and checks access permissions for specific resources.
  • Secret Key Management: Securely manages and injects API Keys or OAuth tokens required for external system access on the server-side.

πŸ› οΈ How Do Backend Plugins Work?

The Backstage backend is based on the Express framework. Each plugin creates its own unique router and registers it with the backend system.

For example, backstage-plugin-techdocs-backend exposes an API endpoint that provides documentation via a path like /api/techdocs. Frontend plugins send requests to this address to render the necessary information on the screen.


🧐 Backend Plugins vs. Frontend Plugins

Comparison Item Frontend Plugin Backend Plugin
Execution Environment User’s browser Node.js server
Key Technologies React, TypeScript Node.js, Express, Knex (DB)
Core Objective User Experience (UX) & Visualization Data Provision, Security, System Integration
Data Source Backend Plugin API External APIs, Databases

🏁 Conclusion: Backend Plugins are ‘Reliable Data Sources’

The core responsibility of Backstage backend plugins can be summarized in one sentence:

“To abstract the complexity of external systems and provide secure, standardized data and functionality to the frontend.” 🎯

When you intend to add new functionality to Backstage, if that functionality requires data processing or is centered around integration with external tools, it signifies backend plugin development. Only with robust backend plugins can you complete a high-quality developer portal that provides users with seamless and accurate information!



Comments

Leave a Reply

Your email address will not be published. Required fields are marked *