# yibie/grid-table architecture

> Architecture diagram of the GitHub repository yibie/grid-table, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yibie/grid-table
- Repository: https://github.com/yibie/grid-table

## Overview

grid-table is an Emacs table system for creating, editing, calculating, visualizing, and exchanging table data. The main user workflow is to create or open a table, edit and navigate cells, use formulas or charts, and save or export it. Separate capabilities include merged cells, rich-text and image rendering, and Org/Markdown previews. The tree identifies the relevant modules, but no source excerpts were provided, so internal call relationships cannot be verified; the graph only shows README-documented user actions and module loading.

Main entry points: [`grid-table.el`](https://github.com/yibie/grid-table/blob/main/grid-table.el) (Table commands), [`grid-table-calc.el`](https://github.com/yibie/grid-table/blob/main/grid-table-calc.el) (Formula calculation), [`grid-table-chart.el`](https://github.com/yibie/grid-table/blob/main/grid-table-chart.el) (Chart rendering), [`grid-table-plugins.el`](https://github.com/yibie/grid-table/blob/main/grid-table-plugins.el) (Plugin system)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Table Core"]
  node_table["Table commands<br/>[grid-table.el]"]
  node_api["Table API<br/>[grid-table-api.el]"]
  node_model["Data model<br/>[grid-data-model.el]"]
  node_parser["Table parser"]
  node_persistence["Table persistence"]
end

subgraph group_presentation["Rendering &amp; Navigation"]
  node_navigation["Cell navigation<br/>[grid-table-nav.el]"]
  node_render["Table rendering<br/>[grid-table.el]"]
end

subgraph group_calculation["Calculation &amp; Charts"]
  node_calculator["Formula calculation<br/>[grid-table-calc.el]"]
  node_chart["Chart rendering"]
end

subgraph group_integration["Data &amp; Plugins"]
  node_data["Data sources"]
  node_plugin_system["Plugin system"]
  node_csv["CSV integration<br/>[grid-table-csv.el]"]
  node_markdown["Markdown integration"]
  node_org["Org integration<br/>[grid-table-org.el]"]
  node_rst["reStructuredText integration<br/>[grid-table-rst.el]"]
end

node_user(("Emacs user"))

node_user -->|"creates or opens"| node_table
node_user -->|"edits and navigates"| node_table
node_user -->|"saves tables"| node_table
node_user -->|"uses formulas"| node_calculator
node_user -->|"uses chart functions"| node_chart
node_user -->|"loads plugin system"| node_plugin_system
node_user -->|"loads CSV support"| node_csv
node_user -->|"loads Markdown support"| node_markdown
node_user -->|"loads Org support"| node_org

click node_table "https://github.com/yibie/grid-table/blob/main/grid-table.el"
click node_api "https://github.com/yibie/grid-table/blob/main/grid-table-api.el"
click node_model "https://github.com/yibie/grid-table/blob/main/grid-data-model.el"
click node_parser "https://github.com/yibie/grid-table/blob/main/grid-table-parser.el"
click node_navigation "https://github.com/yibie/grid-table/blob/main/grid-table-nav.el"
click node_render "https://github.com/yibie/grid-table/blob/main/grid-table.el"
click node_calculator "https://github.com/yibie/grid-table/blob/main/grid-table-calc.el"
click node_chart "https://github.com/yibie/grid-table/blob/main/grid-table-chart.el"
click node_persistence "https://github.com/yibie/grid-table/blob/main/grid-table-persistence.el"
click node_data "https://github.com/yibie/grid-table/blob/main/grid-data-source.el"
click node_plugin_system "https://github.com/yibie/grid-table/blob/main/grid-table-plugins.el"
click node_csv "https://github.com/yibie/grid-table/blob/main/plugins/grid-table-csv.el"
click node_markdown "https://github.com/yibie/grid-table/blob/main/plugins/grid-table-markdown.el"
click node_org "https://github.com/yibie/grid-table/blob/main/plugins/grid-table-org.el"
click node_rst "https://github.com/yibie/grid-table/blob/main/plugins/grid-table-rst.el"

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_table,node_api,node_model,node_parser,node_persistence,node_user toneBlue
class node_navigation,node_render toneAmber
class node_calculator,node_chart toneMint
class node_data,node_plugin_system,node_csv,node_markdown,node_org,node_rst toneRose
```

## Components

### Table Core

- [Table commands](https://github.com/yibie/grid-table/blob/main/grid-table.el): `grid-table.el`
- [Table API](https://github.com/yibie/grid-table/blob/main/grid-table-api.el): `grid-table-api.el`
- [Data model](https://github.com/yibie/grid-table/blob/main/grid-data-model.el): `grid-data-model.el`
- [Table parser](https://github.com/yibie/grid-table/blob/main/grid-table-parser.el): `grid-table-parser.el`
- [Table persistence](https://github.com/yibie/grid-table/blob/main/grid-table-persistence.el): `grid-table-persistence.el`

### Rendering & Navigation

- [Cell navigation](https://github.com/yibie/grid-table/blob/main/grid-table-nav.el): `grid-table-nav.el`
- [Table rendering](https://github.com/yibie/grid-table/blob/main/grid-table.el): `grid-table.el`

### Calculation & Charts

- [Formula calculation](https://github.com/yibie/grid-table/blob/main/grid-table-calc.el): `grid-table-calc.el`
- [Chart rendering](https://github.com/yibie/grid-table/blob/main/grid-table-chart.el): `grid-table-chart.el`

### Data & Plugins

- [Data sources](https://github.com/yibie/grid-table/blob/main/grid-data-source.el): `grid-data-source.el`
- [Plugin system](https://github.com/yibie/grid-table/blob/main/grid-table-plugins.el): `grid-table-plugins.el`
- [CSV integration](https://github.com/yibie/grid-table/blob/main/plugins/grid-table-csv.el): `plugins/grid-table-csv.el`
- [Markdown integration](https://github.com/yibie/grid-table/blob/main/plugins/grid-table-markdown.el): `plugins/grid-table-markdown.el`
- [Org integration](https://github.com/yibie/grid-table/blob/main/plugins/grid-table-org.el): `plugins/grid-table-org.el`
- [reStructuredText integration](https://github.com/yibie/grid-table/blob/main/plugins/grid-table-rst.el): `plugins/grid-table-rst.el`

### Other components

- **Emacs user**

## Connections

- Emacs user → Table commands: creates or opens (evidence: `README.md`)
- Emacs user → Table commands: edits and navigates (evidence: `README.md`)
- Emacs user → Table commands: saves tables (evidence: `README.md`)
- Emacs user → Formula calculation: uses formulas (evidence: `README.md`)
- Emacs user → Chart rendering: uses chart functions (evidence: `README.md`)
- Emacs user → Plugin system: loads plugin system (evidence: `README.md`)
- Emacs user → CSV integration: loads CSV support (evidence: `README.md`)
- Emacs user → Markdown integration: loads Markdown support (evidence: `README.md`)
- Emacs user → Org integration: loads Org support (evidence: `README.md`)
