SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
Project

Decisions

These are the choices that shape SHADE, with the reason for each, in plain words. Each one says what holds today; the full records, with the alternatives that were considered and how each decision changed over time, are in the shade repository under docs/decisions/. There are 19 records, 0001 to 0019, each with numbered points; a citation names the record and the point, such as "Record 0007, point 9" for backups. The earlier records were folded into these on 13 and 26 November 2026, and the records' index maps each old number to its new place.

What SHADE is

SHADE runs underneath client systems

Sign-in, permissions, the admin, a versioned API, collections and media, the audit and error logs, privacy and security are built in. Each project adds the official modules it needs, a module of its own and a frontend of its own, which hold only what is specific to that client. A fresh instance has no modules: website editing is one optional module, not what SHADE is. SHADE is built for internal tools and client systems of small and medium companies, and a client can always leave with their database, media, image version and module packages with source, the fiscal records the law keeps, and how to connect their outside accounts again. (Record 0001.)

The principles

  • SHADE needs no outside service to run. Every outside call is the business's choice: declared, off by default, through one outbound path with a circuit breaker, to the EU or the client's own servers unless the docs name the transfer. The one exception about SHADE itself is the update notice: opt-in, off by default, from a feed the operator chooses, and it never downloads anything.
  • One instance is one business. No instance shares a database or Redis server with another; who hosts it is an operating choice. The instance runs from the image or the Nix flake, never on a third-party edge; frontends run anywhere.
  • One mechanism per concern: one permission model, one event bus, one capabilities declaration.
  • A refusal tells the caller nothing and records why.
  • Personal data is registered where it is kept, so it can be found, exported and erased. Data the law keeps beats erasure; nothing else does.
  • The AI writes drafts; a person publishes. Users and the team never cross.
  • Core builds primitives ahead of modules, never without a user, and no product feature on speculation. First users use the public SDK only; "experimental" covers the SDK's shape, never stored data.
  • Optional means removable, except the guarantees and the business layer.
  • Modules stay apart: none imports another's server code or tables. They connect through contributions, events, calls they require and core's shared parts. Core never names a module, and a provider is named only in its driver.

(Record 0001 point 11, which names the record behind each.)

Instances and hosting

An instance is one image, Postgres and Redis

SHADE is self-hosted. An instance is one business: SHADE's one image (or the Nix flake) plus Postgres and Redis of its own. Each business has its own instance, database, uploads and backups, and nothing in core assumes a particular host. Every client runs the same image at some version, with no client branches. From 0.1.0, releases only add tables and columns, and a backup is taken before migrations, so going back one version is safe; before 0.1.0 nothing is live and names are changed in place. A module that needs a container next to SHADE names a client program; there are no side containers. (Record 0004.)

Postgres holds every record; Redis holds only work in flight

Anything that must survive, be backed up, exported or erased lives in Postgres. Redis is required on every instance, but holds only what can be rebuilt: leases, queued work, messages between containers and counters, so losing it never loses a record. Core and modules reach it only through SHADE's own interfaces. SHADE ships Valkey, a BSD-licensed server that speaks the Redis protocol, so clients face no licence questions. (Record 0007.)

A host for client code

A separate, public repository, shade-programs, runs a client's own programs beside one instance: code in any language, as containers from ready-made images. SHADE never needs it. A program declares what it needs, an admin approves it in SHADE's admin after signing in again, and each start gives it a new token limited to the actions it declared. Programs run with dropped privileges, without the Docker socket and on a network of their own. Status: accepted, with SHADE's side built; the host itself is not released yet. (Record 0006 point 2.)

Ready, live and a clean stop

Each container answers two health checks: live, when its process responds, and ready, when it can do its role's work, with the database holding every migration its image needs. A container that is stopping finishes what it started within one deadline before it exits, so updates can roll one container at a time. (Record 0004 point 13.)

Data changes in the background

