No description
  • TypeScript 71.5%
  • JavaScript 27.2%
  • Shell 1%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
artcraft feed bot 8ccb55f526
All checks were successful
Publish / dev-image (push) Successful in 1s
Publish / sidecar-smoke (push) Successful in 6s
Publish / test (push) Successful in 37s
Publish / pack-and-publish (push) Successful in 5s
Feed: new upstream app builds (channel latest).
2026-12-01 05:17:26 +00:00
.forgejo Smoke harness on Playwright 1.65.0. Release 0.5.1. 2026-11-10 12:19:41 +01:00
.githooks Scaffold the artcraft plugin pack. 2026-11-04 03:22:04 +01:00
assets B4b: pinned storytold web builds, header rules, signed feed CI. 2026-11-04 10:16:25 +01:00
client Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
feed Feed: new upstream app builds (channel latest). 2026-12-01 05:17:26 +00:00
locales The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
shim Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
templates DeckCraft and FigCraft editors. Release 0.5.0. 2026-11-10 08:46:53 +01:00
worker Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
.env.example Scaffold the artcraft plugin pack. 2026-11-04 03:22:04 +01:00
.gitignore Scaffold the artcraft plugin pack. 2026-11-04 03:22:04 +01:00
apps.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
artcraft.plugin.json Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
artcraft.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
artcraft_block_editor.tsx B2: block/blob editor openers through the core frame editor. 2026-11-04 03:28:13 +01:00
artcraft_create_dialog.tsx Toolbar tool opens markdown images; insert SVGs as pictures. Release 0.3.3. 2026-11-06 19:52:03 +00:00
artcraft_directive.test.ts B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
artcraft_directive.ts B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
artcraft_editor_tool.tsx The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
artcraft_embed_options.test.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
artcraft_embed_options.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
artcraft_host.test.ts DeckCraft and FigCraft editors. Release 0.5.0. 2026-11-10 08:46:53 +01:00
artcraft_icon.tsx B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
block_editors.ts B2: block/blob editor openers through the core frame editor. 2026-11-04 03:28:13 +01:00
client_config.ts B2: block/blob editor openers through the core frame editor. 2026-11-04 03:28:13 +01:00
compose.dev.yml B4: managed sidecar: verified app builds, Caddy, proxy snippets, signed-feed upgrade. 2026-11-04 09:07:40 +01:00
content_types.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
create.test.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
create.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
deploy.json DeckCraft and FigCraft editors. Release 0.5.0. 2026-11-10 08:46:53 +01:00
deploy_json.test.ts Sidecar: proxy upstream published in every network mode. Release 0.3.0. 2026-11-06 10:25:57 +00:00
embed_asset_patterns.ts B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
LICENSE.md Scaffold the artcraft plugin pack. 2026-11-04 03:22:04 +01:00
limedoc.project.json Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
origin_probe.test.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
origin_probe.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
plugin.devkit.json B4b: pinned storytold web builds, header rules, signed feed CI. 2026-11-04 10:16:25 +01:00
README.md Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
request_body.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
settings_schema.ts DeckCraft and FigCraft editors. Release 0.5.0. 2026-11-10 08:46:53 +01:00
shim_bundle.test.ts Host Save for bridge apps, FilmCraft host mode, real-build smoke test. Release 0.4.0. 2026-11-10 08:46:18 +01:00
shim_bundle.ts Host Save for bridge apps, FilmCraft host mode, real-build smoke test. Release 0.4.0. 2026-11-10 08:46:18 +01:00
shim_config.test.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
shim_config.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
shim_core.test.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
shim_version.ts Host Save for bridge apps, FilmCraft host mode, real-build smoke test. Release 0.4.0. 2026-11-10 08:46:18 +01:00
state.test.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
state.ts Upstream builds of 2026-11-23/29, GridCraft export flag, DeckCraft opens .ppt, confirmed saves prepared. Release 0.8.0. 2026-11-29 19:38:43 +01:00
status_route.test.ts The origin check follows the address policy and answers with a status only; create authorizes before it reads a capped body; the pack declares its ::office options itself. Release 0.7.0. 2026-11-15 22:30:26 +01:00
syntax.test.ts B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
syntax.ts B2b: editor tool, ::artcraft directive, create dialog, office fallback. 2026-11-04 10:26:37 +01:00
tool_logic.test.ts Toolbar tool opens markdown images; insert SVGs as pictures. Release 0.3.3. 2026-11-06 19:52:03 +00:00
tool_logic.ts Toolbar tool opens markdown images; insert SVGs as pictures. Release 0.3.3. 2026-11-06 19:52:03 +00:00
zip_store.ts B6: self-hosted shim bundle download. 2026-11-04 10:37:06 +01:00

