# anuruddha-thennakoon/auditor architecture

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

- Interactive diagram: https://gitdiagram.com/anuruddha-thennakoon/auditor
- Repository: https://github.com/anuruddha-thennakoon/auditor

## Overview

##### Main Components

a. User Interface Layer
- Two main forms (Form.java and Main.java)

b. Report Generation Layer
- JasperReports engine as a central component
- Three report templates:
- Trial Balance
- Profit & Loss
- Balance Sheet
- Use a yellow rectangle to represent the reporting engine
- Use green documents to represent report templates

c. Dependencies Layer
- External libraries into functional categories:
- JasperReports Core (jasperreports-5.5.0.jar)
- Apache Commons Components (commons-*)
- Groovy Runtime (groovy-all-2.0.1.jar)
- Use rounded rectangles in gray to represent external dependencies

##### Component Relationships

- User Interface → Report Generation (action flow)
- Report Templates → JasperReports Engine (template usage)
- External Libraries → JasperReports Engine (dependencies)
- JasperReports Engine → User Interface (report output)

##### Specific Implementation Details

Technical aspects:
- File paths configuration for report templates
- Report format types (JRXML source files and compiled JASPER files)
- Input/Output flow for financial data processing

##### Additional Elements

- File type indicators (JRXML, JASPER)

##### Important Notes

- A note about the configuration requirements:
- Report path variables
- Library dependencies
- Build requirements

- Rectangles: Main components
- Labels: Clear, concise component names
- Groups: Logical grouping of related components

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef ui fill:#e1f5fe,stroke:#01579b
    classDef report fill:#fff9c4,stroke:#f57f17
    classDef template fill:#c8e6c9,stroke:#2e7d32
    classDef dependency fill:#f5f5f5,stroke:#616161
    classDef config fill:#fce4ec,stroke:#880e4f

    %% User Interface Layer
    subgraph UI
        MainForm["Main Form"]:::ui
        Form["Report Form"]:::ui
    end
    click MainForm "https://github.com/anuruddha-thennakoon/auditor/blob/master/src/views/Main.java"
    click Form "https://github.com/anuruddha-thennakoon/auditor/blob/master/src/views/Form.java"

    %% Report Generation Layer
    JREngine["JasperReports Engine"]:::report

    %% Report Templates
    subgraph Templates
        TB["Trial Balance Template"]:::template
        PL["Profit & Loss Template"]:::template
        BS["Balance Sheet Template"]:::template
    end
    click TB "https://github.com/anuruddha-thennakoon/auditor/blob/master/reports/trial_balance.jrxml"
    click PL "https://github.com/anuruddha-thennakoon/auditor/blob/master/reports/profit_loss.jrxml"
    click BS "https://github.com/anuruddha-thennakoon/auditor/blob/master/reports/balance_sheet.jasper"

    %% Dependencies Layer
    subgraph Dependencies
        JRC["JasperReports Core"]:::dependency
        subgraph Apache
            CB["Commons BeanUtils"]:::dependency
            CC["Commons Collections"]:::dependency
            CD["Commons Digester"]:::dependency
            CJ["Commons JavaFlow"]:::dependency
            CL["Commons Logging"]:::dependency
        end
        Groovy["Groovy Runtime"]:::dependency
    end
    click JRC "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/jasperreports-5.5.0.jar"
    click CB "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/commons-beanutils-1.8.2.jar"
    click CC "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/commons-collections-3.2.1.jar"
    click CD "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/commons-digester-2.1.jar"
    click CJ "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/commons-javaflow-20060411.jar"
    click CL "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/commons-logging-1.1.jar"
    click Groovy "https://github.com/anuruddha-thennakoon/auditor/blob/master/lib/groovy-all-2.0.1.jar"

    %% Build Configuration
    BuildConfig["Build Configuration"]:::config
    click BuildConfig "https://github.com/anuruddha-thennakoon/auditor/blob/master/auditor-app/build.xml"

    %% Relationships
    MainForm --> Form
    Form --> JREngine
    TB & PL & BS --> JREngine
    JREngine --> Form
    JRC & Apache & Groovy --> JREngine
    BuildConfig -.-> JREngine

    %% Legend
    subgraph Legend
        UI_L["UI Component"]:::ui
        Report_L["Report Engine"]:::report
        Template_L["Report Template"]:::template
        Dep_L["Dependency"]:::dependency
        Config_L["Configuration"]:::config
    end
```
