/project-portal-for-innersource

Lists all InnerSource projects of a company in an interactive and easy to use way. Can be used as a template for implementing the "InnerSource portal" pattern by the InnerSource Commons community.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Project Portal for InnerSource REUSE status

A reference implementation to list all InnerSource projects of a company in an interactive and ease to use way. It can be used as a template for implementing the InnerSource portal pattern by the InnerSource Commons community.

Demo

A running instance of the portal using mock data can be found here.

The portal can also be seen in action at the InnerSourceCommons Fall Summit 2020 session The Unexpected Path of Applying InnerSource Patterns.

Description

Each tile in the project portal represents an InnerSource project. The list of projects can be filtered by programming language, sorted by various KPIs, and searched using a keyword. Filter and search criterias are persisted in the URL to allow sharing a subset of projects easily. Entries in the portal can be sorted by the Repository Activity Score.

Overview

Clicking on the repository URL or the contribute button will take you directly to the source repository for GitHub projects. Clicking on any other area on the tile will open the details popup with more information on the project.

Details

The "+" button in the lower right will explain how to list new projects and how to create the InnerSource metadata file that contains additional information about the project.

Requirements

Install nodejs.

Installation

  1. Fork and clone this repository

  2. Install nodejs dependencies

npm install

Note: a postinstall script will place all required framework libraries in the lib folder

  1. Run the project portal on a local web server
npm start

Note: a browser window will open automatically

  1. Start developing!

Configuration

The portal uses a static repos.json file with mock data for testing and developing purposes. In a productive environment, consider adding an automated crawler script that fetches all InnerSource projects as outlined in the following picture:

Crawling InnerSource projects

To do so, apply the following steps:

  1. Crawl all projects with the topic inner-source in your GitHub instance using the GitHub search API:

    ?q=topic:inner-source is:public
    

    The API returns a list of projects with essential information like name, avatar, description, and statistics that we can enrich with additional fields.

  2. For each resulting project add a key _InnerSourceMetadata to the result from the GitHub API call and fill it with additional metadata about the project:

    • Check if there is a file innersource.json in the repository and add all keys directly below _InnerSourceMetadata.

    • Query GitHub weekly participation statistics (subset "all") and add it with key participation

    • Check if there is a file CONTRIBUTING.md and add it with the key guidelines

  3. (Optional) Calculate the Repository Activity Score to define a meaningful order for the projects. Sort entries by score descending.

  4. Write the resulting list of projects with all metadata to the file repos.json to serve all projects it in the portal.

With this approach, projects can self-register to the portal by adding the inner-source topic to their repository and specifying additional metadata inside an innersource.json file. For more information about this file, see Listing Project in the Project Portal for InnerSource

Limitations

The portal focuses on InnerSource projects located in one or more GitHub enterprise instances. Projects using other source code management systems can be displayed in the portal using similar APIs or by adding them manually to the repos.json file.

Contributing

This project started as an InnerSource project at SAP and is now open source. Your contributions are welcome! Please check our contributing guidelines for more details.

Thirdparty

We use the following open source frameworks to create the portal:

Acknowledgements

Thanks to InnerSourceCommons Pattern Group for the feedback and great support.