# ier/slovo architecture

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

- Interactive diagram: https://gitdiagram.com/ier/slovo
- Repository: https://github.com/ier/slovo

## Overview

Project Analysis:
- This is a specialized utility library written in Clojure
- Single-purpose functionality: number/money to Russian text conversion
- Simple, focused architecture typical of Clojure libraries
- Contains core functionality and tests
- Follows standard Clojure project structure (using Leiningen build tool, indicated by project.clj)

##### Main Components

a. Core Conversion Engine (src/slovo/core.clj)
- Number processing module
- Text generation module
- Russian language rules handler

b. Public API Layer
- Entry points for number conversion
- Entry points for money conversion

c. Testing Framework (test/slovo/core_test.clj)

##### Component Relationships
- Flow from input (numbers/money) through the conversion process to output (Russian text)
- Relationship between the core functionality and test components

**[Input Interface (Numbers/Money)] →**
- [Number Parser] →
- [Russian Text Generator] →
- [Grammar Rules Applier] →
- [Output Interface (Russian Text)]

**[Test Suite] ⟷ [Core Components]**

##### Important Details
- Input data types (integers, decimals, currency values)
- Text transformation stages
- Russian language rule application points
- Test coverage connections

##### Technical Specifications to Note
- Clojure-specific functional processing
- Immutable data flow
- Pure function transformations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        I1[Numbers]:::input
        I2[Money Values]:::input
    end

    subgraph "Core Processing"
        NP["Number Parser"]:::core
        RTG["Russian Text Generator"]:::core
        GRA["Grammar Rules Applier"]:::core
    end

    subgraph "Public API"
        API["Public Interface"]:::api
    end

    subgraph "Output"
        OUT["Russian Text Output"]:::output
    end

    subgraph "Testing Layer"
        TS["Test Suite"]:::test
    end

    %% Connections
    I1 --> API
    I2 --> API
    API --> NP
    NP --> RTG
    RTG --> GRA
    GRA --> OUT
    TS -.-> API
    TS -.-> NP
    TS -.-> RTG
    TS -.-> GRA

    %% Click events
    click API "https://github.com/ier/slovo/blob/main/src/slovo/core.clj"
    click NP "https://github.com/ier/slovo/blob/main/src/slovo/core.clj"
    click RTG "https://github.com/ier/slovo/blob/main/src/slovo/core.clj"
    click GRA "https://github.com/ier/slovo/blob/main/src/slovo/core.clj"
    click TS "https://github.com/ier/slovo/blob/main/test/slovo/core_test.clj"

    %% Styles
    classDef input fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#ADD8E6,stroke:#333,stroke-width:2px
    classDef api fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef output fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef test fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Input]:::input
        L2[Core Processing]:::core
        L3[API]:::api
        L4[Output]:::output
        L5[Testing]:::test
    end
```
