Foldkit Plus
The demos
Each is an example from the repository, built as static files. Those with a server run it in your browser, shared by every tab, so nothing you do leaves it. Open one, follow its three steps, then read the file it names.
A blog studio and its site
Drafts beside the row, revisions, scheduled publishing and a page builder, with the public site rendered at build time.
Open the demoTry this
- As Wren, a writer, start a post. It saves as you type; a writer cannot publish.
- Switch to Edda, an editor, open it and publish it.
- View the site as a visitor: only what was published is there.
Read first: examples/cms/src/server/server.ts
Two devices, one registry
Two devices edit 10,000 products in a data grid, offline and in conflict, and agree once both are back.
Open the demoTry this
- Change a price in Device A. It shows in Device B a moment later.
- Tick “Work offline” in Device B, edit the same price in both, then untick it. The later edit wins, and the device that lost says so.
- Reload Device B while it is offline. Its edits are still waiting, and go when it is back.
Read first: examples/registry/src/domain.ts
Pages two tabs edit at once
Rich text two people edit at the same time, online or not, converging through one journal.
Open the demoTry this
- Open the page in two tabs, and make a page in one: it appears in the other.
- Type in the page from both tabs; each sees the other’s typing.
- Reload a tab: the page is read back from the journal.
Read first: examples/pages/src/app.ts
A todo list an agent can use
One application definition drives the view, the tools an agent calls, the document replicas share, and the policy the server enforces.
Open the demoTry this
- Add a todo, and open the page in a second tab: it is there.
- Open it as Bob (add ?token=bob) and tick the todo: the first tab shows it ticked.
- Reload a tab: what it shows is read back from the journal.
Read first: examples/todo-app/src/app.ts
A data grid over 100,000 rows
A grid that owns focus, selection, columns and the open editor, while the application owns every row.
Open the demoTry this
- Pick a price and press Enter to edit it; one that is not a price, like 4.999, is refused.
- Select a range with Shift and the arrow keys, and copy it into a spreadsheet.
- Open a column’s menu to pin or hide it, or drag its header to move it.
Read first: examples/data-grid/src/main.ts
This page is one too: rendered at build time with foldkit-ssr and styled with foldkit-mixins. Its source.