The way in to the media library (docs/media-library.md of the app): a web page that shows it as every installed app reads it, and the server that manages it. People sign in (Signing in), upload content by the page or by the API with a token of their own (Uploading), and a reviewer's approval writes it into the media at once (Publishing the uploads). The central library is the Worker on Cloudflare, library.slidr.workers.dev, its media at media.slidr.studio; an organization may install a library of its own on Linux, in Docker (A local library). docs/SPEC.md is what it does and why, and docs/PLAN.md how it was built.
pnpm install
pnpm dev # http://127.0.0.1:5176, with the Worker
pnpm test # the Worker's tests
pnpm build; pnpm previewpnpm dev and pnpm preview run the Worker inside Vite (@cloudflare/vite-plugin, in Cloudflare's own runtime), with the secrets of .dev.vars. Without that file the page works the same, and offers no signing in.
An organization may run a library of its own, without Cloudflare, on a Linux machine of its own (docs/SPEC.md §5): the same server the Worker runs (server/core), on Node (server/host/node), with its media in a folder of that machine's own disks. It is one Docker image, ghcr.io/slidrhq/library, with Nginx at its door (docker/), installed by a script that asks for the media folder and little else (install/install.sh). The central library, library.slidr.workers.dev, stays the Worker on Cloudflare.
On Linux (x86-64 or ARM64), with Docker Engine 24 or later and its compose plugin:
curl -fsSLO https://github.com/slidrhq/library/releases/latest/download/install.sh
curl -fsSLO https://github.com/slidrhq/library/releases/latest/download/install.sh.sha256
sha256sum -c install.sh.sha256
gh attestation verify install.sh --repo slidrhq/library # who built it (GitHub's CLI, signed in)
sudo bash install.shThe SHA-256 finds a download that went wrong; the attestation says that the repository's release built the script. It asks, and takes each answer as an option too (--help; with --yes it asks nothing):
- the media folder (
--media): a folder of this machine's own disks, empty or holding a library already. A network file system (NFS, SMB, SSHFS…) is refused, and so is a folder that holds other things; - the owner (
--owner), who signs in first, by a one-time link the script prints; - how it is reached (
--reach):local, from this machine only, over HTTP (the default);https, with a certificate and its key of this machine (--url,--tls-cert,--tls-key); orproxy, behind the organization's own HTTPS proxy (--url,--proxy <its address>, orlocalfor a proxy of this machine); - the port (
--port), 7543 unless it is taken; - the data folder (
--data),/var/lib/slidr-libraryby default; - whether to fill the media from the central library (
--seed,--seed=<address>,--no-seed).
It checks them, shows a summary, and writes nothing until it is accepted. Then: the account slidr-library of this machine, made for the library, which the container runs as; the folders, its own; /etc/slidr-library/compose.yaml and library.env (the answers, nothing secret); the master key, made in /etc/slidr-library/keys/, apart from the data folder; the library, installed and seeded in a container of its own; the service, started; and /usr/local/bin/slidr-library. A port Docker publishes passes by ufw's and firewalld's rules: the script binds it to 127.0.0.1 unless the library is to be reached from elsewhere.
Installed apps read the media at <the library's address>/media/ (docs/media-library.md of the app, "A library of your own").
A machine that does not reach the internet installs the library as well, once what it would fetch is brought to it (docs/SPEC.md §5.6).
-
The image. Each release publishes it as a file for each architecture beside
install.sh,slidr-library-<version>-linux-amd64.tar.gzandslidr-library-<version>-linux-arm64.tar.gz, and the script names each by its SHA-256. On a machine that reaches GitHub, check the script as above and the file (gh attestation verify <file> --repo slidrhq/library), then bring both over:sudo bash install.sh --image-file slidr-library-<version>-linux-amd64.tar.gz --reach https …
The script checks the file against the SHA-256 it names, and loads it into Docker before it writes anything. Run again on that machine (
slidr-library change,slidr-library ca), it takes the image it loaded, and pulls nothing. An organization with a registry of its own may copy the image there instead, keeping its digest (skopeo copy --all --preserve-digests docker://ghcr.io/slidrhq/library:<version> docker://<registry>/library:<version>), and install it by that digest, the one on the script's lineIMAGE=:--image <registry>/library:<version>@sha256:<digest>. -
The media. Export it, whole or the parts the organization needs, from the page of a library that reaches the internet (the central library's own page will do), carry the file over, and bring it in:
--no-seed, thensudo slidr-library import slidr-media-<date>.tgz, or Settings → Import from a file (Exporting and importing). Later exports bring it up to date the same way. Or:--seedreads media.slidr.studio unless it names another address. Copy the media folder of a library seeded on a machine that reaches it, then name the copy as the media folder, which the script keeps as it is; or serve it on the network for a while and seed from it (--seed=http://<its address>:<port>/), which checks every file against the manifest. Otherwise--no-seed. -
The organization's own authorities. Node, in the image, trusts the public authorities and not the machine's. A sign-in provider of the network (Keycloak, AD FS:
slidr-library sign-in oidc --issuer https://…), or a server to seed from, often has a certificate that the organization's own authority signed:--ca <file>, its certificates in PEM, has the library trust them besides the public ones. They are kept in/etc/slidr-library/ca/;slidr-library ca <file>changes them, andslidr-library ca --nonetakes them away. -
Signing in. Google and Microsoft are not reached from a closed network. Name a provider of the network, or none: then the owner alone signs in, by the one-time link.
-
The apps are given the library's address by the organization's policy (docs/media-library.md of the app, "A library of your own"). They take only an HTTPS address, so the library is reached by
httpsorproxy. -
Updating.
slidr-library updatereads GitHub. Bring the newer release'sinstall.shand file instead:sudo bash install.sh --update --image-file <file>.
sudo slidr-library status # whether it runs, where it is, and a test of its media
sudo slidr-library login # the owner's one-time link (ten minutes, once)
sudo slidr-library logs -f
sudo slidr-library stop | start | restart
sudo slidr-library update # the newest release; or update <version>
sudo slidr-library change # how it is reached, or its port
sudo slidr-library import <file> # an archive the page's Export wrote, into the media
sudo slidr-library ca <file> # the organization's own authorities (PEM); ca --none
sudo slidr-library sign-in google --client-id <id> # the provider everyone else signs in through
sudo slidr-library owner <email> # hands the library to another member
sudo slidr-library vault rotate # a new master key
sudo slidr-library uninstall # its data, keys and media stay; --purge takes them too- Updating runs the newer release's script, checked against its SHA-256, which pins its image by digest. The data, keys and media stay as they are.
- Backing up: the data folder,
/etc/slidr-library/keys(kept apart from the data folder's backup), and the media folder. To restore them, put them back and run the script with the same folders: it finds the library there and keeps it. - The container runs as the account
slidr-libraryof the machine, on a read-only root, with no capabilities. Its health is/api/methrough Nginx; it starts again when it ends.
- Nginx (
docker/nginx.conf) listens on 8080 in the container, over TLS when/library/tlsholds a certificate. It serves/media/from the folder as the library's own server answers it (media.conf, its types written fromlive.tsbypnpm nginx-types), withContent-Security-Policy: sandbox, and the page's built files, and passes the rest to Node on127.0.0.1:5176. Its log keeps no query string: the owner's link carries its code in one. - The library's server is bundled into one file (
vite.node.config.ts,dist/node/library.mjs), and the CLI isslidr-libraryin the container (server/host/node/cli.ts).docker/entry.shstarts both, and the container ends when either ends. - The data folder (
/library/data) holdshost.json(where the master key is, and the media folder) and the library's store,state/: its settings, its people, its sealed keys (vault/) and its uploads. - The keys the library keeps (the key its cookies are signed with, and the secret of its sign-in provider) are sealed with AES-256-GCM under the master key (
server/core/vault.ts),/library/keys/master.key.vault rotatewrites the new key beside the old one until every key is sealed again. - The media (
/library/media) is the host's: Settings shows it, the room left on its disk, and a Test that writes and removes a probe, and never changes it (docs/SPEC.md D13). - Its owner signs in by a one-time link, opened from any address within ten minutes, once (docs/SPEC.md D17).
.github/workflows/image.yml builds the image on every push and tries it on x86-64 and ARM64: docker/test/image.test.ts (Nginx's /media/ against the library's own server, an upload by a token approved into the folder, the container's hardening, TLS) and install/test/install.test.ts (the script and the command, as root runs them; an install from the image's file, seeded from a server and signed in through a provider that only an authority made for the test vouches for). .github/workflows/release.yml makes a release from a tag v<version> (Releasing).
From the source, for working on the code (any system):
pnpm install; pnpm build
$env:LIBRARY_MASTER_KEY = '<43 characters: init says how to make one>'
pnpm library init --data D:\tmp\library --owner you@example.org --media D:\tmp\media --master-key-env --seed
pnpm library start --data D:\tmp\library # http://127.0.0.1:5176
pnpm library login --data D:\tmp\library # the owner's one-time linkThe page draws the library with the app's own code: the packages it uses (@slidr/model, @slidr/renderer, @slidr/templates, @slidr/media-library) and the app's readers of the library in desktop/src (imported as @desktop/…) are copied into vendor/ from the app's repository, so this repository stands on its own. vendor/README.md says how to take a newer version of them. Paths in this README such as desktop/… and packages/… are of the app's repository.
-
Overview. Each part of the library, with its number of files and their size, and the date the library was published.
-
Parts. Ready-made designs, templates, card sets, frames, shapes and lines, graphics, emoji, animations, backgrounds, icons and fonts. Each is read and drawn by the app's own code in
desktop/src(src/app.tsnames the modules, copied invendor/): the same catalogs, names, renderer and search in Hebrew and English, which reads the library's search tags (tags/, ADR-108 of the app) beside the names, and an item up close shows its tags. A part is loaded when it is opened. -
Languages. The language picker at the top shows the library in any content language of the app (
CONTENT_LANGUAGES), and only what is written in that language: the designs and template samples written in it, and no English in place of the others. Frames and card sets are written in Hebrew and English only, so another language shows none of them, and the picker of a design, a template, a frame or a card set offers only the languages it is written in. Names come from the app's translations (desktop/src/i18n/locales), read when a language is chosen. Fonts are only the families of the language (familyOfLanguage: made for its letters, or for Latin ones and having its letters, so a Hebrew family is none of English's), and show a sentence in it. -
An item up close. A click opens it full size, in the language chosen (the picker of the item switches it), beside what it is made of:
- a design shows its thumbnail as the gallery shows it, its pictures and its catalog, and links to its request in the studio when the studio made it;
- a template shows its whole sample deck, its colours, fonts and layouts;
- a card set shows every kind of card, and the set at every number of cards;
- an animation, an animated shape or a background moves, as on the stage, in a deck that reads from the right and in one that reads from the left when its direction matters, with its names in every language and what it is; in the part, each is still until the pointer is on it, as the tiles of the Elements panel are;
- a frame is drawn around a photograph, with its pictures made ahead and whether they are still current;
- an icon, a graphic or an emoji is shown at several sizes, with its markup and its licence: a graphic's or an emoji's is that of the art set it is drawn from, whose files the part counts;
- a font shows each of its weights, its files and its licence.
The arrow keys step through the part, and the browser's Back button goes back out.
-
All files. Every file of the manifest, folder by folder, with its size and SHA-256. Pictures, JSON, fonts and the reference decks open in place.
The library is read once each time the page is loaded; "Refresh" reads it again.
When Slidr Studio runs on this machine (VITE_SLIDR_STUDIO_URL, http://127.0.0.1:8765/ by default), the page reads from it which designs it made, and a design the studio made links to its request there. Without the studio, the page shows the same library, without those links.
The button at the end of the top bar signs in through the library's provider: Google, Microsoft, or any OpenID Connect issuer (server/core/oidc.ts). In a local library, the owner also signs in there by a one-time link (slidr-library login), which needs no provider at all. Once signed in, the button shows the account and its role.
- How. OpenID Connect's authorization code flow, with PKCE, a
stateand anonce(server/core/auth.ts)./auth/loginsends the person to the provider, which sends them back to/auth/callback, and the server exchanges the code for the ID token with the client's secret. It checks the token's issuer, audience, expiry and nonce, and that the provider vouches for the address, in a domain the library takes when it names some. Then it sends the person back to the page and the item they signed in from. A sign-in that fails comes back with?signin=failed, which the page shows and takes off the address. The provider is the library's settings (signIn, with its client's secret in the vault;slidr-library sign-inin a local library), or, on Cloudflare until it has them, the Worker's Google client. - The provider is the owner's to name: whoever names it says who each person is, the owner too. Its discovery document is read over HTTPS, and must name the very issuer the library names. Microsoft is named by one tenant, its id or its domain: through
organizationsorcommon, any tenant's admin could give an account any address. A provider's client secret, once kept, goes only to that very provider and client: naming another brings its own. - The owner's link (
/auth/local?code=) holds for ten minutes, and is used once. It is opened from any address (docs/SPEC.md D17): in a container every request comes through Nginx, and the owner of a server opens it from their own computer; only someone who may run Docker on the machine makes one. Behind a proxy, the server takes who the proxy forwards (X-Forwarded-For) only from a proxy of that same machine. - The session is a cookie signed with the library's session key (HMAC-SHA-256): the vault's
session, orSESSION_SECRETon a Worker without a vault (pnpm dev). It isHttpOnly,SameSite=Lax,Securewith the__Host-prefix over HTTPS, for 14 days. It says who the person is, never what they may do. - Who may do what (docs/SPEC.md §6.1;
server/core/people.ts,server/core/uploads/access.ts). Anyone who signs in may upload, and sees and changes their own uploads. A reviewer sees every upload, accepts and rejects them, and publishes what waits. An admin also names the members by email (Members, in the page's side menu;/api/members), blocks a person, and publishes an author's files. The owner, who installed the library, is an admin no one removes, and hands the library over to another member. Roles are read on every request, so a role given or taken away counts at once, and each change goes into the audit (audit/of the library's store). On Cloudflare, a library that named its editors in the Worker's secrets takes them once:LIBRARY_OWNER, or else the first ofLIBRARY_EDITORS, as its owner, and the other editors as reviewers. - The routes are the server's, ahead of the page's files (
assets.run_worker_firstinwrangler.jsonc):GET /auth/login?return=<path>,GET /auth/callback,GET /auth/local?code=,POST /auth/logout, andGET /api/me(how one signs in here, who is signed in, their role, and what they may do). A route that changes something, sent with a session, must come from the library's own page (itsOrigin).
-
In the Google Cloud console, make an OAuth client of the "Web application" type. Its authorized redirect URIs are
https://library.slidr.workers.dev/auth/callback, andhttp://127.0.0.1:5176/auth/callbackforpnpm dev. The consent screen asks for no more thanopenid,emailandprofile, which Google does not review. While the app is in "Testing", only its test users can sign in. -
Give the Worker its secrets, once (they stay through every deploy):
npx wrangler secret put GOOGLE_CLIENT_ID npx wrangler secret put GOOGLE_CLIENT_SECRET npx wrangler secret put LIBRARY_OWNER # the owner, read once, while the library names no oneThe master key of the Worker's vault (docs/SPEC.md §4.4) is a secret of this repository,
LIBRARY_MASTER_KEY, which each deploy gives the Worker (deploy.yml):node -e "console.log(crypto.randomBytes(32).toString('base64url'))", then Settings → Secrets and variables → Actions of the repository. The vault keeps the key the sessions are signed with, and the secret of the sign-in provider the owner names in Settings. Keep a copy of the master key elsewhere: without it, what the vault holds cannot be read, everyone signs in again, and the provider is named again.Before the Worker had its vault (2026-10-27), it signed its sessions with
SESSION_SECRETand named its people inLIBRARY_EDITORS: the vault took the session key over, the people were imported once, and the deploy took both secrets away. -
On this machine, copy
.dev.vars.exampleto.dev.varsand fill it in. Git ignores it.
In a local library, the provider is named by its CLI, with the redirect URI it prints to register with the client (the client's secret is asked for, never given as an option):
slidr-library sign-in google --client-id <id> [--allowed-domains example.org]
slidr-library sign-in microsoft --tenant <id> --client-id <id> --allowed-domains example.org
slidr-library sign-in oidc --issuer https://id.example.org/realms/staff --client-id <id> --name StaffUntil the Worker has its client, and a vault (or, for pnpm dev without one, a SESSION_SECRET of at least 32 characters), /api/me says signing in is not offered, and the page shows no button.
Content comes into the library through a REST API of the page's Worker, under /api/ (server/core/uploads). An upload is kept apart from the library, in the R2 bucket slidr-library-uploads. It is checked against the published library as the app's own tests check what is in it, and waits there to be accepted. Nothing of it reaches the library until a publication takes it.
GET /api/content says what each part of the library takes and in which languages, and GET /api/openapi.json describes the whole API (OpenAPI 3.1). A slide, a template's sample, an animation's line and an animated shape are described by the model's own JSON Schema, at /api/schemas/slide.json, /api/schemas/sample.json, /api/schemas/line.json and /api/schemas/shape.json.
| Part | What an upload does | Languages |
|---|---|---|
| Designs | add: a new ready-made slide and its picture, which join the catalog of the designs (elements/designs/index.json, images/designs/m-<id>.webp), with its names and search tags. translate: a published design, any of them, in another language. draw: the pictures of a published design's slides as the galleries show them, drawn again (Slidr Studio draws those the library lacks), the app's own designs too. tag: the search tags of published designs (below). |
Uploaded in Hebrew and English, and accepted once written in every language of the app, as the app's tests hold every design to be. A translation is in any language but Hebrew and English. Tags are in Hebrew and English. |
| Templates | translate: a built-in template's sample deck in another language (templates/catalog.json, samples[<template>].<language>). |
Any but Hebrew and English, which the template's source writes. |
| Backgrounds | add: a new background of Elements, a drawing over the whole slide, most of them moving, which joins elements/backgrounds/catalog.json: whether it moves (animated), whether it stands on one side of the slide or runs one way across it (sided), and its picture (markup; below). tag: the search tags of published backgrounds (below). |
Uploaded in Hebrew and English, and accepted once named in every language of the app, in the catalog itself. Tags are in Hebrew and English. |
| Animations | add: a new animation of Elements, which joins elements/animations/catalog.json: a picture that moves by itself ("kind": "picture", its markup) or a line of the deck that something runs along ("line", its line and flow, ADR-131 of the app), each with its group, size and whether it reads; or a shape of the renderer that repeats a motion ("shape", its shape, ADR-128), among the catalog's shapes. tag: the search tags of published animations and animated shapes (below). |
As backgrounds. |
| Card sets, frames, shapes, graphics, emoji, icons | tag: the search tags of published items (below). No new items: the app's scripts write their catalogs whole, from the packages they read, or the app's code names what it offers, so a new item would be written over, or never shown. GET /api/content says why for each. |
Hebrew and English. |
| Fonts | None, for the same reasons. The app does not search them by tags. |
An upload holds its content by language, under the codes of CONTENT_LANGUAGES (he, en, ar, fr, …), and keeps them in the app's order, Hebrew and English first. Each language is checked on its own:
- a design's slide in it is a
Slideof the model. It shows its own picture (__subject__, and__backdrop__where a photograph lies under it) and no other file. It says something real: three texts at least, more than 25 characters, no placeholder words. Every run of its text is set in a family of the library that has the language's letters; where its family lacks them, the answer names the family's counterpart (fonts/catalog.json, ADR-105 of the app); - a design and its group are named in Hebrew and English only, as the catalog names them, and a new design comes with its search tags in both (
tags): the words people type to find it in the app's Ready slides, beside its name (ADR-108 of the app); - a background or an animation is named in it, and that is all a language holds of it (
{ "name": … }, 1 to 60 characters): its catalog names it in every language of the app; - every list of tags, a design's or an item's, holds 3 to 20 tags of one to four words each, in the language's own letters (Hebrew without niqqud, English in lower case) or of numbers and signs alone, as
16:9or24/7, which are typed alike in every language; none twice, and none about how the item is drawn (icon,illustration,outline…;server/core/uploads/tags.ts); - a template's sample is seated on the template's layouts by the template's own engine (
sampleSlides), asexport-templates.mjschecks the languages it keeps, and names only pictures the templates have (templates/pictures.json).
GET /api/content the parts of the library, its languages, what each takes
GET /api/openapi.json the API
GET /api/uploads the uploads, newest first: ?type ?action ?status ?target ?language ?limit ?after
POST /api/uploads an upload: JSON, or a form with the upload as JSON in `upload` and each file by its name
GET /api/uploads/<id> an upload, all it holds, and the languages it still lacks (`missing`)
DELETE /api/uploads/<id> withdraws one that waits, or was rejected
GET /api/uploads/<id>/files/<name> one of its files
PUT /api/uploads/<id>/languages/<lang> writes it in a language, or again in one, while it waits
DELETE /api/uploads/<id>/languages/<lang> takes a language away, but for Hebrew and English
POST /api/uploads/<id>/status { "status": "accepted" | "rejected" | "pending" | "published", "note"? }
A design, in Hebrew and English, with its picture (design.json below); then its French, and each other language, one at a time (fr.json: { "slide": { … } }); then accepted (accept.json: { "status": "accepted" }):
curl.exe -F "upload=<design.json;type=application/json" -F "picture=@m-harbour-launch.webp" http://127.0.0.1:5176/api/uploads
curl.exe -X PUT -H "Content-Type: application/json" --data "@fr.json" http://127.0.0.1:5176/api/uploads/<id>/languages/fr
curl.exe -H "Content-Type: application/json" --data "@accept.json" http://127.0.0.1:5176/api/uploads/<id>/status{
"type": "designs",
"action": "add",
"id": "m-harbour-launch",
"group": "events",
"subject": [1500, 540],
"languages": {
"he": {
"name": "ערב השקה בנמל",
"groupName": "אירועים",
"tags": ["ערב השקה", "השקה", "אירוע", "הזמנה", "נמל"],
"slide": { "id": "s_1", "elements": [], "timeline": [] }
},
"en": {
"name": "Launch night at the harbour",
"groupName": "Events",
"tags": ["launch night", "launch", "event", "invitation", "harbour"],
"slide": { "id": "s_1", "elements": [], "timeline": [] }
}
}
}Backgrounds and animations of Elements (ADR-127, ADR-128 and ADR-131 of the app) were drawn by the app's own code until they became the library's: two catalogs that publishing writes into, which take new items as the designs' does (server/core/uploads/motion.ts). Each item has an id of its own in its list: a word in lowercase letters and digits, or in camelCase, and more joined by hyphens (flow, flowArrow, slow-orbit), up to 40 characters, which its list does not have yet. An animation and an animated shape may share one, as the hexagon does, each in a list of its own. It is uploaded named in Hebrew and English, named in the other languages one at a time (PUT /api/uploads/<id>/languages/<lang>, { "name": … }), and accepted once it is named in all of them. A picture is SVG markup that the app draws as it is, so it is checked as a string before it is kept, and the app's renderer cleans it again when it draws it:
- it is one
<svg>element (the whitespace around it is let be, and not published), withxmlns="http://www.w3.org/2000/svg"and aviewBoxof four numbers, its width and height above 0; at most 256 KiB; - it runs nothing and reads nothing from outside itself: no
<script>,<foreignObject>,<iframe>,<embed>,<object>or<image>, no event attribute (on…=), nojavascript:and no@import; a link (href,xlink:href) andurl()name only what it holds (#…), and nothing it animates is a link (attributeName="href"); - it has no
data-slidr-motionordata-slidr-speed: the app gives an animation's picture its name and its speed itself; - a background is drawn over the whole slide, 1920 × 1080 (
viewBox="0 0 1920 1080"). One that issided, standing on one side of the slide or running one way across it, is drawn for a deck that reads from the right, and the app mirrors it for a deck that reads from the left. An animation's picture is drawn in the units of itssize, the size it lands on a slide at (viewBox="0 0 w h", which is checked), within 1920 × 1080; one thatreads, running from one side to the other, is drawn from left to right, and mirrored in a deck that reads from the right; - its colours stand for the theme's, written as attribute values (
fill="#6c4cf1"), never in its stylesheet, and the app maps them to the template's colours so the drawing follows the template:#6c4cf1primary,#2f6bffsecondary,#f29a00accent,#15213ftext,#ffffffsurface,#fbf6ecbg (the ground), and#fffffelight, white in every theme (a glint). Any other colour stays as written; colours are not checked.
A line is a LineElement's points, stroke, startHead, endHead and curve, with a flow, what runs along it (/api/schemas/line.json), its points within its size, from left to right. A picture and a line are shown in a group of the collection: path, spin, scale, lines or particles. An animated shape (/api/schemas/shape.json) is a preset the renderer draws, or one of elements/catalogs/shapes.json; its longest side on the slide, up to 1080; its width over its height (aspect) where it is not the shape's own; its look (fill, outline, dashed) and ink (primary, secondary, accent); the motion it repeats (ambient, the model's AmbientMotion); and whether it reads, pointing the way a line runs: its preset then names Right, and has a twin that names Left, which the app draws in a deck that reads from the right. It has no group, size or markup. A background, an animation picture, and an animated shape:
{
"type": "backgrounds",
"action": "add",
"id": "aurora",
"animated": true,
"sided": false,
"markup": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1920 1080\">…</svg>",
"languages": { "he": { "name": "זוהר" }, "en": { "name": "Aurora" } }
}{
"type": "animations",
"action": "add",
"id": "comet",
"kind": "picture",
"group": "path",
"size": { "w": 400, "h": 400 },
"reads": false,
"markup": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 400 400\">…</svg>",
"languages": { "he": { "name": "שביט" }, "en": { "name": "Comet" } }
}{
"type": "animations",
"action": "add",
"id": "ring",
"kind": "shape",
"shape": {
"preset": "ellipse",
"side": 260,
"look": "dashed",
"ink": "primary",
"ambient": { "kind": "spin", "duration": 8000 }
},
"languages": { "he": { "name": "טבעת מסתובבת" }, "en": { "name": "Turning ring" } }
}Search tags. Every part the app searches (designs, backgrounds, animations, card sets, frames, shapes, graphics, emoji, icons) takes tag: the tags of some of its published items, by the key its catalog gives each (fluent-emoji:balloon, birthday-cake, lucide:cake, shape:rightArrow, magnet-birthday, steps, birthday, flow; an animation by its id, orbit, and an animated shape as shape:<id>, shape:ring; GET /api/content names the keys of each part). The upload is named by its part, one waits at a time, and each item is tagged in both languages. Publishing merges it into tags/<part>.json: an item named in it takes these tags, and the others keep theirs. The app's scripts/tag-elements.mjs writes them with Claude and sends them this way (--upload).
{
"type": "graphics",
"action": "tag",
"id": "graphics",
"languages": {
"he": { "tags": { "fluent-emoji:balloon": ["בלון", "יום הולדת", "מסיבה"] } },
"en": { "tags": { "fluent-emoji:balloon": ["balloon", "birthday", "party"] } }
}
}The page does the same by hand, under Uploads in its side menu (src/Uploads.tsx). It lists the uploads by their status. An upload opens up close, drawn by the app's renderer in each of its languages, with the subject's point marked on its picture, beside its languages (each added, replaced or taken away from a JSON file), its status and its history. New upload takes the picture and a file for each language, named by it (he.json, en.json…), or a whole upload as the API takes it, and draws the slide, or the template's sample, before anything is sent. A click on the slide places the subject's point. What the server finds wrong is shown by language.
An upload waits (pending) while it is written. It is then accepted or rejected (with a note). Once the library is in its bucket, approving an upload writes it into the library at once, and it is published (Publishing the uploads); one that cannot be written now stays accepted, waiting, and says why. Before then, one marked published that the library does not have after all goes back to accepted, by whoever may publish. A program that publishes (a publish token, an admin's: the studio) skips the wait: its upload, written in every language it needs, is accepted as it comes and published at once, and the answer to POST /api/uploads says what came of it (publishing), as an approval's does. An upload is checked once more, against the library as it is then, when it is accepted, and it records who did each of these in its history. What does not hold is answered 422, with every issue at its place: { "error": "invalid", "message", "issues": [{ "path": "languages.ja.slide", "message", "language": "ja" }] }.
Who may upload, and how. Anyone who signs in (Signing in), from the library's page, or a program by a token of a person's: Authorization: Bearer slk_…, and nothing else, no cookie and no Origin. A person makes their tokens in their Profile (from the account button; /api/me/tokens): each named, for 30, 90 (the default) or 365 days or until revoked, shown once and kept only as its hash (server/core/tokens.ts). A token acts as its person, within its scope: upload makes, reads, changes and withdraws that person's own uploads; publish, which only an admin makes, also publishes what waits, an author's files, and the library brought in. Approving is a person's, on the page. A publish token whose person is no longer an admin does nothing at all, and is taken away when their role is. A token that is unknown, revoked, expired, or of someone blocked answers 401, the same each time; an admin sees and revokes anyone's tokens, and blocking a person revokes them all. Anyone without a role keeps at most 20 uploads waiting, 200 MiB of their files, 10 tokens, and 60 changes a minute (server/core/limits.ts; the library's settings may name others). A program is a person's, and sends their token: the studio and scripts/import-library.mjs a publish one, an admin's, since they publish; the app's tag-elements.mjs --upload an upload one. The keys the Worker named before (LIBRARY_KEYS) open nothing any more. server/core/uploads/access.ts decides, by what each route is about to do. What describes the API (/api/content, /api/openapi.json, /api/schemas/) is open to anyone. An upload records who did each thing, by address and the token's name; what a program's key did before keeps the program's name (key:<name>).
Search-tag uploads may also include any of the other supported content languages alongside Hebrew and English. All supplied languages must tag the same item keys. The app's desktop/scripts/translate-tags.mjs translates existing tags into the other fourteen languages before tag-elements.mjs --upload sends them. Native accents, vowel marks and capitalization are preserved; English remains lowercase and Hebrew remains without niqqud.
The published media library lives in the Worker's own R2 bucket, slidr-media (MEDIA, server/core/media/live.ts): every file under its path, and manifest.json, which names each with its size and SHA-256 as the app reads it. The bucket is public, and holds the library and nothing else. media.slidr.studio, where every installed app reads the library, is the bucket itself, with Cloudflare's cache before it, and no Worker runs when it is read (Serving the library). The Worker serves the same bucket at /media/ (server/core/media/serve.ts), with the headers Cloudflare Pages gave it, as a dev server does. No author's copy of the library and no pnpm media:publish take part: what reaches the library comes through the uploads, and a publication writes the accepted ones into the bucket.
GET /api/library where the library is, when it was published, how many uploads wait
POST /api/publish every accepted upload, oldest first; or { "uploads": ["u-…"] } (Try again);
{ "uploads": [] }: none, only what is made of the catalog of the designs,
and the catalog made one where it is in two
(Publications → Bring the designs up to date)
GET /api/publications what each publication did, newest first (?before=, ?limit=)
GET /api/publications/<at> one of them
POST /api/library/import once: the site's library into the bucket, a batch per call
PUT /api/library/staged/… a file of an author's publication (pnpm media:publish of the app)
POST /api/library/files an author's publication: the files changed since the copy was pulled
POST /api/library/archive an archive of a library brought in: a .tar or .tgz (Exporting and importing)
GET /media/<path> the library in the bucket, as a dev server serves it
Approving an upload publishes it, in the same request, and the answer says how that went (publishing). The library's own jobs (server/core/media/sweep.ts) publish every approved upload that waits and is due, and once a day take away rejected uploads untouched for 30 days and all but the last 100 publications' history. On a machine they run once a minute, by the process's timer. On Cloudflare they run from a Cron Trigger, once a minute (wrangler.jsonc; turned on 2026-10-27). A publication (server/core/media/publish.ts):
- checks each upload once more against the library as it is; one that no longer holds goes back to
pending, with a note that says why, for its uploader to put right; one that cannot be written now staysaccepted, waiting (publication: why, the tries, the next), and is tried again after 1, 5 and 30 minutes, and then by hand (Try again,POST /api/publishwith the upload); one that waits while another publication holds the library is tried at the next round (server/core/media/settle.ts); - writes each into the files it changes (
server/core/media/merge.ts): the tags of a part merged intotags/<part>.json, where an item named takes the tags given in every language given and the others keep theirs; a new design into the catalog of the designs,elements/designs/index.json(its names, group, slides and subject), its picture's size intoimages/designs/sizes.jsonand its tags intotags/designs.json, with its picture inimages/designs/, and the picture of each of its slides that the galleries show when it brings them (thumb-<language>, 320 × 180, inimages/designs/thumbs/320/<language>/); a design's translation into its slides, with their pictures too; a drawing's pictures, each named by the word of the slide it was drawn of while the slide still has it; a new background last inelements/backgrounds/catalog.json, and a new animation last inanimationsofelements/animations/catalog.json, or an animated shape in itsshapes, named in every language of the app, each catalog made where the library has none yet and written as the app's own were (two spaces, a final newline), an id its list took meanwhile not written; a template's sample intotemplates/catalog.json, which changes in no other byte; - writes again what the app reads of the designs, made of their catalog (
server/core/media/designFiles.ts): the catalog in each language (elements/designs/<language>/index.json), the word of each design in each language, of its slide and its pictures (elements/designs/revs.json, as the app'sdesignWord.tsmakes it), and the word each picture of a slide that came with an upload was drawn from (images/designs/thumbs/index.json). An app takes none of them when they are of another library, and draws every design live then: so each publication writes them as the library now is, and one that takes no upload (Try again) writes them where they are not. A design changed since the picture of its slide was drawn is drawn live, alone. A catalog the last words were made of is not read again: it is some 54 MB; - keeps what it replaces beside the uploads, under
media/history/<published>/ofslidr-library-uploads(the manifest before it, and each file it wrote over), writes the manifest last, empties the cache of every file it wrote and of the manifest, and marks each uploadpublished. The app takes the new library the next time it reads the manifest. The answer says what became of the cache (cache:files,host, ornoneand why), and is kept asmedia/publications/<published>.json; - when it fails before the manifest is written, puts the media back as it was: each file it replaced, from the history, and each it added, taken away (
server/core/media/writing.ts).
An author's files. What the app's generators write (the catalogs of icons, frames and authored designs, the templates and their sources' samples, the fonts) is still made in an author's copy of the library, and published from it by pnpm media:publish of the app, through this API too: it sends each file the author changed since the copy was pulled (PUT /api/library/staged/<sha256>), and then the publication of them (POST /api/library/files), each path with the hash it was changed from (server/core/media/files.ts). A file the library changed meanwhile, as an upload that was published, is a conflict, and nothing is written: the author pulls (pnpm media:pull) and publishes again. Every file the author did not change stays as the library has it, so a publication of an author's files never takes away a published upload.
One publication runs at a time: it holds media/lock.json beside the uploads, taken and let go only over the version read just before, kept once a minute while it writes, and taken over when left unkept for ten minutes (server/core/media/lease.ts). Up to 5 uploads go in one (a publication holds what they bring until it writes, within the Worker's 128 MB), and the answer says how many are left. Once the library is in its bucket, an upload is no longer marked published by hand (409 publish-instead): it is published. The page's Uploads publishes every accepted upload that waits at once, and an upload up close by itself; Slidr Studio's Publish panel publishes them too, with its key.
Setting it up, once:
- Make the bucket, and publish the Worker with it (
wrangler.jsoncbinds it):npx wrangler r2 bucket create slidr-media pnpm build; npx wrangler deploy - Bring the published library into the bucket, from media.slidr.studio as Pages serves it now. A call copies a batch, checked file by file; the script calls until the bucket has every file and the manifest:
$env:LIBRARY_TOKEN = 'slk_…' # an admin's token, of the publish scope (the profile) node scripts/import-library.mjs
https://library.slidr.workers.dev/media/manifest.jsonthen answers with the library. - Put media.slidr.studio before the bucket itself, and take the Pages project away (Serving the library, "Setting it up"). Every installed app reads the bucket from then on.
- Publish the uploads accepted until then: Uploads → Publish N accepted, or
POST /api/publish. From then on, approving publishes.
What the apps that read this library offer, and what they start with: for an organization that runs a library of its own (A local library). An admin sets them on System settings, in the page's side menu (src/System.tsx), and Publish writes them into the media at once, as one file, system/settings.json (ADR-117 of the app):
- Writing and design agents. Which of the app's agents it offers (Claude, Codex, GitHub Copilot, Gemini, Grok) and the organization's own, and the default, which a first setup has chosen to begin with. With every one checked, the app offers all of them, and those of later versions too.
- Web access for the agent: each user's choice, on or off to start with, or never.
- Image agents: the image providers the app offers (Codex, the OpenAI API, and the external agents that make images too), and the default.
- External agents. A CLI of the app's custom agent protocol (docs/custom-agent-cli.md of the app), as the Open WebUI agent of
custom-agent/is: its name, id, mark and tint; its program, an absolute path (%LOCALAPPDATA%\…and the like) or a name, a native executable and never a script; its arguments and environment; and how the app installs it once the user approves, by WinGet from the source named, by npm, or as a package of this library. Without an installation the organization installs it. The app offers it as it offers its own agents: it is installed, signs in, and lists its models and efforts. Makes images too offers it among the image agents as well (ADR-144 of the app): its program makes them withslidr image, on the same sign-in, and says itself what it can do of them. It may make the images alone: left unchecked among the writing and design agents, it is still installed and signed in for them, from the app's image settings. - An agent's package (ADR-130 of the app): a .zip of its program and every file it needs, up to 95 MB, chosen on the page. The app downloads it from this library alone, never from the internet, so it serves an organization whose machines have none; unpacks it into a folder of the agent's own,
custom_agents\<id>\of its local data; and brings it up to date at a later start when the library has another. The program may be a path within the package (bin\acme.exe), and%SLIDR_AGENT_DIR%in the arguments and the environment is its folder, aspwsh.exewith-File %SLIDR_AGENT_DIR%\openwebui-agent.ps1for the Open WebUI agent (custom-agent/README.md). - Languages of the app's interface, and the default. The ready-made content the app offers follows the interface's language.
- Photos: the photo libraries the app offers (Unsplash, Pexels), and the default. Of these alone, none may be offered: the file then says
"stock": { "offered": [] }, and the app offers no photos. Of every other kind, one at least.
An app reads the file when it first starts, and keeps it. Every later start goes by what it kept, without waiting for the network, and reads the file again in the background for the next start (ADR-124 of the app): a change reaches each app at its next start, and holds from the start after. An app that is pointed at another library waits for that library's file. Remove the settings takes the file away, and an app goes by its own defaults in the same way, from the start after its next one. The media is public to whoever reads the library, so the settings hold nothing secret: an environment variable is not a place for a key.
GET /api/settings/system the settings published: { path, settings }, settings null when there are none
PUT /api/settings/system { agents?, languages?, images?, stock? }: published at once
DELETE /api/settings/system takes them away
PUT /api/settings/system/packages/<sha256>
an agent's package, the .zip as the body, kept until the settings
that name it ({ install: { sha256, size } }) are published
They are an admin's (settings). A change is a publication of its file, and of the agents' packages it names, which it writes at system/agents/<id>.zip; it takes away the packages no agent names any more. It is kept in the history and recorded (Publications), and in the audit (settings.system). Settings that do not hold are refused with where each fails (issues): a default that is not offered, an agent's id that is one of the app's own, a script as a program, SLIDR_PROTOCOL, SLIDR_MCP_TOKEN or SLIDR_AGENT_DIR in an environment (the app sets them), a path within a package or %SLIDR_AGENT_DIR% for an agent without one, a package that was not sent first, an agent offered that is none (server/core/system.ts). Exported and imported, system/ goes whole, the packages with the settings.
A library goes from one machine to another as one file, with no network between them: the page's Export writes it, and another library's Import from a file brings it in. It is how a library on a closed network is filled and kept up (docs/SPEC.md §5.6).
Export (anyone, in the side menu; src/Export.tsx) makes the archive in the browser, from the files the page reads, and checks each against the manifest. It is a tar, gzipped unless asked otherwise, of manifest.json (the files it holds, with their sizes and SHA-256) and each file at its path, dated when the library was published: unpacked, it is a copy any web server serves (docs/media-library.md of the app, "A copy"). Chrome and Edge write it to the file picked as it is made; another browser holds it in memory until it is whole, then downloads it. The library is some 8,700 files and 370 MB; it reads them from media.slidr.studio, through its cache, in a minute or two.
What it holds is chosen in two steps (src/exportParts.ts). First the languages, for the whole library, where the app does without the others:
- the designs' catalogs of a language and their pictures made ahead,
elements/designs/<language>/andimages/designs/thumbs/<width>/<language>/: a language left out offers no designs; - the pictures of the magnets made ahead,
images/frames/he/for Hebrew andimages/frames/en/for every other language (frameThumbs.tsof the app); - the fonts: a deck offers the families of its language and of English, so a family made for other letters than Latin (
for,fonts/catalog.json) goes with a language written in them, and one made for Latin letters always.
Then the parts of the overview, each with the search tags of its kind (tags/<kind>.json), whole or by the groups the app shows it by:
| Part | Pieces | Written again with the pieces chosen |
|---|---|---|
| Designs | The groups of the gallery (groups of the catalog): each design's pictures, and the pictures made of it ahead |
elements/designs/**.json, images/designs/sizes.json, thumbs/index.json, tags/designs.json |
| Frames | The groups of the frames panel (frames-catalog.json): the pictures of a magnet made ahead |
elements/catalogs/frames-catalog.json (its stickers too), tags/frames.json |
| Templates | Each template, templates/<id>/ and its photographs; and the reference decks, which no app reads. A template left out is left out of the app (builtIn.ts). |
None: templates/catalog.json, index.json and pictures.json go with any of them |
When some groups only are chosen, the catalogs that name every item are written again with the items of those alone (src/exportCut.ts), in the browser, before the archive is made: a design the catalog named without its pictures would be drawn without them. Each keeps its members, its form and its from, which names the files as the archive holds them, so an app takes the archive unpacked as a library of its own. A library that brings it in merges them into its own a design and a frame at a time, and what it has of the other groups stays. Every other part goes whole: the icons' search reads both sets at once, and a style of graphics draws from several art sets; and when every group is chosen, every catalog is as the library has it. The choice, its languages, and whether to compress are kept in a cookie of the browser (slidr-library-export), for the next export.
Import from a file (admins, in Settings; src/ImportArchive.tsx) reads the archive's manifest in the browser first and shows, by part, what it adds, what it replaces of the library, what it merges into the library's catalogs and what is the same, and warns when the archive is older than the library. Then it sends it (POST /api/library/archive, the archive as the body), and the library writes it (server/core/media/archive.ts):
- each file is checked against the archive's manifest, by its size and SHA-256, and the archive must hold every file its manifest names: else nothing is written. What is not a file of the library, a link, or a path out of the folder is refused; what a system leaves beside files (
.DS_Store,._…) is left out; - a file the library lacks is added, one it has with other bytes is replaced, and every other file stays: an archive of some parts changes no other part. The preview lists each file replaced, and the publication keeps the old ones in its history;
- the catalogs a library's own publications write into are merged, not replaced (
server/core/media/merged.ts,archiveMerge.ts): the catalog of the designs a design at a time, the sizes of their pictures and the words of their pictures made ahead an entry at a time, the search tags of each part an item and a language at a time, the samples of the templates a template and a language at a time; and the catalog of the frames, which the page exports by group, a group and a frame at a time, with its stickers and the frames shown first; the catalogs of the backgrounds and of the animations an item of each list at a time, by its id. Where both have one, the archive's wins; a design, a frame, a background, an animation, a tag or a sample only this library has stays, a frame after the others of its group, a background or an animation after the archive's of its list. Files taken away from the other library are not taken away here; - a library whose catalog of the designs is still in two (
managed.jsonbesideindex.json, before ADR-118 of the app) has them made one first, and so has an archive of one; - it is a publication: under the lease, what it replaces kept in
media/history/<published>/, the media put back as it was when it fails part-way, the cache emptied of what it wrote, and recorded among the Publications as imported from a file. Into an empty media, it is the library's first; - of the designs, the files of the languages the archive did not bring are written again from the catalog (
refreshLanguagesofdesignFiles.ts), so a gallery in another language the library has keeps its designs; - a local library refuses an archive its media's disk has no room for (
507).
On the machine of a local library, sudo slidr-library import <file> does the same without a browser: the command of the machine hands the file to the container on its standard input (slidr-library import -). On Cloudflare a request is at most 100 MB, so an archive larger than that is brought into a local library only.
media.slidr.studio is a custom domain of the bucket slidr-media. Cloudflare answers from its cache, and reads a file from the bucket only when the cache does not hold it. No Worker runs, so reading the library costs nothing by the request: Cloudflare's cache and R2's egress are free, and R2 counts only the reads that reach the bucket (10 million a month are free), which are about one a file a day and after a publication, however many apps read it.
- What a file is answered with. The type and the caching it was written with (
server/core/media/live.ts): the manifestno-cache, every other filepublic, max-age=0, must-revalidate, as Pages served them. The zone's rule below adds what the Worker added:Access-Control-Allow-Origin: *andX-Slidr-Library: live, by which the app'spnpm media:publishknows to publish through the API. A file's ETag is R2's own, not its SHA-256; the app checks each file against the manifest, and sends noIf-None-Match. - How long the cache keeps it. A file a day, the manifest two hours (the least the Free plan allows). A publication empties the cache of every file it wrote or took away, and of the manifest, as soon as the manifest is written (
server/core/media/cache.ts): by their addresses, 100 a call, or the whole host when they are more than 300. Every other file stays in the cache. - When the cache cannot be emptied (the Worker lacks
MEDIA_ZONE_IDandMEDIA_PURGE_TOKEN, or Cloudflare refuses), the publication is written all the same, says so in its answer, and the Worker logs why. The cache then holds the old files for a day at most, and the manifest for two hours. Meanwhile an app may read the new manifest and an old file: it shows the old file and does not keep it. To empty it by hand: the zone's Caching → Configuration → Custom Purge → Hostnamemedia.slidr.studio.
Setting it up (done on 2026-10-25), once, after the library is in the bucket (Publishing the uploads, step 2: it is read from media.slidr.studio as Pages serves it). The address does not answer for a minute or two between steps 2 and 3; an installed app works from what it keeps meanwhile.
- The bucket's CORS policy, for a browser that asks before it reads (the zone's rule in step 4 gives every answer its CORS headers, cached or not):
npx wrangler r2 bucket cors set slidr-media --file media-cors.json
- Take media.slidr.studio from the Pages project: Workers & Pages →
slidr-media→ Custom domains → remove it; then remove its DNS record from the zone slidr.studio (media, a CNAME to slidr-media.pages.dev). - Give it to the bucket: R2 →
slidr-media→ Settings → Custom Domains → Add →media.slidr.studio. R2 makes its DNS record and its certificate. - In the zone slidr.studio:
- Caching → Tiered Cache → Smart Tiered Caching on: one data center reads the bucket for all the others.
- Caching → Cache Rules, in this order:
- Media library: hostname equals
media.slidr.studio→ Eligible for cache; Edge TTL: ignore cache-control header and use this TTL, 1 day; Browser TTL: respect origin. - Media manifest: hostname equals
media.slidr.studioand URI path equals/manifest.json→ Eligible for cache; Edge TTL: ignore cache-control header and use this TTL, 2 hours; Browser TTL: respect origin.
- Media library: hostname equals
- Rules → Transform Rules → Modify Response Header, Media library headers: hostname equals
media.slidr.studio→ set staticAccess-Control-Allow-Origin: *,Access-Control-Expose-Headers: ETag,X-Content-Type-Options: nosniff,X-Slidr-Library: live. - Rules → Configuration Rules, Media library: no rewriting of HTML: hostname equals
media.slidr.studio→ Email Obfuscation, Automatic HTTPS Rewrites, Server Side Excludes and Rocket Loader off, Web Analytics (RUM) and Zaraz disabled. The zone rewrites the e-mail addresses of HTML otherwise (templates/reference-decks/*.html), and the app checks every file against its SHA-256.
- A token that may empty the cache (the account's token
slidr-library-purge): Manage Account → Account API Tokens → Create Token → custom, permission Zone → Cache Purge → Purge, for the zone slidr.studio. Then the Worker's secrets:npx wrangler secret put MEDIA_ZONE_ID # the zone's id, on its Overview page npx wrangler secret put MEDIA_PURGE_TOKEN - Check it:
curl.exe -sI https://media.slidr.studio/manifest.jsonanswersX-Slidr-Library: liveandCache-Control: no-cache, and asked again,cf-cache-status: HIT;/fonts/catalog.jsonanswersAccess-Control-Allow-Origin: *. - Delete the Pages project
slidr-media(Workers & Pages →slidr-media→ Settings → Delete project). slidr-media.pages.dev stops answering: no release of the app reads it.
The page runs on Cloudflare as the Worker library (https://library.slidr.workers.dev), which serves the page from dist/client and runs server/host/cloudflare/index.ts (the library's server, server/core): signing in, and the uploads (wrangler.jsonc; pnpm build writes both, and the Worker's own configuration to dist/library). .github/workflows/deploy.yml checks, tests, builds and publishes it on every push to main, and you can run it by hand from the Actions tab. The workflow needs two repository secrets: CLOUDFLARE_API_TOKEN, a token with the "Edit Cloudflare Workers" template, and CLOUDFLARE_ACCOUNT_ID.
To publish from your own machine: pnpm build, then npx wrangler deploy.
The uploads are kept in the R2 bucket slidr-library-uploads, which is made once, before the first publication: npx wrangler r2 bucket create slidr-library-uploads, and the published library in slidr-media (Publishing the uploads). They are checked against the library in its bucket, and before it is there against the site, https://media.slidr.studio/, unless the Worker's variable MEDIA_LIBRARY_URL names another. Checking an upload (a design in every language, a sample seated on its template) takes more CPU time than the Free plan's 10 ms a request, so the Worker runs on Workers Paid. pnpm dev runs the Worker beside the page, with buckets of its own on this machine, in .wrangler/: node scripts/import-library.mjs --url http://127.0.0.1:5176 brings the library into them.
A release of the local library is made from a tag v<version> that package.json names (.github/workflows/release.yml): it checks and tests, builds the image for x86-64 and ARM64 and pushes it to ghcr.io/slidrhq/library (<version>, <major>.<minor>, latest) with its SBOM and an attested provenance (gh attestation verify oci://ghcr.io/slidrhq/library:<version> --repo slidrhq/library), copies it into a file for each architecture (slidr-library-<version>-linux-<arch>.tar.gz, by skopeo, as docker load takes it), tries that very image as a machine pulls it and as it loads its file, and makes a GitHub release with install.sh, which names the release's version, its image by digest and each file by its SHA-256, install.sh.sha256, and the files, attested as the script is. A tag deploys nothing to Cloudflare.
Once, after the first release pushed the image: the package library on ghcr.io is made public (Package settings → Change visibility), since a package starts private even from a public repository; then the release's failed jobs are run again.
pnpm check runs typecheck (the page, and the server with server/tsconfig.json), eslint and prettier. pnpm test runs the server's tests (server/**/*.test.ts) in Node's test runner, with Google's token endpoint and the published library stood in for; server/node.mjs lets Node import the app's code in vendor/ as a bundler does. The words of the page are in src/i18n: each area in Hebrew and English in areas/<area>.ts, and every other language in locales/<lang>.ts.