Skip to content

Commit 2c56f9f

Browse files
talissoncostaclaude
andcommitted
docs: Add Backstage plugin integration documentation
Add comprehensive documentation for the Flagsmith Backstage plugin integration, including: - Overview of plugin components (Feature Flags Tab, Overview Card, Usage Card) - Prerequisites and installation instructions - Configuration setup with proxy endpoints - Step-by-step guide for adding components to entity pages - Entity annotation reference - Instructions for obtaining credentials (Admin API Key, Project ID, Organisation ID) - Example screenshots demonstrating plugin functionality Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent deee405 commit 2c56f9f

6 files changed

Lines changed: 152 additions & 0 deletions

File tree

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
---
2+
title: Backstage
3+
sidebar_position: 50
4+
description: 'Integrate Flagsmith feature flags into your Backstage developer portal'
5+
---
6+
7+
The [Flagsmith Backstage Plugin](https://github.com/Flagsmith/flagsmith-backstage-plugin) brings feature flag management
8+
directly into your [Backstage](https://backstage.io/) developer portal. It provides three components:
9+
10+
- **Feature Flags Tab** — A full flag list with environment states, tags, and toggle status.
11+
- **Overview Card** — A quick summary of your feature flags for entity overview pages.
12+
- **Usage Card** — A chart showing flag usage metrics over time.
13+
14+
![Backstage Plugin Components](/img/integrations/backstage/components-overview.png)
15+
16+
## Prerequisites
17+
18+
- A running [Backstage](https://backstage.io/) instance.
19+
- A Flagsmith account with an **Admin API Key**.
20+
- Your Flagsmith **Project ID** and **Organisation ID**.
21+
22+
## Installation
23+
24+
Install the plugin from your Backstage app root:
25+
26+
```bash
27+
yarn --cwd packages/app add @flagsmith/backstage-plugin
28+
```
29+
30+
## Configuration
31+
32+
Add the Flagsmith proxy configuration to your `app-config.yaml`:
33+
34+
```yaml
35+
proxy:
36+
endpoints:
37+
'/flagsmith':
38+
target: 'https://api.flagsmith.com/api/v1'
39+
headers:
40+
Authorization: Api-Key ${FLAGSMITH_API_TOKEN}
41+
```
42+
43+
:::tip
44+
45+
If you are self-hosting Flagsmith, replace the `target` URL with your own Flagsmith API address, e.g.
46+
`https://flagsmith.example.com/api/v1`.
47+
48+
:::
49+
50+
## Adding Components to Entity Pages
51+
52+
Edit your `packages/app/src/components/catalog/EntityPage.tsx` to add the Flagsmith components.
53+
54+
### Feature Flags Tab
55+
56+
Import and add the `FlagsTab` as a new tab on your entity page:
57+
58+
```tsx
59+
import { FlagsTab } from '@flagsmith/backstage-plugin';
60+
61+
// Inside your entity page layout, add a new tab:
62+
<EntityLayout.Route path="/feature-flags" title="Feature Flags">
63+
<FlagsTab />
64+
</EntityLayout.Route>
65+
```
66+
67+
![Feature Flags Tab](/img/integrations/backstage/flags-tab.png)
68+
69+
### Overview Card
70+
71+
Add the `FlagsmithOverviewCard` to your entity overview page:
72+
73+
```tsx
74+
import { FlagsmithOverviewCard } from '@flagsmith/backstage-plugin';
75+
76+
// Inside your overview grid:
77+
<Grid item md={6}>
78+
<FlagsmithOverviewCard />
79+
</Grid>
80+
```
81+
82+
<img src="/img/integrations/backstage/overview-card.png" alt="Overview Card" width="600" />
83+
84+
### Usage Card
85+
86+
Add the `FlagsmithUsageCard` to display flag usage metrics:
87+
88+
```tsx
89+
import { FlagsmithUsageCard } from '@flagsmith/backstage-plugin';
90+
91+
// Inside your overview grid:
92+
<Grid item md={6}>
93+
<FlagsmithUsageCard />
94+
</Grid>
95+
```
96+
97+
<img src="/img/integrations/backstage/usage-card.png" alt="Usage Card" width="600" />
98+
99+
## Entity Annotations
100+
101+
Annotate your entities in `catalog-info.yaml` so the plugin knows which Flagsmith project to display:
102+
103+
```yaml
104+
apiVersion: backstage.io/v1alpha1
105+
kind: Component
106+
metadata:
107+
name: my-service
108+
annotations:
109+
flagsmith.com/project-id: '<YOUR_PROJECT_ID>'
110+
flagsmith.com/org-id: '<YOUR_ORG_ID>'
111+
spec:
112+
type: service
113+
owner: my-team
114+
lifecycle: production
115+
```
116+
117+
| Annotation | Required | Description |
118+
| -------------------------- | -------- | ------------------------------------------------------------------ |
119+
| `flagsmith.com/project-id` | Yes | The numeric ID of your Flagsmith project. |
120+
| `flagsmith.com/org-id` | Yes | The numeric ID of your Flagsmith organisation. |
121+
122+
## Getting Your Credentials
123+
124+
### Admin API Key
125+
126+
1. Log in to [Flagsmith](https://app.flagsmith.com/).
127+
2. Navigate to **Account Settings > Keys**.
128+
3. Copy your **Admin API Key**.
129+
130+
### Project ID
131+
132+
1. Open your Flagsmith project.
133+
2. Go to **Project Settings**.
134+
3. The **Project ID** is displayed at the top of the settings page.
135+
136+
### Organisation ID
137+
138+
1. Navigate to **Organisation Settings**.
139+
2. The **Organisation ID** is displayed at the top of the settings page.

docs/docs/third-party-integrations/index.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,19 @@ Automate feature flag management in your development workflows with CI/CD platfo
130130

131131
</div>
132132

133+
## Developer Tools
134+
135+
Bring Flagsmith feature flag management into your developer portals and internal tooling.
136+
137+
<div style={{display: 'grid', gap: '24px', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', margin: '1rem 0'}}>
138+
139+
<Card>
140+
<h3><Link to="/third-party-integrations/backstage">Backstage Plugin</Link></h3>
141+
<p>Feature flag management in your Backstage developer portal</p>
142+
</Card>
143+
144+
</div>
145+
133146
## Additional Integrations
134147

135148
Extend Flagsmith functionality with webhooks and other integration methods.
417 KB
Loading
502 KB
Loading
122 KB
Loading
90.6 KB
Loading

0 commit comments

Comments
 (0)