Skip to content

StackExchange/backstage-stackoverflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backstage - Stack Internal Plugin

Overview

The Stack Internal plugins for Backstage integrate your private knowledge solution with your Backstage instance. These plugins provide seamless access to Stack Internal' most relevant data, allowing you to display the top users, top tags, and top questions directly within Backstage. Additionally, it indexes all the questions from a Stack Internal instance and integrates them into Backstage search, providing enhanced discoverability.

These plugins also allow you to securely create Stack Internal questions from Backstage itself.

Key Features

OAuth Authentication

The plugin uses OAuth authentication to ensure that only authorised users can post questions to your Stack Internal instance from Backstage. The OAuth process is secure, user-friendly, and integrates seamlessly with Backstage, providing a safe way to verify user identities before allowing access to question creation features.

Top Users and Tags

Displays the top users and tags from your Stack Internal instance, giving you insights into the most active contributors and trending topics.

image Screenshot 2025-08-05 at 23 14 15

Question Indexing

Retrieves all the questions from your Stack Overflow Internal instance and indexes them into Backstage search. This makes it easier to search and discover questions across your organisation.

alt text

Stack Overflow Internal Hub

A centralised hub within Backstage that showcases the top questions. The hub also allows you to filter questions like you would on Stack Overflow Internal.

image

Question Creation Form

Once authenticated, users can create questions using a dedicated form within Backstage. This form features a rich text editor for formatting questions, question tips and tag autocompletion to help users categorise their questions efficiently.

image

Demo Docker Image

If you’d like to quickly see how this integration works without setting up your own Backstage instance, you can use my Docker image:

estoesmoises/stackoverflow-backstage-demo:latest

This image runs a Backstage instance pre-configured with the Stack Internal plugin. You just need to pass a few environment variables when starting the container to connect it to your Stack Internal instance.


📦 Required Environment Variables

For Enterprise Customers:

Variable Description
STACK_OVERFLOW_INSTANCE_URL The base URL of your Stack Internal (Enterprise) instance.
STACK_OVERFLOW_API_ACCESS_TOKEN A read-only, no-expiry API access token generated for your Stack Internal Enterprise instance. This token is used by the plugin’s search collator to index questions into Backstage search.
STACK_OVERFLOW_CLIENT_ID The OAuth Client ID from your Stack Overflow Internal application. This is required to enable the secure question creation flow from within Backstage.
STACK_OVERFLOW_REDIRECT_URI The redirect URI where Stack Overflow Internal should send users after completing the OAuth authentication flow. By default, this is {app.baseUrl}/stack-overflow-teams. For local development, you can use a redirect service like http://redirectmeto.com/http://localhost:7007/stack-overflow-teams.

For Basic and Business Customers:

Variable Description
STACK_OVERFLOW_TEAM_NAME The team name or team slug from your Stack Internal account.
STACK_OVERFLOW_API_ACCESS_TOKEN A read-only, no-expiry API access token generated for your Stack Internal instance. Used for indexing content.

Note:
Question creation is not supported on the Basic tier.

📖 How to generate your API Access Token

Basic and Business customers can follow the official Stack Internal guide to create a Personal Access Token (PAT) for API authentication:

👉 Personal Access Tokens (PATs) for API Authentication

This token should have read-only access and no expiration to be used for indexing questions into Backstage search.


Example Docker Command

Once you have those values, run:

docker run -p 7007:7007 \
  -e STACK_OVERFLOW_INSTANCE_URL=https://support-autotest.stackenterprise.co \
  -e STACK_OVERFLOW_API_ACCESS_TOKEN='CasdasdasdaDQyrqdfQ))' \
  -e STACK_OVERFLOW_CLIENT_ID=19 \
  -e STACK_OVERFLOW_REDIRECT_URI=http://redirectmeto.com/http://localhost:7007/stack-overflow-teams \
  estoesmoises/stackoverflow-backstage-demo:latest

Installation

Follow these steps to install and run the plugin locally:

  1. Clone the repository

  2. Navigate into the project directory:

    cd backstage-stackoverflow
    
  3. Install dependencies:

    yarn install
    
  4. The installation will scaffold the Backstage application and include the necessary plugins.

  5. The plugins this project aims to develop are located in the /plugins folder. Changes to the code will usually trigger a hot reload. If not, you can restart the Backstage application.

  6. To start the Backstage application, run:

    yarn dev
    

Contributing

Feel free to fork this repository and submit pull requests. Contributions, suggestions, and bug reports are welcome!

About

Stack Internal integration with Backstage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •