Core and the website module
Every instance runs SHADE's core. Website editing is one module, website, installed only for clients with a site.
Core depends on none of the website editor's packages (@shadestack/tree, styles, expressions, render,
interactions, a11y; pnpm lint refuses an import of one in shade/), keeps no site structure and never names the
module. The website module uses core only through the module SDK, as any module does. This page says which side each
part is on; the Architecture page has the rest of the code's layout.
What core is
| Part | What core does |
|---|---|
| Content | Collections and their entries, drafts, versions, publishing, languages, media, data sources, where entries live (paths) and the content API (Collections, The API). |
| json fields | A field that holds a module's own document: { kind: 'json', check: '<plugin>:<check>' }. Core stores the value, finds the media and links in it, and runs the owning module's check (fieldChecks: check, empty, changes) on every create, save, restore and publish. What the value means is the module's: core never reads it. While no module that is on has the check, the field can't be saved or published (json fields and their checks). |
| Thread tasks | Slow work of a trusted module (threadTasks, run with runThreadTask) in a worker thread with a time and memory budget, so it never holds up the API (Thread tasks). |
| Preview links | Preview tokens signed for a module (createPreviewToken, readPreviewToken) and the origins the admin may frame (adminFrames) (Previews). |
| Modules' read models | A module's read routes under its own prefix (/api/v1/content/<plugin>) and its keys in the site data, served with core's tokens and caching (The content API). |
| The rest | The team, users, permissions, the audit log, email, the queue, webhooks, files, notify, the module manager and AI over MCP. |
Core's own site data, GET /api/v1/content/site, holds the settings, the words the frontend packages show in its language
(words: the skip link, the widgets' own words, the consent banner and an embed's notice, from core's language files),
the modules that are on, consent, the outside
sources of modules' site parts and whether visitors can have accounts (PublishedSiteData). Core's test suite runs
without the website module.
What the website module is
| Part | What the module does |
|---|---|
| Page builder | Pages, posts and their item templates, headers and footers as node trees kept in json fields (its check website:tree), the component library and the starter components, the visual editor and its canvas. |
| Editor roles | What a designer, a builder and a content editor may change, and the locks on a node, held on every save by its tree check. |
| Theme and styles | The theme (colours, fonts, sizes, web fonts; its default DEFAULT_THEME), the site's styles compiled on publish, theme.css and styles.css. A frontend without the module gets no theme from SHADE and styles itself. |
| Navigation and footer | Its singleton collections website-navigation and website-footer, given in the site data as its keys navigation, footer and links, with theme and fontFaces. |
| Accessibility | The publish check on a page's tree (@shadestack/a11y), run as its thread task accessibility; errors refuse the publish. |
| Version history | What changed in a page's tree, node by node, through its field check's changes, in the version history, reviews and AI changes. |
| The rest | Redirects, the site's builds, the Preview address and the page tools for AI assistants. |
It reads pages to frontends as @shadestack/render's shapes (PublishedPage, PublishedLayout, PublishedTheme),
from its read models under /api/v1/content/website. The canvas messages between the editor and a frontend's edit
route are @shadestack/tree/canvas's (The website editor's canvas).
For admins, the module is described in the guide: Website.
The website module's package
The module is the package @shadestack/module-website, with a version of its own, apart from SHADE's, as the
framework adapters have: its CHANGELOG.md says per release which SHADE versions it works with (its module SDK range
and its manifest's shade range, ^0.1.0 today). Besides the module, it gives module authors the website editor's
SDK, @shadestack/module-website/sdk and /sdk/testing: see The website module's SDK.