# ampedeath/devcalc architecture

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

- Interactive diagram: https://gitdiagram.com/ampedeath/devcalc
- Repository: https://github.com/ampedeath/devcalc

## Overview

##### Project type and purpose
- DevCalc is a static, client-side, single-page web application (no backend services) whose purpose is to perform arithmetic and base-conversion operations across binary, octal, decimal, and hexadecimal systems. It uses HTML, CSS (including Bootstrap), and JavaScript.

##### File structure
- Top level
- index.html – the entry point and UI shell
- README.md – project overview and tech stack
- .gitignore
- CSS/
- reset.css – browser reset rules
- standard.css – project-wide base styles
- styles.css – component-specific or override styles
- JS/
- app.js – core calculation and conversion logic
- script.js – UI event handlers, DOM interaction, and wiring to app.js

##### README
- Confirms client-side only architecture
- Mentions use of Bootstrap for responsive design
- Describes four numeral systems and basic operations

##### Main components
a. Client Browser (User Interface)
- index.html: lays out the calculator UI
- Bootstrap CSS/JS (external library) for responsive grid and components
- Custom CSS modules (reset, standard, styles)
b. JavaScript Logic
- script.js: captures user input, invokes conversion and arithmetic operations
- app.js: implements base conversion algorithms and math functions
c. Data Flow & Interactions
1. User clicks buttons or enters numbers on the UI
2. script.js handles DOM events and passes inputs to app.js
3. app.js returns computed results or converted values
4. script.js updates the DOM with results
d. External Dependencies
- Bootstrap (CSS and optional JS)
- No backend or external API calls

##### Architectural patterns and principles
- Separation of concerns:
- HTML for structure,
- CSS for presentation,
- JS for behavior and business logic
- Modular JS: app.js (pure logic) vs. script.js (UI glue)
- Static asset organization: CSS/, JS/, IMG/

## Diagram (Mermaid)

```mermaid
flowchart TB
    User["User"]:::user
    BrowserUI["index.html<br>Browser UI"]:::ui

    subgraph "UI Styles"
        Reset["reset.css"]:::css
        Base["standard.css"]:::css
        Overrides["styles.css"]:::css
        Bootstrap["Bootstrap CSS/JS"]:::ext
    end

    IMG["IMG Assets"]:::asset

    subgraph "Logic Modules"
        Script["script.js<br>Event Handlers"]:::js
        App["app.js<br>Conversion & Math Engine"]:::js
    end

    Doc["README.md<br>Project Overview"]:::doc

    User --> BrowserUI
    BrowserUI --> Reset
    BrowserUI --> Base
    BrowserUI --> Overrides
    BrowserUI --> Bootstrap
    BrowserUI --> IMG
    BrowserUI --> Script
    Script --> App
    App --> Script
    Script --> BrowserUI

    click BrowserUI "https://github.com/ampedeath/devcalc/blob/main/index.html"
    click Reset "https://github.com/ampedeath/devcalc/blob/main/CSS/reset.css"
    click Base "https://github.com/ampedeath/devcalc/blob/main/CSS/standard.css"
    click Overrides "https://github.com/ampedeath/devcalc/blob/main/CSS/styles.css"
    click IMG "https://github.com/ampedeath/devcalc/tree/main/IMG/"
    click Script "https://github.com/ampedeath/devcalc/blob/main/JS/script.js"
    click App "https://github.com/ampedeath/devcalc/blob/main/JS/app.js"
    click Doc "https://github.com/ampedeath/devcalc/blob/main/README.md"

    classDef user fill:#f9f,stroke:#333,stroke-width:1px
    classDef ui fill:#cfc,stroke:#333,stroke-width:1px
    classDef css fill:#ccf,stroke:#333,stroke-width:1px
    classDef js fill:#fcf,stroke:#333,stroke-width:1px
    classDef asset fill:#ffc,stroke:#333,stroke-width:1px
    classDef ext fill:#cff,stroke:#333,stroke-width:1px
    classDef doc fill:#eee,stroke:#333,stroke-width:1px
```
