Feature Map
Artifacts - Docs

The documentation files support rendering the documentation site. They are composed of .feature_map/docs/index.html and .feature_map/docs/feature-map-config.js.

Generation

The docs files are generated by the bin/featuremap docs command.

Structure

index.html

The documentation site web page which runs a small React application. All site assets are compiled into inline style and JavaScript tags. This index also requires the feature-map-config.js.

feature-map-config.js

Includes a mapping of project configuration, environment data, and all calculated feature metrics. This data is inserted as a JavaScript object that is injected into the browser’s window.

window.FEATURE_MAP_CONFIG = {
  "environment": {
    "git_ref": "main"
  },
  "features": {
    "Authentication": {
      "description": "Allows users to authenticate.",
      "dashboard_link": "https://dashboard.example.com",
      "documentation_link": https://docs.example.com,
      "assignments": {
        "files": [
          "src/auth/controllers/login_controller.rb",
          "src/auth/services/oauth_service.rb"
        ],
        "teams": [
          "Core"
        ]
      },
      "metrics": {
        "abc_size": 421.21,
        "cyclomatic_complexity": 32,
        "lines_of_code": 450,
        "todo_locations": {
          "src/auth/services/oauth_service.rb:115": "Extract this..."
        }
      },
      "test_coverage": {
        "lines": 1051,
        "hits": 1051,
        "misses": 0
      },
      "test_pyramid": {
        "unit_count": 45,
        "unit_pending": 1,
        "integration_count": 8,
        "integration_pending": 2,
        "regression_count": 2,
        "regression_pending": 0
      }
    }
  },
  "project": {
    // ...values copied from .feature_map/config.yml
  }
}