# yoshi-782/variousvcmconv architecture

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

- Interactive diagram: https://gitdiagram.com/yoshi-782/variousvcmconv
- Repository: https://github.com/yoshi-782/variousvcmconv

## Overview

##### Main Components
- Language Implementations: Within each version, include the language-specific components:
- New Version: C#, Dart, JavaScript, Python.
- Old Version: C#, Java, Python.
- Core Conversion Logic: Although each implementation might be coded differently, conceptually they wrap around the “conversion engine” which handles the logic of transforming text using either:
- The Unicode normalization strategy (for the New Version).
- The array substitution approach (for the Old Version).
- Shared Architectural Concepts: Indicate that for each language there is an entry point (e.g., main file in C# “Program.cs” or Dart’s “dakuten.dart”) that triggers the conversion process.

##### Picture the Relationships and Interactions
- For each language-specific component, show an entry point that invokes core conversion logic.
- Within each version’s section, illustrate that the conversion engine is applied per character:
- In the New Version: Steps include normalizing each character (using Unicode normalization to NFD), checking the character-length (1 or 2 characters), and then applying the appropriate logic.
- In the Old Version: Use array lookups to decide if a character gets replaced or concatenated with a diacritic.

##### Architectural Patterns and Design Principles
- Modular Architecture: Emphasize that each language’s implementation is self-contained. Even though they implement the same “conversion” function, they are independently maintained.
- Cross-Version Comparison: Optionally, show a shared conceptual space for “Conversion Engine” with branches into “New Version” and “Old Version” strategies.

##### Relevant Technologies and Frameworks
- C#: .NET Framework / .NET Core (as per the Program.cs and ConsoleApp1.csproj).
- Dart: Dart SDK (highlighting files like bin/dakuten.dart and configuration files such as analysis_options.yaml and pubspec.yaml).
- JavaScript: A standalone JS file (dakutenConv.js).
- Python: Python scripts (dakutenConv.py and OldDakuhen.py).
- Java in the Old Version.
- That external libraries or frameworks might be used for Unicode normalization (in languages that support it).

##### Final Detailed Architectural Elements
- Top-Level: Project repository split into “NewVersion” and “OldVersion”.
- For Each Version:
- Submodules for each language.
- That each language submodule contains an “Entry Point” which calls the “Conversion Routine”.
- General Flow: Input → Conversion Routine → Output.
- Extra Annotations: Add any notes/callouts that explain the rationale behind two distinct conversion strategies between versions.

## Diagram (Mermaid)

```mermaid
graph TD
    A("Input String"):::input

    subgraph "New Version"
        direction TB
        NV_CSharp("C# Conversion Module (.NET Core)"):::new
        NV_Dart("Dart Conversion Module (Dart SDK)"):::new
        NV_JS("JavaScript Conversion Module"):::new
        NV_Python("Python Conversion Module"):::new
        NV_Engine("Conversion Routine (UnicodeNormalization)"):::newEngine
        NV_CSharp --> NV_Engine
        NV_Dart --> NV_Engine
        NV_JS --> NV_Engine
        NV_Python --> NV_Engine
        NV_Engine --> NV_Out("New Version Output")
    end

    subgraph "旧バージョン"
        direction TB
        OV_CSharp("C# Conversion Module (.NET Core)"):::old
        OV_Java("Java Conversion Module"):::old
        OV_Python("Python Conversion Module"):::old
        OV_Engine("Conversion Routine (ArraySubstitution)"):::oldEngine
        OV_CSharp --> OV_Engine
        OV_Java --> OV_Engine
        OV_Python --> OV_Engine
        OV_Engine --> OV_Out("旧バージョン Output")
    end

    A --> NV_CSharp
    A --> NV_Dart
    A --> NV_JS
    A --> NV_Python

    A --> OV_CSharp
    A --> OV_Java
    A --> OV_Python

    NV_Out --> O("Output String"):::output
    OV_Out --> O

    click NV_CSharp "https://github.com/yoshi-782/variousvcmconv/blob/main/NewVersion/CSharp/Program.cs"
    click NV_Dart "https://github.com/yoshi-782/variousvcmconv/blob/main/NewVersion/Dart/dakuten/bin/dakuten.dart"
    click NV_JS "https://github.com/yoshi-782/variousvcmconv/blob/main/NewVersion/JavaScript/dakutenConv.js"
    click NV_Python "https://github.com/yoshi-782/variousvcmconv/blob/main/NewVersion/Python/dakutenConv.py"
    click OV_CSharp "https://github.com/yoshi-782/variousvcmconv/blob/main/OldVersion/CSharp/Dakuten/ConsoleApp1/Program.cs"
    click OV_Java "https://github.com/yoshi-782/variousvcmconv/blob/main/OldVersion/Java/Dakuhen.java"
    click OV_Python "https://github.com/yoshi-782/variousvcmconv/blob/main/OldVersion/Python/OldDakuhen.py"

    classDef input fill:#f9e79f,stroke:#d4ac0d,stroke-width:2px;
    classDef output fill:#f9e79f,stroke:#d4ac0d,stroke-width:2px;
    classDef new fill:#d1f2eb,stroke:#117864,stroke-width:2px;
    classDef newEngine fill:#a2ded0,stroke:#1e8449,stroke-width:2px,stroke-dasharray: 5 5;
    classDef old fill:#f5cba7,stroke:#b9770e,stroke-width:2px;
    classDef oldEngine fill:#f0b27a,stroke:#943126,stroke-width:2px,stroke-dasharray: 5 5;
```
