# jceronch1/hoja-de-calculo architecture

> Architecture diagram of the GitHub repository jceronch1/hoja-de-calculo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jceronch1/hoja-de-calculo
- Repository: https://github.com/jceronch1/hoja-de-calculo

## Overview

Hoja de cálculo is an offline Spanish-language spreadsheet for browsers and Android. Users edit a workbook, calculate formulas, manipulate and format data, visualize ranges with charts, and open or export files. The Android app hosts the web experience in a WebView. The graph preserves the README’s major capabilities; several relationships are documented at product level or only partially visible in sampled source, so uncertain links are omitted or marked dashed.

Main entry points: [`js/formula/eval.js`](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/eval.js) (Formula evaluator), [`js/ui/app.js`](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/app.js) (App controller), [`js/model/workbook.js`](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/model/workbook.js) (Workbook model), [`index.html`](https://github.com/jceronch1/hoja-de-calculo/blob/main/index.html) (Browser app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Clients and interface"]
  node_android["Android host<br/>[MainActivity.java]"]
  node_web["Browser app<br/>[index.html]"]
  node_controller["App controller<br/>[app.js]"]
  node_grid["Sheet grid<br/>[grid.js]"]
  node_editor["Cell editor<br/>[editor.js]"]
  node_commands["Menus and dialogs<br/>[dialogs.js]"]
  node_chrome["App chrome<br/>[chrome.js]"]
end

subgraph group_workbook["Workbook and formulas"]
  node_workbookmodel["Workbook model<br/>[workbook.js]"]
  node_operations["Range operations<br/>[ops.js]"]
  node_formulaeval["Formula evaluator<br/>[eval.js]"]
  node_formulasyntax["Formula syntax<br/>[syntax.js]"]
  node_mathfunctions["Math functions<br/>[fn-math.js]"]
  node_lookupfunctions["Lookup functions<br/>[fn-lookup.js]"]
  node_statfunctions["Statistical functions<br/>[fn-stats.js]"]
  node_functionfamilies["Other functions"]
  node_numberformats["Number formats<br/>[numfmt.js]"]
end

subgraph group_visual["Data and charts"]
  node_chartdata["Chart management<br/>[charts.js]"]
  node_chartrender["SVG rendering<br/>[render.js]"]
end

subgraph group_files["Files and output"]
  node_filehandling["File handling<br/>[files.js]"]
  node_xlsx["XLSX reader/writer<br/>[xlsx.js]"]
end

node_user(("Spreadsheet user"))

node_user -->|"opens app"| node_android
node_user -->|"opens workbook"| node_web
node_android -->|"loads page"| node_web
node_web -.->|"hosts interface"| node_controller
node_user -.->|"edits and commands"| node_controller
node_controller -.->|"updates view"| node_grid
node_controller -.->|"starts editing"| node_editor
node_controller -.->|"opens commands"| node_commands
node_controller -.->|"changes workbook"| node_workbookmodel
node_commands -.->|"applies data actions"| node_operations
node_workbookmodel -.->|"recalculates formulas"| node_formulaeval
node_formulaeval -.->|"parses formulas"| node_formulasyntax
node_formulaeval -.->|"evaluates functions"| node_mathfunctions
node_formulaeval -.->|"evaluates functions"| node_lookupfunctions
node_formulaeval -.->|"evaluates functions"| node_statfunctions
node_formulaeval -.->|"evaluates functions"| node_functionfamilies
node_workbookmodel -.->|"formats values"| node_numberformats
node_chartdata -->|"reads cell values"| node_workbookmodel
node_chartdata -->|"renders charts"| node_chartrender
node_user -->|"opens or exports"| node_filehandling
node_filehandling -.->|"reads or writes XLSX"| node_xlsx

click node_android "https://github.com/jceronch1/hoja-de-calculo/blob/main/android/src/com/hojadecalculo/android/MainActivity.java"
click node_web "https://github.com/jceronch1/hoja-de-calculo/blob/main/index.html"
click node_controller "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/app.js"
click node_grid "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/grid.js"
click node_editor "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/editor.js"
click node_commands "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/dialogs.js"
click node_chrome "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/chrome.js"
click node_workbookmodel "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/model/workbook.js"
click node_operations "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/model/ops.js"
click node_formulaeval "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/eval.js"
click node_formulasyntax "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/syntax.js"
click node_mathfunctions "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-math.js"
click node_lookupfunctions "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-lookup.js"
click node_statfunctions "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-stats.js"
click node_functionfamilies "https://github.com/jceronch1/hoja-de-calculo/tree/main/js/formula"
click node_numberformats "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/numfmt.js"
click node_chartdata "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/charts/charts.js"
click node_chartrender "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/charts/render.js"
click node_filehandling "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/io/files.js"
click node_xlsx "https://github.com/jceronch1/hoja-de-calculo/blob/main/js/io/xlsx.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_android,node_web,node_controller,node_grid,node_editor,node_commands,node_chrome,node_user toneBlue
class node_workbookmodel,node_operations,node_formulaeval,node_formulasyntax,node_mathfunctions,node_lookupfunctions,node_statfunctions,node_functionfamilies,node_numberformats toneAmber
class node_chartdata,node_chartrender toneMint
class node_filehandling,node_xlsx toneRose
```

## Components

### Clients and interface

- [Android host](https://github.com/jceronch1/hoja-de-calculo/blob/main/android/src/com/hojadecalculo/android/MainActivity.java): `android/src/com/hojadecalculo/android/MainActivity.java`
- [Browser app](https://github.com/jceronch1/hoja-de-calculo/blob/main/index.html): `index.html`
- [App controller](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/app.js): `js/ui/app.js`
- [Sheet grid](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/grid.js): `js/ui/grid.js`
- [Cell editor](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/editor.js): `js/ui/editor.js`
- [Menus and dialogs](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/dialogs.js): `js/ui/dialogs.js`
- [App chrome](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/ui/chrome.js): `js/ui/chrome.js`

### Workbook and formulas

- [Workbook model](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/model/workbook.js): `js/model/workbook.js`
- [Range operations](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/model/ops.js): `js/model/ops.js`
- [Formula evaluator](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/eval.js): `js/formula/eval.js`
- [Formula syntax](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/syntax.js): `js/formula/syntax.js`
- [Math functions](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-math.js): `js/formula/fn-math.js`
- [Lookup functions](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-lookup.js): `js/formula/fn-lookup.js`
- [Statistical functions](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/fn-stats.js): `js/formula/fn-stats.js`
- [Other functions](https://github.com/jceronch1/hoja-de-calculo/tree/main/js/formula): `js/formula`
- [Number formats](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/formula/numfmt.js): `js/formula/numfmt.js`

### Data and charts

- [Chart management](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/charts/charts.js): `js/charts/charts.js`
- [SVG rendering](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/charts/render.js): `js/charts/render.js`

### Files and output

- [File handling](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/io/files.js): `js/io/files.js`
- [XLSX reader/writer](https://github.com/jceronch1/hoja-de-calculo/blob/main/js/io/xlsx.js): `js/io/xlsx.js`

### Other components

- **Spreadsheet user**

## Connections

- Spreadsheet user → Android host: opens app (evidence: `README.md`)
- Spreadsheet user → Browser app: opens workbook (evidence: `README.md`)
- Android host → Browser app: loads page (evidence: `android/src/com/hojadecalculo/android/MainActivity.java`)
- Browser app → App controller: hosts interface
- Spreadsheet user → App controller: edits and commands
- App controller → Sheet grid: updates view
- App controller → Cell editor: starts editing
- App controller → Menus and dialogs: opens commands
- App controller → Workbook model: changes workbook
- Menus and dialogs → Range operations: applies data actions
- Workbook model → Formula evaluator: recalculates formulas
- Formula evaluator → Formula syntax: parses formulas
- Formula evaluator → Math functions: evaluates functions
- Formula evaluator → Lookup functions: evaluates functions
- Formula evaluator → Statistical functions: evaluates functions
- Formula evaluator → Other functions: evaluates functions
- Workbook model → Number formats: formats values
- Chart management → Workbook model: reads cell values (evidence: `js/charts/charts.js`)
- Chart management → SVG rendering: renders charts (evidence: `js/charts/charts.js`)
- Spreadsheet user → File handling: opens or exports (evidence: `README.md`)
- File handling → XLSX reader/writer: reads or writes XLSX