An update that changes how data is stored adds the new column or table first, copies the data in the background, and removes the old one in a later update, so no ordinary update needs maintenance mode; a release that cannot wait is marked and shade update asks for --maintenance. The copy is a data migration (a background task in the admin), which core and trusted modules register in code: the worker does it in small batches, each saved with its progress, goes on where it stopped after a restart, and runs one batch of a task at a time. Admins follow, pause, resume and retry the tasks under Settings, and check that they are done before an update removes what they copied. (Record 0004 point 6.1.)

Backups with a tested restore

Once the operator names a bucket, SHADE takes an encrypted backup every day and one before each update's migrations, keeps them for a set time, and every week restores the latest one into a scratch database to prove it works. A console command restores a backup; the admin shows when the last good backup and rehearsal ran, and alerts when they are late. The operator's own database backups stay a choice. (Record 0007 point 9.)

Downloading a backup from the admin

An admin may download a backup, still encrypted, after signing in again. Each download is audited and every admin is told; there is one at a time and at most five a day. The key stays on the server, and restoring happens there, with the restore command. (Record 0007 point 10.)

Maintenance mode

An admin can switch an instance to maintenance, with a short message, and the operator can start a container in it when the database cannot be used. Visitors get the message instead of an error, admins can still work, and background work waits. A restore leaves it on until someone switches it off. (Record 0004 point 14.)

Usage limits per instance

An operator may cap storage, database size, entries, team members, users, emails a day and queued jobs, each in the environment. They are numbers, not licence keys: nothing calls home. At a limit new things are refused and nothing is deleted. API requests are only counted, so a site never goes down for being popular. The admin warns at 80% and shows the usage under Settings. (Record 0004 point 15.)

Exporting an instance

Besides the backup, an admin can export an instance as readable files: content, media, the team, users, settings and each module's data, without password hashes or secrets, so a client can leave without needing SHADE to restore anything. Importing an export, and importing from WordPress, come later. Status: accepted; the export is built before the first release, the rest later. (Record 0007 point 11.)

One client, several instances

A client gets one instance and grows it before splitting it. Separate instances per brand or country work today. Running one workload on an instance of its own, or splitting by function, needs links between instances, which the record describes; team members never share one sign-in across instances. Status: accepted; nothing to build until a client asks. (Record 0004 point 16.)

The code and the API

TypeScript, one core organised by feature, and a versioned API

SHADE is TypeScript on Node end to end, so one set of schemas checks forms, the API, frontends' types and input from AI. Core is one package organised by feature, in layers that a test enforces. Every service checks permission first, validates its input, and writes in one transaction with an audit entry; access is denied by default. The content and user APIs are versioned: a breaking change comes as a new version beside the old one, described by an OpenAPI document built from the routes. (Record 0003.)

Error messages by key

An error from the server may carry a key and its values beside its English sentence. The admin shows the message in the team member's language by its key and falls back to the sentence, which logs and other API clients keep reading. Modules may use keys under their own name. (Record 0003 point 19.)

Features as locked boxes

Each part of core owns its tables, and other parts ask it through its services; a test refuses any shortcut. Each feature declares what it needs, the optional ones can be switched off per instance, and a feature that keeps failing is paused on its own, as a module is, instead of taking the rest down. (Record 0003 point 20.)

Logs, traces and metrics

Every request gets an id that follows the work it starts. Logs are one JSON object per line; traces go to the operator's OpenTelemetry collector and metrics to a Prometheus endpoint, both off until the operator sets them up. No personal data goes into any of them. Dashboards and alerting on them are the operator's tools, not the admin's. (Record 0018 point 11.)

Our own S3 client

SHADE signs its own requests to S3-compatible storage with Node's crypto, instead of carrying the AWS SDK. It keeps the same behaviour: path or host addresses, retries after network errors and 5xx answers, and clear errors. Only static keys are supported. (Record 0008 point 13.)

Circuit breakers for outside services

