Skip to content
- Architecture overviewHow Cusp runs as one Cloudflare Worker over D1, R2, KV, Durable Objects, and Workflows — the single-deployment model, versioned writes, and the hybrid render path→
- Data layer and schemaHow Cusp shapes its single D1 database — chunked-write repository, no ORM, ULID IDs, Unix-epoch timestamps, and transparent R2 spillover for large rows→
- Auth and sessionsCusp's authentication architecture: a swappable Auth interface, Argon2id hashing, a SHA-256 KV session fast-path, admin sessions as API tokens, role-based authorisation, and a Durable Object rate limiter.→
- Versioning and time travelHow Cusp versions every entity through one write helper, keeps document history, spills large snapshots to R2, and reconstructs the site at any past instant→
- Rendering and cacheCusp's hybrid render path: pre-render to R2 at publish, edge cache with stale-while-revalidate, surrogate-key purges, and a global cache epoch for cross-colo invalidation→
- Real-time collaborationHow the DocumentSession Durable Object serialises block operations, broadcasts presence, and flushes to D1 — collaborative editing with no CRDT→
- Async work with WorkflowsCusp runs twelve Cloudflare Workflows for publishing, scheduling, imports, exports, backups, media sweeps, and search — retryable steps, no queues, no cron polling→
- Plugin systemHow Cusp sandboxes admin-installed plugins in Dynamic Worker Loader sub-isolates with a capability-driven manifest, per-plugin scoped storage, and lifecycle hooks — while keeping images, search, and email as core features.→
- Theme systemHow Cusp installs, signs, sandboxes, activates, and customises themes — signed packages in R2, a no-bindings loader, and render-time design tokens→
- Search and media in coreCusp ships full-text search on D1 FTS5 and content-addressable R2 media with optional image transformations and a retention sweeper, no plugin required→