# tiagotakahashi/tdd_interpretadornumerosromanos architecture

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

- Interactive diagram: https://gitdiagram.com/tiagotakahashi/tdd_interpretadornumerosromanos
- Repository: https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos

## Overview

##### Project type and purpose
- This is a small, library-style tool (“InterpretadorNumerosRomanos”) implemented in C#/.NET, whose sole purpose is to parse and convert Roman numerals into integers.
- It follows a TDD (test-driven development) approach, as evidenced by the separate test project (“InterpretadorNumerosRomanosTestes”).

##### File structure
- Top level:
- InterpretadorNumerosRomanos.sln — Visual Studio solution file.
- InterpretadorNumerosRomanos/ — class-library project containing core interpreter logic.
- InterpretadorNumerosRomanosTestes/ — test project containing unit tests.
- Key code file: Interpretador.cs (holds the class/method that does the interpretation).
- No external services or data stores are present—this is a pure in-memory converter.

##### README
- Only one line: “TDD_InterpretadorNumerosRomanos.”
- Implies that the architecture is minimal: core library + tests.

a. Main components
- “Core Library” (InterpretadorNumerosRomanos assembly)
- Classes/Modules:
– RomanNumeralParser (tokenizes input string)
– RomanToIntegerConverter (applies rules & computes value)
– RomanNumeralValidator (checks for illegal sequences)
- “Test Suite” (InterpretadorNumerosRomanosTestes assembly)
- Test fixtures (e.g., Teste.cs) that validate parser, converter, and validator.
b. Relationships & interactions
- Parser ➔ Validator (ensures syntax correctness)
- Parser ➔ Converter (feeds validated tokens for numeric calculation)
- Converter returns integer result to Client Code.
- Test Suite exercises all three components (Parser, Validator, Converter) with green‐red refactoring loops.
c. Architectural patterns & design principles
- TDD cycle: tests drive implementation
- Single Responsibility Principle: separate parsing, validation, conversion
d. Technologies & frameworks
- .NET/C# class library
- MSBuild (.csproj)
- MSTest or NUnit (whichever target framework is in the Testes project)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Solution Layer
    Solution["InterpretadorNumerosRomanos.sln"]
    
    %% Core Library
    subgraph "Core Library"
        direction TB
        CoreLibrary["Project: InterpretadorNumerosRomanos"]:::prod
        Parser["RomanNumeralParser"]:::prod
        Validator["RomanNumeralValidator"]:::prod
        Converter["RomanToIntegerConverter"]:::prod
    end

    %% Test Suite
    subgraph "Test Suite"
        direction TB
        TestSuite["Project: InterpretadorNumerosRomanosTestes"]:::test
        TestFixtures["Teste.cs (Test Fixtures)"]:::test
    end

    %% Client Code
    ClientCode["Client Code\n(Hypothetical Host)"]

    %% Connections
    Solution --> CoreLibrary
    Solution --> TestSuite

    ClientCode -->|"string input"| Parser
    Parser -->|"List<Token>"| Validator
    Parser -->|"List<Token>"| Converter
    Converter -->|"int result"| ClientCode

    TestFixtures -->|"exercises"| Parser
    TestFixtures -->|"exercises"| Validator
    TestFixtures -->|"exercises"| Converter

    %% Click Events
    click Solution "https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos/blob/master/InterpretadorNumerosRomanos.sln"
    click CoreLibrary "https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos/blob/master/InterpretadorNumerosRomanos/InterpretadorNumerosRomanos.csproj"
    click Parser "https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos/blob/master/InterpretadorNumerosRomanos/Interpretador.cs"
    click TestSuite "https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos/blob/master/InterpretadorNumerosRomanosTestes/InterpretadorNumerosRomanosTestes.csproj"
    click TestFixtures "https://github.com/tiagotakahashi/tdd_interpretadornumerosromanos/blob/master/InterpretadorNumerosRomanosTestes/Teste.cs"

    %% Styles
    classDef prod fill:#ADD8E6,stroke:#333,stroke-width:1px;
    classDef test fill:#90EE90,stroke:#333,stroke-width:1px;
```
