The Rust host
Pisces is a multi-site web application. An Axum server serves public pages, an embedded Gutenberg admin, and site-scoped JSON APIs. The Rust host owns data access, authentication, routing, rendering, and publishing. SQLx runs the storage layer against SQLite by default or PostgreSQL when configured.
| Component | Responsibility |
|---|---|
| HTTP and admin | Hostname routing, operator sessions, editor APIs, public pages, feeds, media, and forms |
| Store | Site records, posts and revisions, taxonomy, comments, redirects, design, extension state, and persistent jobs |
| Editor | Gutenberg block editing, media selection, publishing controls, and full-site design |
| Renderer | Block parsing, content sanitization, theme composition, public metadata, and HTML |
| Plugin host | Package validation, site activation, interface grants, worker supervision, and result validation |
Follow a public request
GET https://journal.example/field-notes/
→ TLS reverse proxy preserves Host
→ Pisces resolves journal.example to a site ID
→ public route resolves a redirect, document, or listing
→ site design and active theme supply layout and context
→ Rust renderer composes Gutenberg blocks and metadata
→ HTML response
In a network deployment the hostname selects a site. Once resolved, Pisces uses that site’s content, media, design, and package approvals. An unconfigured public hostname gets a 404. The dedicated admin hostname is reserved for operator routes.
Templates select the page structure. A single-post template can render the current title, date, and body, while blocks inside a Query Loop see the result item for that iteration. The theme can supply its own shell or use the Pisces shell. Site overrides take precedence over package defaults. On project builds with the Design v1 workflow, an explicit route assignment can select a named template before the normal hierarchy.
Follow an edit
Gutenberg runs in the browser. It produces serialized block comments with attributes and, for static blocks, saved HTML. The Pisces editor connects Gutenberg to the site’s posts, media, terms, patterns, and design documents through the admin API. Drafts, revisions, and publication live in Pisces storage.
<!-- wp:paragraph -->
<p>The spring field notes are ready.</p>
<!-- /wp:paragraph -->
Public rendering uses that serialized content with the theme and the current route. Static block markup passes through the normal sanitizer. Supported dynamic blocks use the available host context or an approved plugin.
Design edits can span templates, parts, navigation, styles, and route assignments. In the Design v1 workflow, preview and save take the same candidate changeset. Preview uses the public renderer without writing, and save rejects a stale site revision. See the design API example.
Follow an extension call
Declarative packages register features such as Gutenberg blocks and publishing fields. Their schemas drive the editor, and Pisces renders or validates the resulting data.
A Wasm package runs through a separate worker. For a dynamic block, the host selects the site’s approved package version, hands off the block attributes, and validates the returned markup tree. For a brokered interface call, it also checks the caller grant and provider policy. The guest receives inputs through a JSON ABI. Its container has no ambient network or host filesystem mounts.
Site activation + grants → Pisces broker → isolated worker → validated result
The work queue also handles asynchronous tasks such as accepted form actions and mail. A server can run the job loop itself or leave it to a separate pisces worker process. See Plugins and Hosting.
Deployment boundaries and roadmap
Single host. SQLite is local to one host, with the database and media under a persistent data directory.
Shared database. PostgreSQL can back multiple Pisces processes. Those processes also need access to the same Pisces data directory. A site is a content and package scope, while the current operator session covers all sites in one instance. Use separate deployments for separate operator trust boundaries.
Hosted scale-out. Shared object storage and automated site placement are planned work. Treat sharding, independent cells, and automated placement as architecture directions pending implementation and verification.
Third-party builders. The Design API provides discovery, route inspection, preview, and revision-checked publication for supported Gutenberg documents. Isolated third-party editor origins, native builder formats, richer assignment rules, and published design history are proposed follow-on work.