# nibinrj/buildlens-lab architecture

> Architecture diagram of the GitHub repository nibinrj/buildlens-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nibinrj/buildlens-lab
- Repository: https://github.com/nibinrj/buildlens-lab

## Overview

buildlens-lab is a small Maven build subject used to exercise BuildLens reporting. Its code path includes an API pricing service backed by core arithmetic; core also provides standalone slug conversion. The README describes stable core tests, an API slow test intended for BuildLens step P4, and a future injected-flakiness area for P3, currently empty. Jenkins builds the project and reports test results, stage timings, and log tail to BuildLens. Source excerpts establish the pricing-to-arithmetic call; other links reflect README documentation, not inspected pipeline or test implementations.

Main entry points: [`Jenkinsfile`](https://github.com/nibinrj/buildlens-lab/blob/main/Jenkinsfile) (Build pipeline), [`core/src/main/java/lab/core/Calculator.java`](https://github.com/nibinrj/buildlens-lab/blob/main/core/src/main/java/lab/core/Calculator.java) (Core arithmetic), [`api/src/main/java/lab/api/PriceService.java`](https://github.com/nibinrj/buildlens-lab/blob/main/api/src/main/java/lab/api/PriceService.java) (Price service), [`core/src/test/java/lab/core`](https://github.com/nibinrj/buildlens-lab/tree/main/core/src/test/java/lab/core) (Stable tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Project code"]
  node_core["Core arithmetic<br/>[Calculator.java]"]
  node_api["Price service<br/>[PriceService.java]"]
  node_slugs["Slug conversion<br/>[Slugs.java]"]
end

subgraph group_build["Build reporting"]
  node_pipeline["Build pipeline"]
end

subgraph group_scenarios["Test scenarios"]
  node_stable["Stable tests"]
  node_slow["Controlled slow test"]
  node_flaky["Injected flakiness"]
end

node_jenkins(("Jenkins"))
node_buildlens["BuildLens"]

node_api -->|"adds prices"| node_core
node_jenkins -->|"runs"| node_pipeline
node_pipeline -->|"builds project"| node_core
node_pipeline -->|"builds project"| node_api
node_pipeline -->|"reports results"| node_buildlens
node_stable -->|"exercises"| node_core
node_slow -->|"arrives at P4"| node_buildlens
node_flaky -.->|"planned for P3"| node_buildlens

click node_pipeline "https://github.com/nibinrj/buildlens-lab/blob/main/Jenkinsfile"
click node_core "https://github.com/nibinrj/buildlens-lab/blob/main/core/src/main/java/lab/core/Calculator.java"
click node_api "https://github.com/nibinrj/buildlens-lab/blob/main/api/src/main/java/lab/api/PriceService.java"
click node_slugs "https://github.com/nibinrj/buildlens-lab/blob/main/core/src/main/java/lab/core/Slugs.java"
click node_stable "https://github.com/nibinrj/buildlens-lab/tree/main/core/src/test/java/lab/core"
click node_slow "https://github.com/nibinrj/buildlens-lab/tree/main/api/src/test/java/lab/api"
click node_flaky "https://github.com/nibinrj/buildlens-lab/tree/main/flaky-lab"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_core,node_api,node_slugs toneBlue
class node_pipeline toneAmber
class node_stable,node_slow,node_flaky toneMint
class node_jenkins,node_buildlens toneIndigo
```

## Components

### Project code

- [Core arithmetic](https://github.com/nibinrj/buildlens-lab/blob/main/core/src/main/java/lab/core/Calculator.java): `core/src/main/java/lab/core/Calculator.java`
- [Price service](https://github.com/nibinrj/buildlens-lab/blob/main/api/src/main/java/lab/api/PriceService.java): `api/src/main/java/lab/api/PriceService.java`
- [Slug conversion](https://github.com/nibinrj/buildlens-lab/blob/main/core/src/main/java/lab/core/Slugs.java): `core/src/main/java/lab/core/Slugs.java`

### Build reporting

- [Build pipeline](https://github.com/nibinrj/buildlens-lab/blob/main/Jenkinsfile): `Jenkinsfile`

### Test scenarios

- [Stable tests](https://github.com/nibinrj/buildlens-lab/tree/main/core/src/test/java/lab/core): `core/src/test/java/lab/core`
- [Controlled slow test](https://github.com/nibinrj/buildlens-lab/tree/main/api/src/test/java/lab/api): `api/src/test/java/lab/api`
- [Injected flakiness](https://github.com/nibinrj/buildlens-lab/tree/main/flaky-lab): `flaky-lab`

### Other components

- **Jenkins**
- **BuildLens**

## Connections

- Price service → Core arithmetic: adds prices (evidence: `api/src/main/java/lab/api/PriceService.java`)
- Jenkins → Build pipeline: runs (evidence: `README.md`)
- Build pipeline → Core arithmetic: builds project (evidence: `README.md`)
- Build pipeline → Price service: builds project (evidence: `README.md`)
- Build pipeline → BuildLens: reports results (evidence: `README.md`)
- Stable tests → Core arithmetic: exercises (evidence: `README.md`)
- Controlled slow test → BuildLens: arrives at P4 (evidence: `README.md`)
- Injected flakiness → BuildLens: planned for P3 (evidence: `README.md`)
