Quickstart

This project uses the Hexagonal Architecture pattern and is designed to extract information from GitHub, GitLab, Bitbucket, and Azure DevOps. This information is stored, processed and analyzed automatically, allowing the calculation of important indicators for a project or team.

Project structure

The code is structured into three main packages:

  • Application: This package contains all the application layer code which determines how the various components of the system interact with each other. It contains various services, controllers, and ports implementation to handle incoming data.
  • Domain: The domain package contains business logic, models, and interfaces (Ports). Business rules and logic reside in this package, which allows these rules and logic to be technology-agnostic.
  • Framework: The framework package includes the technology-specific implementation of the system. This is where the details about data sources, databases, APIs, etc., are implemented.

Data Flow

The process for data retrieval and handling is as follows:

  • The system receives payload data from a webhook (GitHub webhook, GitLab webhook, Azure DevOps webhook, Bitbucket webhook).
  • The system checks the payload for necessary data, if some data, for example, the stats from the commits, are missing in the payload, the system triggers a call to the API (GitHub API, GitLab API, Azure DevOps API, Bitbucket API) to fetch the missing data.
  • The extracted data is then processed and used as needed in the client port.

Requirements

  • Java 17
  • Docker
  • Intellij/Eclipse
  • Mongodb Compass

General Settings

Environment variables that must be configured in the project.

  • MONGODB Environment variable that stores the value of the connection url to the Database example: mongodb+srv://username:[email protected]/performance-persistence
  • AUTH_BASIC_USERNAME Username for connection to the API
  • AUTH_BASIC_PASSWORD Password for connection to the API
  • PROFILES_DEFAULT Environment variable that stores the value of the profiles or platforms to process
  • LICENSE_API_APP_KEY Connection key with the license API

GitHub Settings

Environment variables that must be configured in the project for GitHub

  • GITHUB_ORGANIZATION Environment variable that stores the value of the workspace to process
  • GITHUB_ENTERPRISE Environment variable that stores the value of the GitHub enterprise to process
  • GITHUB_WEBHOOK_SECRET Environment variable that stores the secret key value to process webhooks
  • GITHUB_TOKEN Environment variable that stores the value of the token for the connection to GRAPHQL and API

GitLab Settings

Environment variables that must be configured in the project for GitLab

  • GITLAB_CLIENT_AUTHORIZATION Environment variable that stores the value of the token to connect to the API

Azure DevOps Settings

Environment variables that must be configured in the project for Azure DevOps

  • AZURE_DEVOPS_TOKEN Environment variable that stores the value of the token to connect to the API
  • AZURE_DEVOPS_ORGANIZATION Environment variable that stores the value of the workspace to process, and the token should be created by Team Project Administrator Role.

Bitbucket Settings

Environment variables that must be configured in the project for Bitbucket

  • BITBUCKET_CLIENT_ID Environment variable that stores the value of the user's KEY token to connect to the API
  • BITBUCKET_CLIENT_SECRET Environment variable that stores the value of the user's SECRET token to connect to the API
  • BITBUCKET_WORKSPACE Environment variable that stores the value of the workspace to process

GitHub Copilot Settings

Environment variables that must be configured in the project for obtain GitHub Copilot metrics usage

  • COPILOT_ENTERPRISE Environment variable that stores the value of the GitHub Copilot enterprise to process

  • COPILOT_ORGANIZATION Environment variable that stores the value of the GitHub Copilot organization to process

  • COPILOT_TOKEN Environment variable that stores the value of the OAuth app tokens for the connection

  • COPILOT_METRICS_LEVEL Environment variable that indicates the load level of the metrics

  • To create a new OAuth app, go to the GitHub Developer settings.

Jira Settings

Environment variables that must be configured in the project for Jira

  • JIRA_URL Environment variable with the connection URL to Jira
  • JIRA_TOKEN Environment variable with the token to connect
  • JIRA_USER Environment variable with the user's email associated with the token to connect

Microsoft Teams Settings

Credentials You’ll Need

To authenticate with Microsoft Graph:

Register an App in Azure AD:

  • Go to Azure Portal
  • Navigate to: Azure Active Directory > App registrations > New registration
  • Register your app:
  • Set Redirect URI if using OAuth2
  • Copy the Application (client) ID
  • Under Certificates & Secrets:
  • Generate a Client Secret
  • Under API Permissions:
  • Add the required Graph permissions listed above.
  • Grant admin consent for your tenant (if needed).

Admin Requirements

Application permissions (like CallRecords.Read.All, Reports.Read.All) require tenant admin consent.

For access to detailed call analytics, you also need Microsoft Teams Premium or E5 licensing for some insights.

To access detailed Microsoft Teams user analytics Pulzen uses the Microsoft Graph API—such in order to get number of conversations, time on screen, conversation duration, messages exchanged, and screen sharing, for that your application needs to have the following permissions:

Permission TypeScopeDescription
ApplicationReports.Read.AllNeeded to read usage reports organization-wide.
DelegatedUser.ReadBasic user profile info (mandatory for all access).
DelegatedReports.Read.AllFor delegated apps accessing reports.
DelegatedCalls.AccessMedia.All (if needed)Access media information in calls.
DelegatedCallRecords.Read.All or CallRecords.ReadRequired for reading call record details.
ApplicationCallRecords.Read.AllNeeded for accessing call analytics (including Teams usage).
ApplicationAnalytics.Read.All (if using MyAnalytics)For personal analytics like focus time, screen time, etc.