ArtCraft for Limedoc

Edit PDFs, drawings, CAD files, presentations, designs and video/effect projects in Limedoc with the ArtCraft editors (ADR 0005 in the Limedoc repo). The editors are WebAssembly apps; each runs on its own sub-domain inside a frame, behind a small relay page (the shim) that speaks Limedoc's frame editor protocol (LCX v1). Limedoc keeps the session: the editor gets file bytes, never credentials.

Status: in development (plan in the Limedoc repo, ADR 0005 §8). The pack pins the <app>-web-<version>.zip releases of github.com/storytold in worker/apps.lock.json (sha256-checked on install).

Requirements

  • Limedoc ≥ 0.76.0 (frame editors, edit sessions, project content, deploy.json commands and guided configure, runtime editor switch; the After Effects content types and project Save as from a plain file).
  • ldcmd ≥ 0.8.0 (sidecar upgrade, SIDECAR_PACK_DIR).
  • One dedicated sub-domain per app (e.g. pdfcraft.edit.example.org) with a certificate on the reverse proxy in front of Limedoc. Browser storage is per origin; use hosts that serve nothing but these editors.

Operator setup (managed sidecar)

The sidecar fetches the pinned app builds, verifies their sha256, places the shim next to each build and serves them over plain HTTP. Your reverse proxy keeps TLS and ports 80/443.

  1. ldcmd sidecar up artcraft --configure asks for the settings, explains each one and offers a default (Enter keeps it):

    Setting Default Meaning
    ARTCRAFT_APPS pdfcraft,cadcraft,vectorcraft Apps to download and serve
    ARTCRAFT_PUBLIC_HOST_PATTERN {app}.<APP_BASE_HOST> Public host per app, e.g. {app}.edit.example.org
    ARTCRAFT_PUBLIC_SCHEME / _PORT (advanced) https / 443 How browsers reach the app hosts
    ARTCRAFT_PROXY_DIR (advanced) <deploy dir>/proxy/artcraft Where the proxy snippets are written
    ARTCRAFT_TRUSTED_PROXIES (advanced) private_ranges Sources of trusted X-Forwarded-*
    ARTCRAFT_APPS_MIRROR (advanced, optional) — Download mirror (air-gapped)
    ARTCRAFT_HOST_PORT 8790 Host port the sidecar is published on (every mode)
    ARTCRAFT_PROXY_UPSTREAM by mode, see below What the generated proxy snippets forward to
    ARTCRAFT_BIND (advanced) 127.0.0.1 Host address of that port

    ARTCRAFT_BASE_URL (Limedoc → sidecar) is derived from the network mode. Change the settings later with ldcmd sidecar configure artcraft; an unattended sidecar up reports what is missing, with the same explanations.

  2. The one-shot artcraft-fetch installs what is missing (a sha256 mismatch stops here, nothing is served), then the artcraft Caddy starts.

  3. Include the generated snippet from ARTCRAFT_PROXY_DIR (default <deploy dir>/proxy/artcraft): caddy/artcraft.caddy (import) or nginx/artcraft.conf (include in http {}). Its README.md lists the hosts and the upstream. These files are rewritten from the current settings on every ldcmd sidecar up artcraft, so after ldcmd sidecar configure artcraft they match your setup. Do not add Content-Security-Policy, X-Frame-Options or Cache-Control for these hosts; the sidecar sets them.

  4. Limedoc → Settings → ArtCraft: activate the apps. Only deployed apps can be activated; the editors appear without a restart (reload open tabs).

Where the reverse proxy points

Browsers must reach every editor on its own host, so the sidecar is always reachable for your proxy, whatever Limedoc's DEPLOY_NETWORK_MODE is:

Your proxy runs … Upstream
on the host 127.0.0.1:${ARTCRAFT_HOST_PORT} (8790)
as a container on the Docker network DOCKER_NETWORK_NAME artcraft:8080
on another machine ARTCRAFT_BIND=0.0.0.0, <this host>:8790, firewalled to the proxy