When an outside service such as a payment provider, an email service or a storage bucket keeps failing, SHADE stops calling it for a short while instead of waiting on every call. Each breaker belongs to one caller and one host, so a module never trips core's. Queued work waits rather than failing, the health screen lists outside services, and an alert fires when one stays down for ten minutes. (Record 0018 point 13.)

Content and publishing

Collections, fields, languages and media

Collections are defined in code, reviewed like any change, and become real database tables. Each gets its own read, create, update, publish and delete permissions. Every collection is multi-language, with the languages a site setting. Uploads are typed by their content and stored on a local volume or S3. Data sources give pages named lists to loop over instead of calling other systems themselves. (Record 0008.)

Drafts, scheduled publishing, reviews and releases

Every entry keeps its history and can be rolled back. A scheduled publish uses the version saved when it was scheduled, run as the person who scheduled it with their rights at that moment. A role that may edit but not publish submits for review, and the AI's changes are reviewed the same way. A release is a named list of pages and entries that goes live all at once or not at all. (Record 0008.)

Full-text search in Postgres

Published entries are indexed in Postgres, with the right stemming per language and a weight per field. Sites search through the content API, and the admin and the AI search everything a team member may read. Static sites can keep Pagefind, which needs no server. (Record 0008 point 12.)

Purging caches on publish

When SHADE asks frontends to rebuild, it also purges the caches in front of them, such as a CDN: after the build has succeeded, so the old page cannot come back. Admins add the caches in the settings, and Clear cache now sits beside Rebuild now. Status: accepted, to be built. (Record 0016 point 11.)

Users, security and privacy

Sign-in, roles and permissions

Better Auth answers "who is this"; SHADE decides "what may they do". The team and users sign in through two separate setups, so a user's session never reaches the admin. Only reviewed parts of Better Auth are used, at a pinned version, behind SHADE's own rate limits, routes and tables, so it can be replaced in one module and one migration. The team has admins, editors, the AI and custom roles; API tokens are SHADE's own, hashed and shown once. The AI drafts and a person decides: it never publishes. (Record 0010.)

Users: accounts on the frontends, their roles and module routes

Visitors can have accounts, off until an admin switches them on. Modules offer routes for signed-in users and declare account roles, and core checks a user's role before the module's code runs. Users' abilities and the team's permissions never cross. Personal content renders on the server, never in a static page. (Record 0014.)

A system actor

Background work that no person started, such as scheduled publishing and retention, runs as a system actor. It holds only the actions that work needs, so a background job that tries anything else is refused, and the audit log names the work. (Record 0010 point 16.)

Module roles

A module can bring team roles of its own, such as the shop's shop manager. They hold only that module's actions, some of them locked, and admins give them to editors like any custom role. A role can manage the members of the module's other roles on the Team screen, and nobody else: core checks this, not the module. Removing the module deactivates those members. Status: accepted, built. (Record 0010 point 17.)

Privacy and the European market

The admin is in Dutch and English, and what visitors use is held to WCAG 2.1 AA. Each business's data stays in its own instance, in an EU region by default, and no outside service receives it unless the business chooses. Every kind of personal data has a retention period, and a person's data can be found, exported and erased everywhere it is kept. Analytics is an official module without cookies. Outside calls go to the EU or the client's own servers by default; a host outside the EU is the business's named choice, and the docs name the transfer. (Record 0017.)

Errors, alerts and security testing

Core keeps an error log that groups repeated errors from the server, modules and browsers. Security alerts fire on signals such as repeated failed sign-ins, new tokens, module changes and modules that stay unhealthy. A test calls every route as every kind of caller. Instead of a paid penetration test, SHADE is tested internally, on an instance set up for testing and never a client's production, with the threat models as the plan. (Record 0018.)

Exporting the audit log

An admin can export the audit log, filtered as on screen, as CSV or NDJSON, after signing in again. Spreadsheet formulas in cells are defused, each export is audited with the file's hash and every admin is told, and one export covers at most a year. (Record 0018 point 12.)

