Solo Website System Documentation
Solo Website System (SWS) is an open-source, Rust-powered website builder and deterministic compiler built for Cloudflare Workers with Static Assets, D1, and Turnstile.
Core Philosophy
SWS is designed to be a Rust app that makes Rust apps. Instead of running a heavy server-side CMS on every visitor request, SWS compiles a strongly typed site intermediate representation (sws-ir) into deterministic static HTML, CSS, and JSON-LD paired with a small Rust/Wasm edge Worker that only runs on /api/* routes.
- Accessible by construction: Native WCAG 2.2 Level AA semantics enforced during compilation and verified with
axe-coreand Lighthouse CI — never third-party accessibility overlay widgets. - Dual security-header parity: Static assets (
_headers) and Worker API responses (with_security_headers) emit byte-identical security headers. - $0 free-tier edge hosting: Built from day one to run cleanly on Cloudflare Workers free tier, D1 SQLite, and Turnstile without paid SaaS lock-in.
- Clean vertical separation: Industry-agnostic core crates are dual-licensed under
MIT OR Apache-2.0, while domain packs plug in throughsws-plugin.
Three-Plane Architecture
PLANE 1: AUTHORING & COMPILER (Local CLI / MCP + Browser Wasm)
sws-ir -> Declarative pages, sections, tokens, routes, forms
sws-css -> Pure-Rust design-token & layout CSS emitter (no MPL/GPL)
sws-compiler -> Deterministic HTML, JSON-LD, sitemap & WCAG checks
sws-plugin -> Vertical pack ABI (e.g., packs/hospitality)
sws-cli -> Unified CLI & stdio MCP server
PLANE 2: CONTROL PLANE (v0.2.0 — Optional Studio Backend)
sws-worker-studio -> Cloudflare Workers + D1 + R2 + Queues + SQLite Durable Objects
PLANE 3: PUBLISHED EDGE SITE (Cloudflare Free-Tier Edge)
Workers Static Assets -> index.html, styles.css, robots.txt, sitemap.xml, _headers
run_worker_first: ["/api/*"]
-> sws-worker-site (Rust -> wasm32)
├── GET /api/health
├── POST /api/inquire (Turnstile -> D1 -> optional Resend)
└── POST /api/newsletter (Turnstile -> D1 with CAN-SPAM consent)
Documentation Map
Getting Started
Install prerequisites, download or build SWS, run local D1 migrations, and preview your first site.
User Guide
Author site data, work with deterministic rendering, progressive-enhancement forms, and quality gates.
CLI & MCP Reference
Command reference for sws (init, build, check, export, mcp) and local workspace tools.
Vertical Packs
Understand the pack plugin model and explore packs/hospitality.
Live Showcase
Inspect the fictional shirlington-hearth-demo reference build and its accessibility and header guarantees.
Accessibility & Security
WCAG 2.2 AA requirements, dual security headers, Turnstile, D1 safety, and Rust/Wasm constraints.
Deployment
Deploy published sites and static docs/landing Workers to Cloudflare with tag-only releases and custom domains.
FAQ & Troubleshooting
Answers to common questions and fixes for local tooling, headers, Turnstile, and CI checks.
Roadmap & Licensing
Planned release milestones (v0.1.0–v0.3.0), dual MIT OR Apache-2.0 core licensing, and dependency policy.