ARTCRAFT_PROXY_UPSTREAM picks the one the snippets use. Its default follows the network mode (internal → artcraft:8080, external → 127.0.0.1:${ARTCRAFT_HOST_PORT}); set it when your proxy runs elsewhere. The network mode itself only decides how Limedoc reads /manifest.json (ARTCRAFT_BASE_URL, internal address, never through the proxy).

Upgrading app builds

ldcmd sidecar upgrade artcraft --check     # plan only
ldcmd sidecar upgrade artcraft             # newest tested builds
ldcmd sidecar upgrade artcraft --app pdfcraft --channel latest
ldcmd sidecar upgrade artcraft --rollback pdfcraft

Builds come from a feed signed by the pack publisher (Ed25519, key in worker/feed-keys.json); a bad signature aborts with nothing changed. A second run is a no-op, so a timer is safe. Exit codes: 0 upgraded or up to date, 2 some apps skipped (they need a newer artcraft plugin), 1 error. ldcmd sidecar up never moves an installed build; open editors keep working, new sessions get the new build. The previous build stays for --rollback.

Air-gapped: ARTCRAFT_APPS_MIRROR=https://mirror.lan/artcraft downloads <mirror>/<app>/<version>/<file>.zip instead; the sha256 pins still apply.

Self-hosted apps

When you host the app builds yourself (Settings → ArtCraft → Deployment: Self-hosted), enter each app's origin and place the shim next to the app:

  1. Download /api/plugins/artcraft/shim/<app> (admin; e.g. /api/plugins/artcraft/shim/pdfcraft). The zip holds the shim files, a limedoc-shim.json for this Limedoc instance and HEADERS.md.
  2. Unzip it next to the app's index.html.
  3. Add the headers from HEADERS.md (nginx and Caddy snippets) to the app's site. Do not add X-Frame-Options there.
  4. Use a dedicated sub-domain per app that only Limedoc uses: the shim clears the origin's browser storage when the Limedoc user changes.
  5. EffectCraft: the bundle's sw.js replaces the app's service worker (which would answer the shim page with the app's own page). Put it back after every app update.

Pinning and verifying the app builds is up to you in this mode; download the bundle again when Settings reports the shim as outdated.

Origin check

For each activated app the server asks <origin>/limedoc-shim.json and reports one of four results in the app's status (GET /api/plugins/artcraft/status, admin): OK, not reachable, not checked (address refused), or "answers, but not with the shim". The origins are free text, so the check applies Limedoc's outbound address policy: an origin that is, or resolves to, a private, loopback or link-local address is not contacted, the connection goes to the address that was checked, redirects are not followed, and the reply is limited in time and size. What the host answered is never shown; a failed check is one line in the server log.

App builds hosted on a private network are a legitimate target. Allow them in the app's environment:

ARTCRAFT_ALLOW_PRIVATE_HOSTS=true

Unset, the switch is off in production-like deployments and on in development (false turns it off there too). The check is advisory: an activated app with an origin is offered whatever the result, because browsers load the editors, not the server. The managed sidecar's /manifest.json is read from ARTCRAFT_BASE_URL (the deployment's own internal address) and is not subject to the switch.

