Appearance
Current limitations
The items marked (demo) were found setting up a new site with create-foliwake. For what is available, see feature status.
Installing
- The
foliwakecommand and the Docker image are not public. The CLI runs from a checkout of the private repository; the image is published toghcr.io/foliwake/foliwake(amd64 and arm64) for accounts with access to the repository (docker login ghcr.iowith a token that hasread:packages). The site-code packages (create-foliwake,@foliwake/site-check, the SDK) are on npm. - The engine's
foliwakeis the open@foliwake/cli(npm) with the engine's own commands: the commands both have (sign-in,site,page,source,code,branch,release,operation,create,dev…) are the package's, run here with the engine's local runtime. The engine pins one exact version; a command the engine needs changed is changed in the public SDK repository and released there first. Core over HTTP is versioned (GET /api/version, API 1) but the server does not refuse an old CLI by version. foliwake createwrites the project withcreate-foliwake: its texts are create-foliwake's, and the engine's own project writer (src/create/) stays only forblocks newstarters and its tests until it is removed.- The Docker package runs the server only. Outside it stay: the HTTPS proxy with its certificates and wildcard DNS, the CMS (Drupal, its database and cron), and hosting of these docs. See run Foliwake for a team.
- The Docker package does not write the GitHub workflows of a frontend repository: add
code deploywith a CI key yourself (release code from CI). - A project's
foliwake.config.jsonmay leave outstorage,stateDir, the hosts andid(a local project:devandpage checkonly), butcreate-foliwakestill writes a full entry with local storage until a release of it follows this engine version. The dashboard (foliwake admin) shows such an entry as a problem: its sites name their storage. foliwake docker configurehas no storage flags: the storage of new sites followsFOLIWAKE_STORAGE_*at each start, whichfoliwake docker installwrites into the instance's managed.envblock.- With the engine's
foliwake,FOLIWAKE_CONFIGstill comes beforeFOLIWAKE_SERVERuntil the engine pins the next@foliwake/clirelease: inside the Docker image (which setsFOLIWAKE_CONFIGfor its own commands) a command meant for a server needs--server. The image keepsFOLIWAKE_CONFIG:docker exec … foliwake account linkand the other in-container commands find the server's configuration with it. - In website history on
foliwake server, the banner's «Open current website» link uses the live address the site's configuration resolves (port 8080 when it names none), not the server's public port. - Content-source plugins are not isolated. A plugin runs inside the engine process: it can read every site's credentials, the installation's secrets (
FOLIWAKE_AUTH_SECRET,FOLIWAKE_PREVIEW_SECRET, storage keys) and every site's storage. Put only plugins you have reviewed into the plugin list file (FOLIWAKE_PLUGINS); the connectors shipped with the engine are reviewed with it.
People and sign-in
- Sign-in is by e-mail link only. Without mail on the server, an operator prints the links.
- The dashboard manages the whole installation, so only the owner (or another account with installation authority) can use it. Other roles work through the CLI against a server.
- A site belongs to exactly one organisation, for good:
site set orgis refused (SITE_ORG_FIXED); delete the site and create it again instead. The server hasorg.create(the installation's owner only),org.listandsites.delete(see delete a site); their commands (org list,org create,site delete,connect --create --org/--repository) come with the next@foliwake/clirelease, which the engine then pins.site deletenever touches the bucket: the operator empties it before the id is used again. The dashboard's site screens do not offer deletion yet. sources.probe(source check) reaches the upstream with the site's credentials but is still a query (a GET): the published@foliwake/clicalls it so, and API 1 changes only by adding. Through the dashboard every core call, a GET included, needs the session's CSRF header and the server's own origin, so a link or another site cannot make one. It becomes a mutation together with a@foliwake/clirelease that knows it.- A source's accepted upstream (its binding: the repository, a Drive folder, a Drupal address) is compared after the sync's first request to the upstream, because each connector computes it while it connects. An organisation admin cannot move a source that uses an installation credential (see what an organisation admin may change), so only the installation's own address change reaches a new upstream with that credential before
SOURCE_BINDING_CHANGEDstops the sync. Checking it before any request needs connectors to name their binding from the settings alone. - A device sign-in (
foliwake login, the author extension) is approved by typing its code, never from a link, and the page shows where and when it started; a person who is talked into typing someone else's code still approves that sign-in. A key's life is counted from its last use (30 days for an account with installation authority, 90 for other CLI keys): a key in steady use does not lapse by itself; revoke it under Signed-in computers. - Sign-in links asked for in the browser: one client address gets 10 requests a quarter of an hour, then a refusal; one e-mail address gets at most 3 mails in that time, whoever asks. Past that the page answers as always and mails nothing, so nobody can lock a member out (a link already mailed still works), but anyone may still send a member those 3 mails. Behind a proxy without
FOLIWAKE_TRUST_PROXY=1every browser shares the proxy's address, and one client's limit (sign-in links, device codes) refuses them all; the server warns once on stderr whenX-Forwarded-Forarrives while the proxy is not trusted. The limits are kept in the process's memory. foliwake docker installandconfiguresetFOLIWAKE_TRUST_PROXY=1only for a public address on a port bound to 127.0.0.1. With--bind 0.0.0.0(Varnish or not: the server's own port is published on the same address) a client reaching the port directly could forgeX-Forwarded-For, so the trust stays off and every browser behind the proxy shares its sign-in limits. The CLI's block in.envcomes last, so the value cannot be overridden there; keep the proxy on the same computer and the port on 127.0.0.1.- On an https server the sign-in session, the device-approval CSRF value, the preview hand-over and website history use
__Host-cookies, which a page on a sibling host (a site atx.live.<domain>) cannot set. On plain http (local use) browsers do not allow that prefix: the plain names stay, and a sibling host could still plant a session or CSRF cookie there (a planted preview or history cookie no longer hides the real one). Serving sites from a registrable domain of their own, apart from the dashboard's, is still the stronger separation. The upgrade that introduced these names signs everyone out once (session, preview and history cookies). - The dashboard's session cookie is
SameSite=Lax, notStrict: the preview sign-in hand-over reaches the dashboard by a link opened from mail or chat, and aStrictcookie would not come with it.
Content
- Local images must be raster images. SVG and remote image URLs are refused.
- A disabled source (
"enabled": false) has nofoliwake source disable|enablecommand yet: usefoliwake site set … sources.<n>.enabled, the dashboard or coresources.disable/sources.enable. A local Markdown folder cannot be disabled. A Drupal editor integration bound to a disabled source fails its «Update preview» with the sync's reason. - Each connector supports a defined part of its source: published Drupal articles, explicitly mapped Google Docs, Markdown from Git or a Drive folder.
- Git text with Drive images (
git-markdownwithdriveImages, not accepted yet; see connect a Git repository):- A change in the Drive art folder alone starts no sync (no Git push, no Drive notification is watched): run
foliwake source syncor Update source preview, or schedule syncs. - Every sync lists each Drive folder on the way to a referenced picture (one request per folder and page of 1,000 files), even when nothing changed; only the downloads are saved.
- A picture without Drive's
sha256Checksum(verified by MD5) has no fingerprint: its page is read and the picture downloaded in every sync. - Files committed to Git below the prefix are ignored with a warning, but the engine still downloads them (the Git acquisition has no path exclusion).
- The Drive files each page used are recorded in the snapshot (
observed.drive_art_<n>in the snapshot manifest); nofoliwakecommand shows them yet. foliwake art pullneeds the source in a local project configuration and its credential variables set in the shell; it copies the whole folder (no per-lesson selection) and downloads one picture at a time. It checks a local file again right before replacing it, but a save in the instant between that check and the replacement can still be overwritten.- Art keys (
art:<key>): the shared library (art-library.jsonin the Drive art folder) is downloaded in every sync, and an entry withoutsha256andtypecosts one Drive request per variant and sync. Before a picture is downloaded, its folder chain up to the art folder is checked: one more request for a pinned entry and one per folder that the sync did not list (cached per sync); a sync that downloads nothing checks nothing. Locally, a page gets its country's variant only when itscountryfield is known (front matter or local mappings), else the default. Markdown editors cannot showart:images yet: some Markdown editors resolve only relative paths; it would need to read the same rule (_art/<country>/<key>.<ext>, else_art/default/…, from the folder that holds_art/, the country from the front matter or a configured default) and the filesfoliwake art pullwrites. Pages that are not rendered (renderPages) do not list their art keys inimages. - Checked with a fake Google Drive only. Against the real Drive it ran once, read-only, on a sandbox folder that holds no picture: sign-in and the folder listing worked; a real picture download is not checked yet.
- A change in the Drive art folder alone starts no sync (no Git push, no Drive notification is watched): run
- The Google Drive Markdown connector is in use on a live site, but it is still off by default: an operator turns it on in the plugin list. It does not follow Drive shortcuts, and its page identity setting cannot be changed after the source is created. See connect a Google Drive folder.
- Google Docs documents in a Drive folder are read only with
docs: read(defaultskip: skipped with a warning) andidentity: file-id. A document is one page with one tab (a second tab is an error); one document per language (ru,en,ka), no language tabs. A document and a Markdown file with the same name in one folder are an error of both pages: the sync is refused until one of them is moved. A document's fingerprint is its Drive version: a change to the site's block definitions reaches an unchanged document only with a full sync. Pending suggestions are not published, comments are not read. Every image of a document that is read is downloaded again, four at a time: Google gives an inserted image no fingerprint to compare, and an image ondocs.google.comcosts two requests (a redirect to*.googleusercontent.com). On the dev server one lesson with about 14 images took about 9 s to read while its images were downloaded one by one. - A scoped sync (
sources.syncwithscope.itemsorscope.pages, fast preview) reads the named items, but the connector still lists the whole source to find them: Drive and Docs list the folder tree as a full sync does, so a scoped sync saves the reads of unchanged pages, not the listing. Every other item is kept by its unchanged content fingerprint or read; a source without fingerprints (cli-push, a first sync) reads everything. A page that is new upstream is not in any selected snapshot, soscope.pagesrefuses it: sync its whole source.foliwake source synchas no--itemsor--pagesflag until the@foliwake/clipackage adds them; pass the scope with--input '{"site":"…","target":{"source":"…"},"scope":{"pages":["…"]}}'. - Images inserted in a Google Docs document are downloaded only from Google's image hosts over https without a port:
*.googleusercontent.comand exactlydocs.google.com. An image ondocs.google.commust come back as an image (a sign-in or other page is refused withSOURCE_FORBIDDEN: share the document or its folder with the source's account), and its only redirect that is followed is one to*.googleusercontent.com. An image on any other host is refused (SOURCE_UNSUPPORTED); the refusal names the host and the first folder of the path so the host can be reviewed and added. Thedocs.google.compath is checked only with test fixtures, not yet in a real sync. - Block tables in Google Docs (
block | <name> [word], then<field label> | <value>rows): fields hold text, bold, italic, code and pictures inside text (not in a heading field or a code field), no links.pageandsectiontable values are plain text (formatting is dropped). A quote is an indented paragraph, so a paragraph indented only for looks becomes a quote. A link to the site's own host becomes a root path, but a page whose document did not change keeps the links it was read with until a full sync (the hosts are not part of a document's fingerprint); a link to another lesson's document is published as its Google Docs address (not rewritten to the lesson's page path); table cells hold one line each (cell alignment is not read); every Heading 2 is a slide; a slide's ID is a typed{#id}, else a stored named range (fw1:slide:…, read but no longer written), else the slug of its heading text; an answer's is a typed{#id}, elsefw1:opt:…, else its label (idValues) or place (a1); horizontal lines are dropped. There is no sidebar to insert blocks: copy a table from another slide. The standalone Google Docs connector (an explicit page list) still writes no blocks and stays refused on a site withauthoring: blocks-v3. - Variant labels: a Google Docs caption may name a variant by its label (
Вопрос (лампы теплицы)), but Markdown takes the variant's name only (:::question lamps), anddrive to-docsstill writes the name in the captions it makes. AvariantIdsmismatch is a warning, not an error: the page publishes and the site decides what it shows (the lessons site, a plain list). - Sidekick edit links: a caption with a link to
https://sidekick.foliwake.org/edit(that host on the default port and that path, https only), over the whole caption or part of it, is read as its text with the link ignored and a trailing «✎» dropped; the link text is caption text (only the «✎» goes). Nothing is served at that address, the Sidekick extension catches the click.drive to-docsdoes not write these links, and a document it rewrites loses them until Sidekick adds them again. Only a block's caption reads it so (in the older two-column table, the name cell); a link to that address anywhere else is handled like any other link (a block field still takes no links). - Slide IDs from heading text (slugs):
drive strip-idsmodels Google's handling of its requests locally (one batchUpdate that deletes text, inserts{#id}and deletes columns, from the end backwards; a merged row of a block form assumed to shrink by one column). One real document (a question prompt with a bold word in a merged cell) changed although that model said it would not; the exact change is not known yet. Since then--applyruns the requests on a Drive copy first and writes nothing when the copy differs. The cause, seen on such a copy: deleting a form's ID column makes Google drop bold and italic (true or false) from the runs of the merged cells it moves (colour and size stay). The batch now puts back the styles that are on (bold, italic, underline, strikethrough, small caps, baseline, link, font) right after each table's column requests; other fields Google might drop are not known yet. Deleting the column also re-creates an inline image of a moved merged cell as a new object (watering_dark), so a form that holds an image keeps its ID column, emptied and narrowed to 6 pt (the answer column widened by as much): it shows nothing, but the table keeps three columns. It sees links of a page to its own old slide IDs, not links from other pages or the app (…/lesson#intro): the ledger's old → new list is what to fix them with.drive to-docstypes an answer's{#id}only when its text or place would not give it; the lessons site'squestionhasidValuesonly for its lamps, so direction answers keep a typed ID until it has them too. Editing a heading changes its slide's ID, and nothing reports it yet: a preview warning "slide ID changed from X to Y" against the published version is planned (it needs the published page in the sync/preview diagnostics, which are being reworked). The transliteration covers Russian, Ukrainian and Belarusian Cyrillic and Georgian; other non-Latin scripts (Greek, Armenian, …) are left out of the slug, so a heading only in such a script getsslide,slide-2, …: such lessons need a typed{#id}for stable links. - Stored (invisible) slide and answer IDs: checked only with fixtures in the shape of the Docs API, not yet on real documents. Not yet tried: what undo, "Make a copy", suggestions, a fully retyped paragraph, a deleted or duplicated table row and a document imported from Word do to named ranges, and whether the indexes
drive to-docscomputes for its local check match Google's. Copying or cutting and pasting a slide or answer drops its stored ID (the copy gets the slug of its heading, or its label or place). An answer about directions whose text is not one of the block's labels gets its place (a3), so its arrow is not drawn: there is no error for it until authors pick directions in a form (planned: a Docs add-on). The lessons site'squestiondefinition hasidValuesonly for the lamps oflamps, none for directions yet.drive stamp-idsassumes Google shrinks the merged rows of a block form when it deletes its ID column (a refusal leaves the empty column); the ID column of a block form without answers stays (it is merged, so it shows nothing). A slide added by hand gets the slug of its heading. foliwake drive checkchecks one Google Docs document as a sync's reader would, but locally: the source's credentials are unknown (a credential in the text is not detected), images are stand-in bytes unless--images, the page is compiled alone (links to other pages are not resolved against the site, path conflicts and ownership are not checked), and the source's rule values apply only with--mappingsand--source-path. It prints these as "not checked".--docneeds the owner's OAuth client and a browser consent (drive.file); agents can pass a saveddocuments.getJSON with--input. Listing parity with sync is incomplete: ignore rules and the subfolder-prefixed path limit can be judged differently, the 32-folder depth limit is not checked, and without--source-patha title containing/is read as folders.foliwake drive to-docsmoves one lesson, or with--treeevery page of one language into a new folder tree, from the local Drive for desktop folder, and needs your own OAuth client ("Desktop app", scopedrive.file) to upload. Its check is exact (same body, title and description), but what Google's Word import keeps (styles, alt text, image bytes) is checked only when the real document is read back: a re-encoded image is a difference. Word files carry PNG, JPEG and GIF images only;id,path,templateorauthoringin front matter, code blocks, HTML, a list inside a quote, two quotes in a row, table column alignment and a---that starts no slide keep a page in Markdown. A loose list (blank lines between its items) becomes a tight one, so its page differs. A link to a page of the site needs--site-url. The check accepts two differences as notes: a heading whose ID differs (a slide's ID is the slug of its heading text in Google Docs; a link to the old ID is still a difference), and a line break inside a paragraph that becomes a space (the same text in a browser, other HTML). There is no template document generated from the site's blocks yet.--treemoves pages into a new tree only (new Drive files, so new page IDs); pointing an existing source at the new folder is refused (SOURCE_BINDING_CHANGED), so the new tree is a second source under a path prefix (--path-prefix /v2) beside the old one; there is no rebind that keeps the old page IDs and history at the old addresses.source addhas no flag for"docs": "read": it is set withsite setafter the source is added. A long upload asks for consent again after 50 minutes (no stored token).- In
foliwake server, the Drupal editor integration reads/data/foliwake.connections.jsonwhen the server starts: a changed file, or a new site it names, needs a restart. It does not follow the site store, and the connections are not managed from the dashboard or the CLI. - A new source's
operatorsettings (a Drupal on a private host:operator.allowPrivateHosts) are accepted from the installation's owner insources.probeandsources.add(an organisation admin's are refused,OPERATOR_ONLY); thesource addflags for them, for a Drupal list title and Google Docs pages, a source that fails its check not being saved without--force, andsource checkof a candidate come with the next@foliwake/clirelease. - (demo) The source
site createmakes for the project'scontent/owns the whole site (/): another source can be added only after narrowing it (site set sources.0.owns '["=/"]'). - (demo) Block fields cannot hold links (blocks-v3 inline: text, bold, italic, code), so a block such as a hero with buttons keeps its links outside the block.
- The Drupal editor integration updates preview with a full sync of the Drupal source. It has no preview of unsaved moderation drafts, and no unpublish or rollback from Drupal.
Publishing
A server fetches the commit CI names only over HTTPS, with a read token stored as
<SITE>__CODE_TOKEN; SSH deploy keys are not supported.credential listdoes not show these tokens.On a site with a repository,
code deploy,code prepareandbranch updaterelease only a commit on the allowed branch (code.deployBranch, or the preview's branch and<code.buildPrefix><branch>), named by its SHA (full or short) or as that branch itself; tags, other branch names and forms such asHEADor<sha>~1are refused. The server asks the repository for that branch's tip on every such request, also when its checkout has the commit, so the repository must be reachable.code deployitself still needs the full SHA.The starter workflows of
create-foliwake0.8.0 deploy withnpx @foliwake/cli code deploy,FOLIWAKE_SERVERand a CI key, and have no rollback (a CI key cannot roll back). (demo) The "Next steps" thatsite create/connect --createprint still describe the old SSH secrets (BRANCH_PREVIEW_SSH_KEY, …) and suggest a private repository and a code token; a public repository needs no token (checked: a commit the server had never seen was fetched without<SITE>__CODE_TOKEN). The starter README shows branch preview addresses without--<org>, says the CLI is not public, and itsaccount keys createexample lacks the required--label.A site created without
--repositorygets its repository later from the installation's owner (site set code.repository <url>;codeis the installation's field, an organisation admin cannot set it): the server checkout'soriginthen follows, andcode deploy --revadds a missingoriginbefore it fetches. Anoriginthat names another repository is never replaced (CODE_REPOSITORY_MISMATCH).(demo) A site default dialect (
site.yamlauthoring: blocks-v3) applies to the pages of every source, and a site with a Drupal or Google Docs source refuses it: every code prepare fails withCODE_RELEASE_INVALIDuntil the key is removed and the pages name their dialect in their front matter.create-foliwake0.8.0 writes that default; its next release does not (its pages nameauthoring: blocks-v3).foliwake previewandoperation getnow give the reason (The pushed code could not be prepared: …).In a folder linked to a site,
foliwake page checkchecks the site's pages on the server; with--content <dir>it checks local files (from the next@foliwake/clirelease; until then--config foliwake.config.json). A local check shows page paths in its messages; a check over HTTP still shows<path>.foliwake devserves<path>.plain.htmllike preview and live (no headers of a release: it has none).CI keys (
account keys create) are managed from the CLI against a server (--server), not in the dashboard, and not withfoliwakeinside the container. A key expires 365 days after it is made (at most 730 days withexpiresInDays);@foliwake/cli0.8 has no--expires-inflag and its plainaccount keys listdoes not show the expiry (--jsondoes). A key made before keys had an expiry has none and works until it is revoked: rotate it (CI key expiry and rotation). There is no single rotate command: make the new key, update the CI secret, then revoke the old key.A site has one preview. While new code waits there, an author's preview of a few pages is refused.
Branch previews show branch code over the shared preview content; their pages are not rebuilt against the branch code.
There is no page-level rollback.
release rollbackrestores a whole earlier site release, code and pages.Refresh work kept while no cache is configured stays pending; there is no command to retire it.
A preview of one page (fast preview) still makes about 23 store requests, whatever the size of the site (the published-pages ledger alone reads 10 objects), and it reads every page's front matter to check paths and links (about 0.2 s of CPU for 230 simple pages; about 3.9 s on the dev server for its 461 lesson pages). Measured locally with 60 ms per store request: 1.3 s for one page of 230 unpublished pages, 1.6 s for one page of 230 live pages (3.7 s and 481 requests before copies of live were trusted). A preview whose base was committed by another server or a restored state database still checks every object it keeps or copies from live, one request each. Publishing still compiles the page again instead of copying the previewed objects.
«Preview this page» (fast preview) is on each page row of the Pages table and the tree view, and in the page drawer. It syncs the page's own source for that page, then previews that page; a page that is new upstream is in no selected snapshot yet, so it is found only by updating the whole preview. Core has no single operation for it: a client calls
sources.syncwithscope.pages, thenchannels.previewwith the samepages(two operations); the engine'sfoliwake preview <page-id>… --syncdoes both, with the source credentials of its environment as the dashboard does. It is far from the 3 s goal on the dev server: one lesson document of the 227 in its Docs folder took 52 s from the CLI (about 40 s from the dashboard). Besides the image downloads and the copies of live (both reduced since), the scoped sync listed the whole Drive folder (3.4 s) and copied every other document of the snapshot (3.2 s); both are gone now (documents found by file ID, snapshots linked). Measured on the dev server after that: 34 s, of which the sync 19 s (the document and its images 4.9 s, retained documents 2.7 s, every page of the source compiled 4.9 s) and the preview 15 s (every page of both sources scanned twice, 4.3 s each; the store's capabilities probed again 1.4 s). Since the page cache (state directorycache/pages, entries swept after 14 days unused), a page whose bytes, path mapping, images and compile code are unchanged is not parsed or compiled again: only changed pages are, while the site checks (duplicate IDs and paths, link targets) still cover every page; not yet measured on the dev server. An engine run without a build id (from sources) uses no cache. Still open: the ledger read twice in a sync (1.3 s). Retained documents are still read and checked for credentials, but their image references come from the page cache by the document's digest instead of a parse each. A new CLI process no longer probes the store when a success of the same store configuration was recorded in the state directory withinFOLIWAKE_CAPABILITY_CACHE_TTL_MS(default 10 minutes, at most 1 hour); a longer lifetime is not decided.A sync of named Google Docs documents (
docs: read, file-ID identity, as «Preview this page» andpreview <page-id> --syncdo) finds them by file ID and does not list the Drive folder. Every other page is kept as the selected snapshot has it, not verified for live: publishing such a page syncs it by ID first. Until the next sync without a scope (the dashboard's Sync,source sync) lists the folder, such a sync does not see new documents, two items with one name in a folder, a document and a Markdown file that claim one page file, or a renamed folder above a kept page. Naming a Markdown file still lists the whole folder. Drive'schanges.listfeed (listing only what changed since the last sync) is not used yet: every sync without a scope lists the folder.Source snapshots are hard links to read-only, content-addressed objects in the site's state folder (
objects/sha256/…): a sync keeps unchanged files as links, and a preview or publication pins the snapshots with links, in<state>/tmp, instead of copying them. This needs one file system: across file systems the files are copied as before. Snapshots taken before this change are linked as later syncs keep their files. After every accepted sync, that source's snapshots are removed unless selected, named by a recorded preview or publication (any of the history, so they are never removed while that history exists), among the last 3 used, or used in the last 7 days; then the objects no snapshot links.foliwake source gcshows the same for every source (--applyremoves). There is no way yet to drop old operations' claims on snapshots.
Author view (/_foliwake/view/<document>)
- Only Google Docs documents of
google-drive-markdownsources with"docs": "read"can be viewed. Markdown files of a Drive folder, thegoogle-docsandgit-markdownplugins and Drupal have no single-item read yet (VIEW_UNSUPPORTED). - A view is compiled with the live code only: there is no
?code=cd_…for prepared code, and branch hosts (<name>.<site>.<preview domain>and<branch>--<site>.<domain>) do not serve views: branch code runs there, and a view reads the source as the visiting author. - A view checks the page alone. Links to other pages, page paths taken by other pages (
CONTENT_PATH_DUPLICATE) and image sizes and types are not checked (preview checks them); images are shown at the size the document gives, or a default size, and every image name in a view ends in.pngwhatever its type. - Renderings and image links are kept in the memory of the server process only (a view for 20 minutes, an image link for 25): after a restart, or once a link has expired, the page is read again on reload. Two server processes do not share them.
- A kept rendering is reused only while the document's Google Docs
revisionIdand its Drive version are the ones it was read at, so an edit shows on the next reload. That check is two Google requests on every reload (the Drive metadata and therevisionId), one more than a Drive version check alone. Google may give a newrevisionIdwithout an edit (it is per reader and valid for about a day), and Drive moves its version minutes after an edit; either only costs one more full read. Therevisiona view names (version:N, also in itsfoliwake:viewmeta tag) is Drive's version, which lags behind edits by minutes. - Google gives the
revisionIdonly to a reader with edit access to the document. When the source's Google account can only read it, no rendering is reused: every reload reads the document in full (never a stale page, but slower). - A reload that arrives while a view of the same document is still being read gets that read's answer, even with
?fresh; an edit made during that read shows on the reload after it. - Every view opens a new plugin session, so it asks Google for an access token each time (one request more than needed). A folder renamed in Drive keeps its old name in views for up to 5 minutes.
- The dashboard has no link to the view yet; the browser extension is the way in.
Author extension API (authors.locate, authors.previewPage)
authors.locatefinds a document only in the selected snapshots: a document no sync has read yet (a new one in the folder) is not found until its source is synced. Whether the document changed upstream since the last sync is checked only forgoogle-drive-markdownsources (one Drive request, at most 2 s,sourceChecked); for other sourcesdiffers: sourcecompares the last sync with the preview, andsources.pendingdoes the upstream check. A document moved out of the source folder still answers from Drive until the next sync.- A page's
previewandlivestate is the channel's current head that holds the page, not the release that last wrote the page, and there is noby(who wrote it). - Problems are the codes the page's preview records (blocks shown as problem boxes), not the full diagnostics of the last preview; those are in the result of the preview operation.
authors.locatereads every site the grant covers, one after another; a site whose state or store cannot be read is left out of the answer (the server logs it). Branch hosts (<branch>--<site>…) are not recognised.authors.previewPagedoes not link its sync to the operation: if the server stops during the sync, recovery saysNOT_STARTED(preview and live unchanged) although the source's selection may have moved on.- Page previews of a site wait for each other up to 2 minutes, then are refused (
PREVIEW_BUSY). - The key class follows the client name the sign-in asked with (
foliwake-extension); it shortens the key's life and narrows its procedures, and is no proof of which program holds the key.
Delivery
- The Varnish of
foliwake docker install --cache varnishlistens on a port of its own: your proxy sends the live hosts there (custom live hosts too). A site created since the last reload is served uncached for a few seconds.deploy/docker/compose.yaml(by hand) has no Varnish service; usefoliwake dockerfor it. - The Worker origin serves one site per deployment: its site, cache host, token issuer, keys, limits and live address are deploy variables, not a table of sites read from the installation.
- The host of resized images is set per site (
media.cdnBase) and again in an application'sfoliwake.remote.json(app.media.base); there is no installation-wide media host, and an application does not read it from delivery. - Varnish is the cache tested end to end. Cloudflare purge by tag and the Worker origin are available but are configured and operated by you (deploy the Worker origin). Other CDN adapters do not exist yet.
- Operators provide and secure their own storage, backups, HTTPS and access protection. A preview exposed beyond loopback needs HTTPS and a preview token.
- Wrong preview tokens (HTTP Basic
preview:<token>) are not rate-limited per client. A guess has no realistic chance:foliwake serveraccepts only tokens of at least 32 characters, and the derived ones carry 256 bits. Behind a proxy every client shares its address, so a per-address limit would lock everyone out; limit failed attempts in your proxy if you need it. - A new site's preview opens in a browser through the instance's hand-over (sign in to the dashboard), also behind a proxy with its own Basic sign-in: the proxy needs only the generic rules (
*.live→ cache,*.preview→ instance; see behind a proxy with its own sign-in). A site's preview token (for scripts and apps) is derived fromFOLIWAKE_PREVIEW_SECRET. Admins of the site see it in the dashboard (Settings → Preview token, written to the audit) and through coresites.previewToken; thefoliwake site preview-tokencommand belongs to the open@foliwake/cliand works here once the engine pins a release that has it. A server without accounts (a local project) refuses it: read the variable there. The hosted dev server's proxy still names its sites by hand. foliwake docker backupcopies the data volume only, not an S3 or R2 bucket. Its databases are each consistent, not consistent with one another; there are no scheduled backups or retention (old archives stay until you delete them), and a restore on another computer needs an installed instance there first.- Back up the bucket and the state directory together. A state upgrade can be undone only by restoring the backup taken before it.
- The blocks entry of an embedding app is declared in
components/components.json("blocks") or, for a site whose descriptor the engine generates from its block folders, insite.yaml(blocks: {entry, contract, eventPrefix}). Thecreate-foliwakestarters ship no blocks module for apps, so a new site names one only when its authors add it. - Page fields in
<head>(site.yamlhead.fields):foliwake dev --remote(a server's pages with local code) does not write the tags; of the remote document it keeps only<title>,<meta name="description">and thelang,data-html-contractanddata-templateattributes of<html>. Embedded bodies (.plain.html,@foliwake/next) have no<head>and no envelope field for them: an app reads the fields from a query index. A delivery service older than the key refuses asite.yamlthat has it (live pages answer503): update the engine and the Worker origin before a code release uses it. /.well-known/foliwake.jsonis not registered with IANA (RFC 8615) yet. On the Worker origin it names only the live address (preview: null,media.cdn: null): the Worker has no table of site settings. A change of a site's preview address or image CDN reaches cached copies withinmax-age=300; it is not purged by itself.- Registering an app hook still takes two commands (
cache.providersand the hook secret credential); there is nofoliwake site hook add <url>yet. Pages have no description for an app's metadata (X-Page-Description). FOLIWAKE_HOOKS_ALLOW_PRIVATE=1lets app hooks of every site on the server reach loopback and private addresses; there is no per-site allowance yet. On a server shared by several organisations, leave it unset.- Foliwake renders plain JavaScript and CSS components. It does not render React components or run a frontend bundler.
- Element IDs that authors write (
{#id}, section and slide IDs) are delivered without a prefix. An author can give an element the ID that site code expects, or one that shadows awindowglobal: site code must not depend on either (frontend components).