Modules and the SDK

A small kernel, first-party modules and flavours

Status: accepted on 2 December 2026 and being built in steps; today's code is partly on this shape. The decision is to cut SHADE down to a small kernel (identity, permissions, the event bus, jobs, configuration and a scoped data handle) and make everything else in core a first-party module that lives in the image, each declared as data and kept apart by an architecture test. The official modules that come as packages stay separate, are signed by a release key and are installed from a signed catalogue. An instance is described as a flavour, such as website, shop or bookings, or as bare, which installs nothing. Row-level security applies the same data rules in every module. (Record 0019.)

Modules are trusted or untrusted

Every module is installed; none is built in, and core never names one. A trusted module is signed by a key the operator lists, or approved by an admin where the operator allows it, and runs with full access. An untrusted module runs in a sandbox with memory and time limits, and reaches only its declared hosts. Admins switch modules on and off at runtime, and a module that is off cannot be reached. (Record 0011.)

One capabilities declaration, and modules act as themselves

A module declares every capability it uses, and SHADE decides which ones untrusted modules may have. The install consent is written from the declaration, and a new or wider capability asks the admin again. A module acts as itself, with exactly the actions it lists and nothing by default; the audit log names it. (Record 0011.)

The module SDK is a contract

A module imports only the SDK, which leaves out core's tables. Every name in the SDK is listed in a contract, and from the first release a name goes only after a deprecation kept for a whole minor version. The SDK carries SHADE's version, and so does every package but the Next.js, Nuxt and SvelteKit adapters: they have versions of their own, each supporting a range of SHADE versions, so a framework's new major ships without a SHADE release. Trusted modules can require other modules and add pages and widgets to the admin, each contained so a failure stays local. (Record 0012.)

Events between modules

The events a module declares for outgoing webhooks are its events for other modules too. A trusted module listens with a capability that names each event on the consent. Each delivery is a queued job written with the change, so a listener never sees a change that rolled back. (Record 0014 point 12.)

More capabilities for untrusted modules

Untrusted modules may send realtime updates, which carry no data, and notifications to the instance's admins only. Private files, outgoing webhooks and the job queue stay with trusted modules until the sandbox's limits and privacy tools cover them. (Record 0011 point 21.)

Schedules for untrusted modules

Untrusted modules may run schedules, each one a line on the consent: at most every 15 minutes, five per module, one run at a time and 10 seconds per run, in the module's sandbox. Status: built (17 November 2026). (Record 0011 point 20.)

Dashboard cards

Everything on the admin's dashboard is a card, core's and modules' alike. Admins set a default layout and each team member can arrange their own on top of it, choosing cards, their size and their settings. (Record 0012 point 22.)

Services for modules

Capabilities SHADE gives modules

Payments, email, schedules, storage, a job queue, webhooks, realtime updates and notifications are part of core, so no module depends on another for them. Each does nothing until used, and each is built with its first real user. Payments go through a hosted checkout, so card data never touches the instance. SHADE measures each module's health itself and alerts when one stays unhealthy. (Record 0013.)

Later work on one queue

Work that runs once, later or again goes on one queue. A job may wait for a set time and replace an earlier one with the same key, so a moved appointment moves its reminder. A waiting job stays in Postgres until it is due, so a Redis restart loses nothing. (Record 0007 point 8.)

Long-lived connections for module processes

A trusted module's process may keep a WebSocket or a stream open to a host it declared in its network capability's streams, under the same address rules as any other outgoing call and with limits per connection. SHADE opens a dropped connection again. Untrusted modules keep request and answer only. (Record 0014 point 13.)

Two-way connections with visitors

A trusted module may offer visitors a WebSocket route, checked like any other call before it opens: who the visitor is, the rate limit and the page's origin. Messages are small JSON checked against the module's schema, and travel between containers through Redis. One-way updates keep using Server-Sent Events. (Record 0014 point 15.)

