Grida I/O — `.grida` Format & Loading (TS side)
Format Overview
Grida uses FlatBuffers as the canonical binary format. File identifier: "GRID".
Two on-disk variants:
| Variant | Detection | Notes |
| --------------- | --------------------- | ---------------------------------------------- |
| Raw FlatBuffers | "GRID" at bytes 4–7 | Bare document, no images |
| ZIP archive | ZIP magic bytes | manifest.json + document.grida + images/ |
Document model: Flat node repository (not nested). Nodes reference parents via ID + fractional-index position strings. Multi-scene: each Figma page → a SceneNode.
Key Locations
| Path | Role |
| --------------------------------------- | -------------------------------------------------------- |
| packages/grida-canvas-schema/grida.ts | TS runtime types (grida namespace) + SCHEMA_VERSION |
| packages/grida-canvas-io/ | TS file loading, archive pack/unpack, clipboard protocol |
| packages/grida-format/src/ | FROZEN flatc TS bindings (tombstone — see below) |
The schema source of truth and the Rust decoder live in the engine repo: