iterate.com / docs

git clone https://git.iterate.com/repos/docs

docs / README.mdmain at 8463f41

# docs

The Docs app of a mind, on `docs.<domain>` for members: the files of the mind's repos, written
together in a browser. The bar's switcher at the top chooses the repo. Several people type in one
file at once, comment on its text, and what they type is saved as commits to that repo.

- `app.ts` serves the page. `config/worker.ts` mounts it: `docsApp({ icon })`.
- `public/app.js` is the page. Everything it draws is a component of `@iterate-com/ui`, loaded
  through the import map in `index.html`.
- `processors/` holds the two Durable Object classes that keep an open doc
  (`processors/classes.ts` says how). The page starts them from THIS repo's files when a doc first
  opens, with the three packages that `package.json` lists (`yjs`, `diff`, `node-diff3`). The
  mind's worker never loads them, so a package that cannot be fetched breaks Docs alone.
  `main` in `package.json` names their module: the loader asks every source for an entry.
- The Tasks app's task sheet edits a task's file with the same editor and the same processors
  (`processorsAnswer` in `app.ts`), so a file that is open in both is one doc.
- `notes.ts`: `docs.<domain>/notes/<name>.html` answers the mind's file of that path inline,
  fenced so that it cannot act as the member.

Check it with `pnpm install`, `pnpm typecheck` and `pnpm test`, with `stdlib` and `kernel` in the
folders beside this one.