# bnymellon/codekatas architecture

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

- Interactive diagram: https://gitdiagram.com/bnymellon/codekatas
- Repository: https://github.com/bnymellon/codekatas

## Overview

##### Project type and purpose
- This is an educational “Katas” monorepo—a multi-module Maven project hosting a series of self-contained programming exercises (Code Katas) in Java and Kotlin.
- Each “kata” module contains one or more failing unit tests and a minimal stub implementation; the corresponding “-solutions” module contains a reference solution.
- The project is not a full-stack web app or microservice system; it’s an open-source teaching tool illustrating various Java APIs, libraries (Streams, Eclipse Collections, JMH, PiTest, etc.), and language features (lambdas, date/time, Kotlin interop).

##### File structure
- Top-level aggregator:
- pom.xml (parent POM)
- checkstyle-*.xml (code style rules)
- .github/workflows/*.yml (CI pipelines: one to build the katas, one to build the solutions)
- Each kata lives in two sibling modules:
- `<kata-name>` (the exercise)
- `<kata-name>-solutions` (the sample implementation)
- Some katas have variant sub-modules (e.g., coffee-shop-kata/jdk8 and jdk21).
- Standard Maven convention: `src/main/java`, `src/main/kotlin` (where applicable), and `src/test/java` or `src/test/kotlin`.

##### README for additional insights
- The README enumerates each kata, its learning goal, and prerequisites (Java 21, Maven).
- No runtime architecture is described—focus is on hands-on test-driven development and library exposure.

##### Detail and coverage
- Modules listed in the file tree.
- That each module has its own `src/main` and `src/test` subfolders.
- Checkstyle rules and suppression files being applied globally.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Parent Aggregator
    Parent["Parent POM"]:::parent
    click Parent "https://github.com/bnymellon/codekatas/blob/master/pom.xml"

    %% Checkstyle Config
    Check["Checkstyle Config"]:::ci
    click Check "https://github.com/bnymellon/codekatas/blob/master/checkstyle-configuration.xml"
    click Check "https://github.com/bnymellon/codekatas/blob/master/checkstyle-suppressions.xml"

    %% CI Pipelines
    subgraph "CI/CD (GitHub Actions)" 
        CI1["Katas Build CI"]:::ci
        CI2["Solutions Build CI"]:::ci
        click CI1 "https://github.com/bnymellon/codekatas/blob/master/.github/workflows/maven.yml"
        click CI2 "https://github.com/bnymellon/codekatas/blob/master/.github/workflows/solutions.yml"
    end

    %% Domains and Modules
    subgraph "Date/Time API"
        CAL["calendar-kata\n(Java21)"]:::kata
        CALS["calendar-kata-solutions"]:::solution
        click CAL "https://github.com/bnymellon/codekatas/blob/master/calendar-kata/pom.xml"
        click CALS "https://github.com/bnymellon/codekatas/blob/master/calendar-kata-solutions/pom.xml"
    end

    subgraph "Code Point API"
        CP["code-point-kata"]:::kata
        CPS["code-point-kata-solutions"]:::solution
        click CP "https://github.com/bnymellon/codekatas/blob/master/code-point-kata/pom.xml"
        click CPS "https://github.com/bnymellon/codekatas/blob/master/code-point-kata-solutions/pom.xml"
    end

    subgraph "Data Structures"
        DC["deck-of-cards-kata"]:::kata
        DCS["deck-of-cards-kata-solutions"]:::solution
        click DC "https://github.com/bnymellon/codekatas/blob/master/deck-of-cards-kata/pom.xml"
        click DCS "https://github.com/bnymellon/codekatas/blob/master/deck-of-cards-kata-solutions/pom.xml"
    end

    subgraph "Domain Example"
        DN["donut-kata"]:::kata
        DNS["donut-kata-solutions"]:::solution
        click DN "https://github.com/bnymellon/codekatas/blob/master/donut-kata/pom.xml"
        click DNS "https://github.com/bnymellon/codekatas/blob/master/donut-kata-solutions/pom.xml"
    end

    subgraph "Functional (Lambdas)"
        JL["java-lambda-kata"]:::kata
        JLS["java-lambda-kata-solutions"]:::solution
        click JL "https://github.com/bnymellon/codekatas/blob/master/java-lambda-kata/pom.xml"
        click JLS "https://github.com/bnymellon/codekatas/blob/master/java-lambda-kata-solutions/pom.xml"
    end

    subgraph "Performance"
        JMH["jmh-kata"]:::kata
        click JMH "https://github.com/bnymellon/codekatas/blob/master/jmh-kata/pom.xml"
    end

    subgraph "Mutation Testing"
        PM["pitest-mutation-kata"]:::kata
        PMS["pitest-mutation-kata-solutions"]:::solution
        click PM "https://github.com/bnymellon/codekatas/blob/master/pitest-mutation-kata/pom.xml"
        click PMS "https://github.com/bnymellon/codekatas/blob/master/pitest-mutation-kata-solutions/pom.xml"
    end

    subgraph "Meta"
        KOK["kata-of-katas"]:::kata
        KOKS["kata-of-katas-solutions"]:::solution
        click KOK "https://github.com/bnymellon/codekatas/blob/master/kata-of-katas/pom.xml"
        click KOKS "https://github.com/bnymellon/codekatas/blob/master/kata-of-katas-solutions/pom.xml"
    end

    subgraph "Coffee Shop Kata"
        CS["coffee-shop-kata"]:::kata
        CS8["jdk8"]:::kata
        CS21["jdk21"]:::kata
        CSS["coffee-shop-kata-solutions"]:::solution
        click CS "https://github.com/bnymellon/codekatas/blob/master/coffee-shop-kata/pom.xml"
        click CS8 "https://github.com/bnymellon/codekatas/blob/master/coffee-shop-kata/jdk8/pom.xml"
        click CS21 "https://github.com/bnymellon/codekatas/blob/master/coffee-shop-kata/jdk21/pom.xml"
        click CSS "https://github.com/bnymellon/codekatas/blob/master/coffee-shop-kata-solutions/pom.xml"
    end

    %% Relationships
    Parent --> Check
    Parent --> CAL
    Parent --> CALS
    Parent --> CP
    Parent --> CPS
    Parent --> DC
    Parent --> DCS
    Parent --> DN
    Parent --> DNS
    Parent --> JL
    Parent --> JLS
    Parent --> JMH
    Parent --> PM
    Parent --> PMS
    Parent --> KOK
    Parent --> KOKS
    Parent --> CS
    Parent --> CSS

    CS --> CS8
    CS --> CS21

    CI1 --> CAL
    CI1 --> CP
    CI1 --> DC
    CI1 --> DN
    CI1 --> JL
    CI1 --> JMH
    CI1 --> PM
    CI1 --> KOK
    CI1 --> CS

    CI2 --> CALS
    CI2 --> CPS
    CI2 --> DCS
    CI2 --> DNS
    CI2 --> JLS
    CI2 --> PMS
    CI2 --> KOKS
    CI2 --> CSS

    %% Styles
    classDef parent fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef ci fill:#FADBD8,stroke:#C0392B,stroke-width:1px;
    classDef kata fill:#D6EAF8,stroke:#2874A6,stroke-width:1px;
    classDef solution fill:#D5F5E3,stroke:#239B56,stroke-width:1px;
```
