tawasuyu

tawasuyu/nakui

> Excel-style reactive engine, on solid principles — exact Decimal, topological cascade, WAL, time-travel — in Rust, with a Llimphi UI.

⎇ main README.md Markdown · 60 lines · 3.3 KB History raw

feat: nakui standalone — front-door ERP/Hoja/Grafo sobre Llimphi 7041e0499 · Sergio ·

1# nakui
2
3> Excel-style reactive engine, on solid principles — exact `Decimal`, topological cascade, WAL, time-travel — in Rust, with a [Llimphi](https://github.com/tawasuyu/llimphi) UI.
4
5`nakui` is a spreadsheet with a head: exact `Decimal` (not `f64`), topological-order cascade, WAL before applying, atomic invariants, and time-travel via immutable history. Three views over the same token graph — **matrix** (classic Excel), **graph** (dependency DAG) and **form** (single record) — guided by the schema's `view_hint`. Long-term it is a **DAG token engine**, foundation for verticals (Fintech, IAM, Logistics, MedTech).
6
7<p align="center">
8  <img src="docs/nakui_showreel.gif" alt="nakui showreel — a live spreadsheet with computed formulas, an ERP dashboard of stat cards and charts, and a dependency graph view" width="900">
9  <br>
10  <sub>one shell, three views — live spreadsheet (yupay formulas) · ERP dashboard · dependency graph</sub>
11</p>
12
13## Run
14
15```sh
16cargo run --release -p nakui-ui-llimphi        # the ERP/sheet/graph shell
17cargo run --release -p nakui-sheet-llimphi     # the matrix (spreadsheet) view
18cargo run --release -p nakui-explorer-llimphi  # the token-graph / event-log explorer
19```
20
21## Install
22
23```sh
24cargo build --release
25# binaries land in target/release/
26```
27
28- **Linux / macOS / Windows** — Llimphi UI.
29- **Wawa** — `nakui-core` and `nakui-sheet-nakuicore` compile to WASM.
30- Local persistence with WAL in `$XDG_DATA_HOME/nakui/`.
31
32## Crates
33
34| Crate | Role |
35|---|---|
36| `nakui-core` | Engine: tokens, schema, DAG, cascade, WAL; Rhai executor + optional SurrealDB. |
37| `nakui-backend` | GUI-agnostic backend: MemoryStore + EventLog + executors, WAL/snapshot recovery. |
38| `nakui-sheet` | Matrix view: ranges, cells, formulas, pivot engine. |
39| `nakui-sheet-nakuicore` | `nakui-sheet` ↔ `nakui-core` event-log bridge. |
40| `nakui-sheet-llimphi` | Matrix (spreadsheet) UI on Llimphi. |
41| `nakui-ui-llimphi` | UI shell — view selector, sidebar, the four meta-views. |
42| `nakui-explorer-llimphi` | Token-graph / event-log explorer. |
43| `yupay-core` | Excel-style formula engine: lex / parse / eval, bilingual (es/qu/en). |
44| `yupay-fns` | Function catalog (SUMA, BUSCARV, SI…) over `yupay-core`. |
45
46Production modules live in `01_yachay/nakui/modules/` — `crm`, `inventory`, `sales`, `treasury`: Nickel schema (`schema.ncl`) + Rhai morphisms, executed by the `nakui-core` executor kernel.
47
48## How dependencies work
49
50nakui is a full app: its UI integrates the meta-runtime, panels and content-addressed sources. Llimphi and every foundational dependency are pulled as **git dependencies** from the [`tawasuyu`](https://github.com/tawasuyu/tawasuyu) monorepo — the suite's source of truth. The engine crates (`nakui-core`, `nakui-sheet`, `yupay-core`, `yupay-fns`) are pure compute; only the `*-llimphi` crates pull the GPU UI stack.
51
52## Considerations
53
54- **No `f64`.** Exact `Decimal` throughout the engine; numeric format lives in the view, not the data.
55- **WAL before mutate.** Every operation goes through the log; in-memory data only changes once the WAL is synced.
56- **Not Excel.** No formula compatibility with XLSX; forms and the graph are first-class, not addons.
57
58## License
59
60MIT. Builds on [Llimphi](https://github.com/tawasuyu/llimphi) and the [tawasuyu](https://github.com/tawasuyu/tawasuyu) suite.

README.md

nakui

Excel-style reactive engine, on solid principles — exact Decimal, topological cascade, WAL, time-travel — in Rust, with a Llimphi UI.

nakui is a spreadsheet with a head: exact Decimal (not f64), topological-order cascade, WAL before applying, atomic invariants, and time-travel via immutable history. Three views over the same token graph — matrix (classic Excel), graph (dependency DAG) and form (single record) — guided by the schema's view_hint. Long-term it is a DAG token engine, foundation for verticals (Fintech, IAM, Logistics, MedTech).

<p align="center"> <img src="docs/nakui_showreel.gif" alt="nakui showreel — a live spreadsheet with computed formulas, an ERP dashboard of stat cards and charts, and a dependency graph view" width="900"> <br> <sub>one shell, three views — live spreadsheet (yupay formulas) · ERP dashboard · dependency graph</sub> </p>

Run

cargo run --release -p nakui-ui-llimphi        # the ERP/sheet/graph shell
cargo run --release -p nakui-sheet-llimphi     # the matrix (spreadsheet) view
cargo run --release -p nakui-explorer-llimphi  # the token-graph / event-log explorer

Install

cargo build --release
# binaries land in target/release/

Crates

CrateRole
nakui-coreEngine: tokens, schema, DAG, cascade, WAL; Rhai executor + optional SurrealDB.
nakui-backendGUI-agnostic backend: MemoryStore + EventLog + executors, WAL/snapshot recovery.
nakui-sheetMatrix view: ranges, cells, formulas, pivot engine.
nakui-sheet-nakuicorenakui-sheet ↔ nakui-core event-log bridge.
nakui-sheet-llimphiMatrix (spreadsheet) UI on Llimphi.
nakui-ui-llimphiUI shell — view selector, sidebar, the four meta-views.
nakui-explorer-llimphiToken-graph / event-log explorer.
yupay-coreExcel-style formula engine: lex / parse / eval, bilingual (es/qu/en).
yupay-fnsFunction catalog (SUMA, BUSCARV, SI…) over yupay-core.

Production modules live in 01_yachay/nakui/modules/ — crm, inventory, sales, treasury: Nickel schema (schema.ncl) + Rhai morphisms, executed by the nakui-core executor kernel.

How dependencies work

nakui is a full app: its UI integrates the meta-runtime, panels and content-addressed sources. Llimphi and every foundational dependency are pulled as git dependencies from the tawasuyu monorepo — the suite's source of truth. The engine crates (nakui-core, nakui-sheet, yupay-core, yupay-fns) are pure compute; only the *-llimphi crates pull the GPU UI stack.

Considerations

License

MIT. Builds on Llimphi and the tawasuyu suite.