# wrackzone/pi-scope-change-chart architecture

> Architecture diagram of the GitHub repository wrackzone/pi-scope-change-chart, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wrackzone/pi-scope-change-chart
- Repository: https://github.com/wrackzone/pi-scope-change-chart

## Overview

##### Main Components

a) Frontend Components:
- A visualization component for the chart
- Tabbed panel component for Series and Change views
- User interface controls for baseline selection

b) Data Layer:
- Rally Lookback API integration
- Data transformation layer for scope change calculations
- Moment.js time handling (indicated by lib/moment-range.js)

c) Build/Deploy System:
- Grunt build system (indicated by Gruntfile.js)
- Deployment artifacts

##### Component Relationships

**[Rally Dashboard] → [PI Scope Change Chart App]**
- ↓
**[User Interface Layer] → [Chart Visualization]**
- ↓                      ↓
**[Data Processing Layer] ← → [Rally Lookback API]**
- ↓
**[Time Processing Layer (Moment.js)]**

##### Specific Implementation Details

- Blue rectangles for UI components
- Green rectangles for data processing
- Yellow diamonds for external services (Rally Lookback API)
- Orange rectangles for build/deployment components

##### Key Architectural Elements

a) Frontend Architecture:
- Main App.js as the central controller
- CSS styling layer (app.css)
- RequireJS dependency management (lib/require.js)

b) Testing Architecture:
- Test framework integration
- Connection to Travis CI (.travis.yml)

##### Deployment Architecture

Deployment process:
- Development environment
- Build process (Grunt)
- Deployment artifacts (deploy folder contents)

##### Important Notes

- Version/environment information
- SAAS subscription requirement
- Baseline calculation options
- Feature tracking mechanism

##### Technical Dependencies

- RequireJS
- Moment.js
- Rally SDK dependencies
- Testing framework

Remember to:
- Use clear, consistent labeling
- Notes about the baseline calculation options
- Feature comparison mechanism
- Relationship between the visualization and data layers

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Legend"
        UI[UI Component]:::ui
        DATA[Data Component]:::data
        EXT[External Service]:::external
        BUILD[Build Component]:::build
        style Legend fill:#f0f0f0,stroke:#333
    end

    subgraph "Rally Dashboard Environment"
        DASHBOARD[Rally Dashboard]:::external
    end

    subgraph "Portfolio Item Scope Change Chart Application"
        APP["Main App Container"]:::ui
        click APP "https://github.com/wrackzone/pi-scope-change-chart/blob/master/App.js"
        
        subgraph "User Interface Layer"
            CHART["Chart Visualization"]:::ui
            click CHART "https://github.com/wrackzone/pi-scope-change-chart/blob/master/pi-scope-change-chart.js"
            TABS["Tabbed Panel<br/>(Series & Change Views)"]:::ui
            CONTROLS["Baseline Selection Controls"]:::ui
            STYLING["UI Styling"]:::ui
            click STYLING "https://github.com/wrackzone/pi-scope-change-chart/blob/master/app.css"
        end

        subgraph "Data Processing Layer"
            DATAPROC["Data Transformation<br/>& Scope Calculations"]:::data
            TIMEPROC["Time Processing"]:::data
            click TIMEPROC "https://github.com/wrackzone/pi-scope-change-chart/blob/master/lib/moment-range.js"
            DEPMAN["Dependency Management"]:::data
            click DEPMAN "https://github.com/wrackzone/pi-scope-change-chart/blob/master/lib/require.js"
        end

        subgraph "External Integration"
            RALLYAPI["Rally Lookback API"]:::external
        end

        subgraph "Build & Deployment"
            GRUNT["Grunt Build System"]:::build
            click GRUNT "https://github.com/wrackzone/pi-scope-change-chart/blob/master/Gruntfile.js"
            DEPLOY["Deployment Artifacts"]:::build
            click DEPLOY "https://github.com/wrackzone/pi-scope-change-chart/tree/master/deploy/"
            CONFIG["Application Config"]:::build
            click CONFIG "https://github.com/wrackzone/pi-scope-change-chart/blob/master/config.json"
        end

        subgraph "Testing Infrastructure"
            TESTS["Test Specifications"]:::build
            click TESTS "https://github.com/wrackzone/pi-scope-change-chart/blob/master/test/AppSpec.js"
            CI["CI Integration"]:::build
            click CI "https://github.com/wrackzone/pi-scope-change-chart/blob/master/.travis.yml"
        end
    end

    %% Connections
    DASHBOARD --> APP
    APP --> CHART
    APP --> TABS
    APP --> CONTROLS
    CHART --> DATAPROC
    DATAPROC --> TIMEPROC
    DATAPROC <--> RALLYAPI
    DEPMAN --> APP
    GRUNT --> DEPLOY
    TESTS --> CI

    %% Styles
    classDef ui fill:#2196F3,stroke:#333,color:white
    classDef data fill:#4CAF50,stroke:#333,color:white
    classDef external fill:#FFC107,stroke:#333,color:black
    classDef build fill:#FF5722,stroke:#333,color:white
```
