Documentation Index
Fetch the complete documentation index at: https://backstage.spotify.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Backend-to-backend authentication
Backend-to-backend authentication lets backend code in Backstage securely verify that a given request originates from another part of the backend, rather than from a user. This is useful for tasks like indexing catalog entities for search. This type of request shouldn’t be permissioned, so this feature must be enabled before turning on permissions. To set up backend-to-backend authentication, follow the setup instructions in the backstage.io docs.User entities
Skill Exchange depends on user entities being present in the catalog, as users’ skill profiles are tied to these. Backstage has catalog modules to import users from GitHub, LDAP, or Azure AD. You can also define users in entity YAML files manually, or create a custom EntityProvider.Sign-in resolver
In order for Skill Exchange to properly identify the user entity associated with the currently signed-in user, the SignInResolver must issue an identity token with a sub (subject) claim that is an entity ref to the user entity in the catalog corresponding to the signed-in user. Many authentication providers already provide this behavior, but if using a custom provider, you may need to add this behavior yourself. For examples, see the Google auth sign-in resolver or the GitHub auth sign-in resolver. For information on configuring a sign-in resolver, see the identity resolver docs on backstage.io.Notifications
Skill Exchange supports notifications via Backstage’s notification plugin. While optional, notifications are recommended to reap the full benefits of Skill Exchange by keeping you informed of requests, connections, and updates. For detailed setup instructions, see the Notifications documentation.Backend Installation
Getting the plugin
Add the Skill Exchange packages as dependencies to your Backstage instance:Integrate the plugin with your Backstage app
You can integrate the Skill Exchange backend plugin with your Backstage backend. You just need to add the following:packages/backend/src/index.ts
[Optional] Skill Exchange Actions
Skill Exchange provides actions that integrate with Backstage’s Actions Registry, enabling programmatic discovery of skills and experts. To install:packages/backend/src/index.ts
Legacy Backend
Create a new file,packages/backend/src/plugins/skillexchange.ts with the following content:
packages/backend/src/plugins/skillexchange.ts
packages/backend/src/index.ts. You’ll need to import the module from the previous step, create a plugin environment, and add the router to the express app:
packages/backend/src/index.ts
SkillProfileDecoratorFactory to the search plugin in packages/backend/src/search.ts. This decorates user entities with the skills they add to their profiles and allows them to be found via search.
packages/backend/src/search.ts
[Optional] Defining default lists
Skill Exchange has the ability to ingest lists of items that can be used across the application. For example, by adding a YAML list of locations, Gigs (Embeds, Mentorships, etc) can have their location to set to one of the locations defined in the YAML list. You can also define a default list of skills that users can select to add to their profiles. This list is defined in a YAML file and passed to the Skill Exchange plugin via configuration either as a local file path or a remote URL. You can add Skills, Locations, and Embed Priority Labels by creating a new yaml file using the following basic structure. Locations and embed priority labels are defined as a flat list of names. See Defining Skills for Ingestion below for more information on ingesting skills.default-lists.yaml
app-config.yaml (or equivalent) file. The files property is used for local files, and the remoteUrls property is used for remote files. The files property expects all listed files to use the $include keyword. Refer to Including Files for more information about the $include keyword.
app-config.yaml
You can have multiple YAML lists.You can have a different YAML file for skills and locations, and you can also have multiple files for the same type of data. For example, you can have a YAML file for locations in North America, and another YAML file for locations in Asia. The
files property on defaultLists takes an array of paths to your YAML files. Similarly, the remoteUrls property takes an array of URLs to remote YAML files. For more information on remote URLs, see “Remote configuration options” under Defining Skills for Ingestion.Defining Skills for Ingestion
Skills defined through YAML for ingestion are treated as the source of truth for all skills within Skill Exchange. Each skill can be defined with the following fields:| Field | Type | Description | Value |
|---|---|---|---|
name | String | [Required] The name of the skill. | |
category | Enum | [Required] The category of the skill. | ”DISCIPLINE” | “LANGUAGES” | “FRAMEWORKS” | “INFRASTRUCTURE” | “TECHNIQUES” |
subset | Enum | [Optional] Subset of the skill. Not required for skills with category “DISCIPLINE”. | ”SKILLS” | “TOOLS” |
disciplines | String[] | [Optional] List of disciplines the skill is associated with. Not required for skills with category “DISCIPLINE”. |
Remote configuration options
If you have integrations set up within your Backstage instance, you also have the option to specify a list of remote sources that you’d like Skill Exchange to periodically read from. Types of valid integration URLs that Skill Exchange supports are listed here. Skill Exchange will de-duplicate lists of both local and remote sources and ingest from all sources it points to within thedefaultLists config.
The cadence at which remote file updates can be polled for can be controlled by using the skillExchange.remoteFileUpdates.frequency field, which can take in a cron field:
app-config.yaml
duration field, which follows this shape:
app-config.yaml
Adding a new Skill
To add a new skill, simply add a new entry to theskills list to the skills YAML file. The skill will be ingested the next time the Backstage instance is restarted.
Editing and Deleting a Skill
To update or delete a skill, this must be done through the database as we currently do not support editing or deleting skills through the YAML at the moment.[Optional] Schedule Hack Digest Notifications
To schedule periodic notifications for hack updates (edits to the hack, or new comments) to users who follow hacks, specify a cron value in yourapp-config.yaml (or equivalent) file. This cron value dictates the frequency with which users will receive updates on their hacks, if any updates exist since the last updates were sent. See the example below:
[Optional] Configure Admin Deletion Capabilities
Skill Exchange supports admin deletion capabilities, allowing designated administrators to remove hacks, hack events, embeds, mentorships, and mentorship events from the UI. This feature is useful for cleanup purposes. Admin users are configured via theskillExchange.admins.postCleanupAdmins configuration field which accepts a list of user entity references:
app-config.yaml
Frontend Installation
Getting the plugin
Add@spotify/backstage-plugin-skill-exchange as a dependency to packages/app
Install the Skill Exchange frontend
Wire up routing to theSkillExchangePage entry page in the App.tsx file and enable the features you intend to use via app-config.yaml.
packages/app/src/App.tsx
app-config.yaml
packages/app/src/components/Root/Root.tsx
Add the User entity skills card
Skill Exchange integration with the Backstage user pages is required in order to view and edit skill profiles. To enable, add theSkillExchangeUserEntitySkillsCard to the catalog user entity page:
packages/app/src/components/catalog/EntityPage.tsx
Up and running!
Skill Exchange is now up and running! Get started by clicking the link in your Backstage sidebar, or visiting<backstage-instance>/skill-exchange.