Using the editors

  • Open: a file card's Edit (::embed, the file manager, "Open with…") opens the file in the active ArtCraft app for its type.
  • Save: in the app, with File ▸ Save (Ctrl+S); Limedoc stores what the app saves (Limedoc ≥ 0.65.0 has no Save button in the editor bar). A file opens in the app under its own name, so File ▸ Save writes it back without asking for a name (VectorCraft keeps an SVG as SVG). Closing an editor saves pending changes through the app's own File ▸ Save (bridge apps from PdfCraft 0.20, CADCraft 0.19, WordCraft 0.17, GridCraft 0.18 on; older builds ask when there are unsaved changes). Save as creates a new file next to the original (needs the right to create files in that folder); later saves overwrite that new file.
  • DeckCraft edits .deckcraft presentations; new decks start from templates/blank.deckcraft (one title slide). PowerPoint (.pptx) opens in DeckCraft only after Settings → ArtCraft → "DeckCraft: also open PowerPoint (.pptx)" (Collabora keeps it otherwise); a Save writes .pptx back. PowerPoint 97-2003 decks (.ppt, DeckCraft ≥ 0.20) open in DeckCraft too; it cannot write them, so the first Save creates <name>.deckcraft next to the .ppt (needs the right to create files in that folder) and later saves go to that file. Exports (PDF, images, GIF) run from DeckCraft's export dialog and land next to the deck. The presenter pop-out window is not available inside the frame.
  • FigCraft edits .figcraft designs (new ones from templates/blank.figcraft). It imports .fig and .sketch files, but their Save becomes a new .figcraft, so the pack does not offer it for them. Needs WebAssembly SIMD (any current browser; Safari ≥ 16.4); a crash recovery entry another session left is discarded when a Limedoc document opens.
  • CADCraft edits DXF. Its web build cannot read DWG: .dwg files keep listing and downloading, without an editor.
  • FilmCraft needs 0.18 or newer (host mode). ldcmd sidecar up artcraft moves an older installed build to the pack's baseline (the old one stays for ldcmd sidecar upgrade artcraft --rollback); until then Settings shows it as outdated and it is not offered. Video export (H.264) fails in FilmCraft's web build (0.19 to 0.21, upstream); interchange exports (EDL, XML, …) and frames work.
  • Pictures: ![](drawing.svg) shows the drawing itself (Limedoc ≥ 0.63.0); in the viewer its Edit button opens VectorCraft.
  • Toolbar tool (ArtCraft icon): with the cursor on an ::artcraft, ::office or ::embed directive, or on a markdown image ![](…) of a file an app edits, it opens that file (the pinned app, the only app, or a choice); elsewhere it opens a dialog to create a new file next to the document (PDF, DXF, SVG, DeckCraft presentation, FigCraft design, FilmCraft or EffectCraft project, from the blank templates in templates/) or embed an existing one. Images (SVG) are inserted as ![](…) by default, other files as ::embed.
  • ::artcraft <path> [app=<id>] [title="…"] [download=true] ::: renders the same file card as ::embed and pins the editor. Prefer ::embed when the document should render the same without this plugin.
  • ::office without Collabora: the pack renders ::office directives as file cards (below Collabora in the election, so Collabora wins wherever it is installed); they open in WordCraft/GridCraft (and .pptx in DeckCraft, opt-in) when those are active. The editor's options tool (wrench) edits their file and download flag; the pack declares the directive's form for it (artcraft_embed_options.ts).
  • Media from Limedoc (FilmCraft, EffectCraft): the editor shell's "Aus Limedoc einfügen" puts Limedoc files into the app (Limedoc ≥ 0.63). A save links them in the project instead of copying them; dragged-in files are uploaded next to the project (<project>.assets/). Reopening a project puts its media back into the app (EffectCraft: relinked after the open).
  • After Effects projects (.aep, .aepx; Limedoc ≥ 0.76, EffectCraft ≥ 0.24): Edit opens one in EffectCraft as a new project; the first Save creates <name>.ecproj next to it (the .aep is never written). Parts EffectCraft cannot bring over are left out (its notice says how many). Footage the .aep names by another computer's path arrives missing: put the files in with "Insert from Limedoc" and relink them in EffectCraft. An .aep inserted into an open project is imported into it.
  • PdfCraft saves (0.21): after Apply redactions the app's Save creates <name>_Redacted.pdf next to the original, which becomes the open file. After a Fill & Sign signature, Save first asks whether to lock it into the page; closing the editor before the question is answered keeps it open and says so.
  • Browser storage: media from Limedoc open in FilmCraft from memory (no copy in the browser); FilmCraft still autosaves a recovery snapshot, and closing after a confirmed save, with nothing changed since, clears the origin's storage. EffectCraft clears its project store on close. When the Limedoc user changes, the shim clears the origin's storage before the app starts.

Maintainers: app updates

The daily feed-update.yml adds new upstream releases to feed/apps.feed.json as latest. Before promoting a build to tested (what ldcmd sidecar upgrade artcraft installs), run the real-build smoke test, locally or with the manual workflow "Shim smoke":

deno run -A worker/testing/shim_smoke.ts filmcraft@0.19.0   # Chromium via Playwright
deno run -A worker/feed_update.ts --promote filmcraft@0.19.0 --write

It serves the build with the shim, plays Limedoc's frame editor in a second origin and drives the app through its own window.<app> API: open, edit, dirty, the app's Save, Save As, exports, a refused save, storage hygiene and close (scenarios in worker/testing/shim_smoke_scenarios.ts). Move the lock baseline (worker/apps.lock.json) only to tested builds; a build the shim cannot drive any more needs minVersion in apps.ts.

License

FSL-1.1-ALv2 (see LICENSE.md).