# zalando/tech-radar architecture

> Architecture diagram of the GitHub repository zalando/tech-radar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zalando/tech-radar
- Repository: https://github.com/zalando/tech-radar

## Overview

- Static Web Client: The user’s browser that loads and renders the Tech Radar.
- Visualization Library (radar.js): The core script (located under docs/radar.js and the versioned files in docs/release) responsible for generating the radar visualization.
- External Dependencies: d3.js (a dependency loaded via CDN) that powers the rendering and manipulation of SVG elements.
- Configuration and Assets:
- The docs folder contains additional assets (index.html for the demo, config.json, radar.css, and multiple release versions of radar) that define the visualization’s style and behavior.
- The package.json and other configuration files (.eslintrc.json, .npmrc, etc.) that serve for development and code quality.
- Development Environment: A local dev server (launched via “yarn start”) which is used when running the project locally.
- Deployment Context: As a static page, it can be hosted on any static page hosting provider, as emphasized in the README.

##### Relationships and Interactions
- The browser loads an HTML page (e.g., docs/index.html) that includes:
- A link to the external d3.js library (via CDN).
- A script tag that points to the radar visualization script (radar.js from either the docs folder or one of the release versions).
- An SVG container (with a specific id) that serves as the rendering canvas.
- During development, files are linted and the project is managed using standard tools (Yarn, ESLint, etc.), indicating a strong emphasis on code quality.
- The relationship between static assets (HTML, CSS, JavaScript) is straightforward – each layer contributes to assembling the final visualization.

##### Architectural Patterns and Relevant Technologies
- Static Client-Side Rendering: The entire visualization is rendered within the client’s browser using SVG and d3.js.
- Modularity via Versioned Releases: Multiple versions of radar (e.g., radar-0.11.js, radar-0.10.js, etc.) allow users to select a specific version as needed.
- Configuration-Driven Design: The visualization is highly configurable using a JavaScript object that defines visual parameters and data layout.
- Development Best Practices: The presence of code quality files (.eslintrc.json, .gitignore, etc.) shows adherence to linting and modular coding practices.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Browser Client"]:::client
    B["Static Web Client"]:::static
    C["d3.js Library (CDN)"]:::library
    D["radar.js Visualization Logic"]:::library
    E["Versioned Radar Releases"]:::library
    F["SVG Container (Drawing Canvas)"]:::static
    G["Configuration (docs/config.json)"]:::config
    H["Styling (docs/radar.css)"]:::config

    subgraph "Development Environment"
        Dev1["Local Dev Server (Yarn Start)"]:::dev
        Dev2["package.json"]:::dev
        Dev3[".eslintrc.json"]:::dev
        Dev4[".npmrc"]:::dev
    end

    A -->|"loads"| B
    B -->|"includes"| C
    B -->|"includes"| D
    D -->|"renders on"| F
    D -->|"offers"| E
    D -->|"configuredBy"| G
    D -->|"styledBy"| H
    Dev1 -->|"serves"| B
    Dev2 --- Dev1
    Dev3 --- Dev1
    Dev4 --- Dev1

    click B "https://github.com/zalando/tech-radar/blob/master/docs/index.html"
    click D "https://github.com/zalando/tech-radar/blob/master/docs/radar.js"
    click E "https://github.com/zalando/tech-radar/tree/master/docs/release/"
    click G "https://github.com/zalando/tech-radar/blob/master/docs/config.json"
    click H "https://github.com/zalando/tech-radar/blob/master/docs/radar.css"
    click Dev2 "https://github.com/zalando/tech-radar/blob/master/package.json"
    click Dev3 "https://github.com/zalando/tech-radar/blob/master/.eslintrc.json"
    click Dev4 "https://github.com/zalando/tech-radar/blob/master/.npmrc"

    classDef client fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef static fill:#99ccff,stroke:#333,stroke-width:2px;
    classDef library fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef config fill:#ff99cc,stroke:#333,stroke-width:2px;
    classDef dev fill:#ffdddd,stroke:#333,stroke-width:2px;
```
