How storytold/gridcraft works
GridCraft is a cross-platform spreadsheet application, with native desktop and browser shells plus headless CLI and agent interfaces. Users open or create workbooks, edit and analyze sheets through a shared command/session engine, recalculate formulas, and save or export results. The map preserves documented capabilities such as charts, pivots, printing, and workbook compatibility, while showing only relationships evidenced by the README or supplied source index/excerpts; unsampled subsystem links are omitted where their callers are not established.
Main entry points: lib.rs Session Engine · web.rs Browser Shell · workbook.rs Workbook Model · app.rs Spreadsheet UI
Components 22
User Interfaces
- Desktop Shell
apps/gridcraft/src/main.rs - Browser Shell
apps/gridcraft-web/src/web.rs - Spreadsheet UI
crates/ui-egui/src/app.rs - Browser Preferences
apps/gridcraft-web/src/prefs.rs
Workbook Operations
- Workbook Commands
crates/engine/src/cmd.rs - Session Engine
crates/engine/src/lib.rs - Workbook Model
crates/model/src/workbook.rs - Chart Rendering
crates/chart/src/render.rs - Pivot Tables
crates/engine/src/pivot/compute.rs
Spreadsheet Computation
- Formula Parser
crates/formula/src/parser.rs - Recalculation
crates/calc/src/recalc.rs - Worksheet Functions
crates/functions/src/lib.rs - Number Formatting
crates/numfmt/src/decimal.rs
Files and Output
- Workbook Formats
crates/xlsx/src/sheet_read.rs - File Operations
crates/engine/src/io.rs - PDF Output
crates/pdf/src/lib.rs
Automation Interfaces
- Headless CLI
apps/gridcraft-cli/src/main.rs - JSON Control
apps/gridcraft/src/control_server.rs - MCP Server
crates/mcp/src/server.rs
Other components
- Spreadsheet User
- Browser Host
- Workbook Files
Connections 22
- Spreadsheet User → Desktop Shell: launches
- Spreadsheet User → Browser Shell: opens
- Desktop Shell → Spreadsheet UI: starts
apps/gridcraft/src/main.rs - Browser Shell → Spreadsheet UI: runs
- Spreadsheet UI → Workbook Commands: dispatches
- Workbook Commands → Session Engine: executes
- Session Engine → Workbook Model: updates
- Workbook Model → Formula Parser: stores formulas
- Session Engine → Recalculation: recalculates
- Recalculation → Worksheet Functions: evaluates
- Workbook Model → Number Formatting: formats values
- Session Engine → Chart Rendering: renders charts
- Session Engine → Pivot Tables: computes pivots
- Session Engine → File Operations: handles files
- File Operations → Workbook Formats: reads and writes
- Session Engine → PDF Output: exports PDF
- Workbook Files → File Operations: opened or saved
- Headless CLI → Session Engine: runs headless
- JSON Control → Session Engine: controls
- MCP Server → Session Engine: dispatches tools
- Browser Shell → Browser Preferences: stores preferences
apps/gridcraft-web/src/main.rs - Browser Host → Browser Shell: hosts