# monametsi-s/mybudgetapp architecture

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

- Interactive diagram: https://gitdiagram.com/monametsi-s/mybudgetapp
- Repository: https://github.com/monametsi-s/mybudgetapp

## Overview

##### Project type and purpose
- This is a single-page, client-side web application (“Budget App”) built purely with static assets (HTML, CSS, JS).
- It lives entirely in the browser—there is no server-side component or remote database.

##### File structure
- Top-level files:
- index.html – the entry point and main UI scaffolding
- css/style.css – all styling rules
- js/script.js, js/script1.js – application logic (input handling, balance calculations, DOM updates)
- No backend, build scripts, or configuration beyond a .gitignore and optional VSCode settings.

##### README for additional insights
- Confirms core features: add income/expenses, calculate balance, simple UI.
- No mention of persistence beyond in-memory/browser session.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Actors
    User(("User")):::actor

    %% Browser container
    subgraph "Browser / Client"
        direction TB
        %% UI Layer
        subgraph "UI Layer"
            direction TB
            UI_HTML["index.html"]:::ui
            UI_CSS["style.css"]:::ui
        end

        %% Logic Layer
        subgraph "Logic Layer"
            direction TB
            FormHandler["Form Handler"]:::logic
            Renderer["Transaction List Renderer"]:::logic
            Calculator["Balance Calculator"]:::logic
            JS1["js/script.js"]:::logic
            JS2["js/script1.js"]:::logic
        end

        %% Data Store
        DataStore["Data Store\n(in-memory / localStorage)"]:::data
    end

    %% Relationships
    User -->|"inputs form"| UI_HTML
    UI_HTML -->|"onSubmit / onClick"| FormHandler
    FormHandler -->|"write transaction"| DataStore
    DataStore -->|"read transactions"| Renderer
    DataStore -->|"read balance"| Calculator
    Renderer -->|"update DOM"| UI_HTML
    Calculator -->|"update DOM"| UI_HTML
    UI_HTML -->|"triggers logic"| JS1
    UI_HTML -->|"triggers logic"| JS2
    JS1 -->|"manages data"| DataStore
    JS2 -->|"manages data"| DataStore

    %% Click Events
    click UI_HTML "https://github.com/monametsi-s/mybudgetapp/blob/main/index.html"
    click UI_CSS "https://github.com/monametsi-s/mybudgetapp/blob/main/css/style.css"
    click JS1 "https://github.com/monametsi-s/mybudgetapp/blob/main/js/script.js"
    click JS2 "https://github.com/monametsi-s/mybudgetapp/blob/main/js/script1.js"
    click DataStore "https://github.com/monametsi-s/mybudgetapp/blob/main/js/script.js"
    click DataStore "https://github.com/monametsi-s/mybudgetapp/blob/main/js/script1.js"

    %% Styles
    classDef actor fill:#CCCCCC,stroke:#000,stroke-width:1px;
    classDef ui fill:#D0E6FF,stroke:#333,stroke-width:1px;
    classDef logic fill:#DFF2BF,stroke:#333,stroke-width:1px;
    classDef data fill:#FFF2B2,stroke:#333,stroke-width:1px;
```