Bounces and complaints for email

SHADE learns from its email service which addresses bounce or complain, and checks each report with the service before acting on it. Those addresses go on a blocked list that stops further mail to them. The Email screen shows the list, where an address can be unblocked or blocked by hand. Modules learn which addresses were skipped. (Record 0013 point 22.)

Frontends and the website editor

Frontends: any framework, one rendering core

Any framework talks to SHADE over the versioned API. Packages for Astro, Next, Nuxt and SvelteKit are released with SHADE, and one rendering core, held to one test suite, makes every framework render a page the same way. SHADE's own site is one frontend, in its own repository: static by default, with server-rendered parts for signed-in users. (Record 0016.)

Website editing is an official module

Building a website is the official module website, installed only for clients with a site. It keeps the pages, navigation, footer, theme, styles, component library, accessibility check, redirects and builds, and the website editor's packages are its own: core depends on none of them. Core keeps only what any module can use, such as json fields checked by the module that owns them, thread tasks, preview links, and never names the module. The module's package has a version of its own and gives module authors the editor's SDK. (Record 0012.)

Pages are a typed node tree; expressions are data, never code

A page is a tree of typed nodes, checked before it is stored: allow-listed tags and attributes, no scripts, and raw HTML only with its own permission. Every value is a literal or a binding, and text is kept per language. Components are data built in the editor. Expressions are typed data stored as JSON, so nothing a team member writes runs as code. (Record 0015.)

Styles and interactions are typed data, compiled once

Every style value is typed and allow-listed, so no free text reaches CSS. Styles are compiled once at publish into one file, where the order alone decides the cascade. Interactions are typed data too, played by one small runtime that respects reduced motion; a page without them loads none. (Record 0015.)

Accessibility is checked on the tree; only WCAG failures block publishing

A checker reads the page as it will be published, with its components and layout, and works out contrast from the site's styles. Only a WCAG 2.1 AA failure it can see, or a page it cannot read, blocks publishing; the rest are warnings. The decision is made on the server, never trusted from the browser. (Record 0015.)

Editing over the real frontend

The editor's canvas is the frontend's own edit route, rendered by the frontend's server with the same renderer as the live site, so the editor shows what the site shows. The admin sends each change as a tree operation. Any framework can offer the canvas by adding the same two routes. (Record website:0002.)

What each editor role may change

A designer may change anything, a builder also places and moves components, and a content editor changes texts and settings. Admins, editors and the AI are designers. Locks on a node protect its place, settings or styles, and the website module's tree check enforces them on every save, wherever it comes from. (Record website:0003.)

Releases and the project

Releases, docs, licence and names

SHADE's packages are published to npm under @shadestack, pre-releases under the next tag, and its image is built once per release. The docs live in their own repository and change together with the code. The code is under the Apache License 2.0. RG Digital made the name and the logo; a fork keeps the NOTICE file, and is asked not to rebrand SHADE and sell it as its own. The code, docs, site, frontend kit, programs host, desk app and the official modules (not the project and discord modules) are public. (Record 0016.)

An open project for the business

SHADE is an open project of its own, written for the businesses and organisations that run on it, and usually set up for them by a developer, an agency or a host. Whoever sets it up, the business keeps the system, the data and the setup. Anyone may host and run SHADE, commercially too, with no licence fee, key or permission, and every official module is free and public. RG Digital built SHADE and is one possible provider, not the gatekeeper. Help comes from the project, and how AI is used to build SHADE is stated openly. SHADE is built in Europe first: EU rules are the baseline, and what differs per country can be swapped. (Record 0001.)

The frontend kit in its own repository

The packages for frontends (the read client, the renderer, the tree, the styles and the framework adapters) move to a repository of their own, shade-frontend, with one version line, while what the image is built from stays in shade. Status: done on 24 November 2026. (Record 0016 point 12.)