System Architecture
The architectural blueprint of SveltyCMS β from the Svelte 5 (Runes) engine to the DB-agnostic adapter pattern.
On this page
SveltyCMS is built with the βHigh-Performance Edgeβ philosophy: zero-runtime overhead, sub-1ms API hot-paths, and the Self-Healing State Machine for automated recovery.
ποΈ Core Engine & Lifecycle
The heart of SveltyCMS β from the reactive Svelte 5 engine to the request processing pipeline.
- βοΈ Component Lifecycle β The 15-stage middleware pipeline in SveltyCMS.
- π Initialization Workflow β The step-by-step startup process for the CMS.
- π§ͺ Self-Healing State β The systemβs resilience state machine (IDLE β READY).
- π Code Structure β Directory organization and internal module boundaries.
- π‘οΈ Security Overview β Protecting against SSRF, command injection, and CSRF.
ποΈ Database & Data Architecture
Database agnosticism and unified data modeling.
- π Database Adapters β Overview of the unified query abstraction.
- π MongoDB Implementation β Native Mongoose integration.
- π PostgreSQL Implementation β Native DDL and Drizzle integration.
- π¦ SQLite (Edge-Ready) β Native Bun driver for local deployments.
- 𧬠Content Type System β Fields, widgets, and schema mapping.
- πͺ Schema Lifecycle Hooks β
beforeValidate/afterValidateon create & update. - π¬ Transactional Outbox β Atomic events with content mutations + webhook fan-out.
- π Validation & Feedback β Real-time E2E verification logic.
- π Data Operations β Six-domain architecture for config promotion, content packages, migrations, importers, backups, and content sync.
π¦ Content & Collections
The modular reconciler and reactive content delivery system.
- π¦ Content System β The modular reconciler, initializer, and reactive polling.
- π§± Collection Builder β The UI-driven schema management engine.
- π§ͺ Self-Healing State β The systemβs resilience state machine (IDLE β READY).
- πΊοΈ URL Patterns β Dynamic routing and path resolution strategy.
- π Compilation Pipeline β Transform path for collection definitions.
π§© Modularity & Extensions
How SveltyCMS handles widgets, plugins, and custom logic.
- π§© Widget Architecture β The 3-pillar strategy (Definition, Input, Display).
- π Plugin Architecture β The hook-based extension system.
- ποΈ Plugin Storage β Shared JSON record store (zero per-plugin tables).
- π¦ Media Hub β Storage adapters, AI processing, and focal point management.
- βοΈ Cloud Storage β Integration with AWS S3, Google Cloud, and DigitalOcean.
π Multilingual & Internationalization
Zero-runtime overhead internationalization using Paraglide JS.
- π Language Architecture β Multi-locale routing and message compilation.
- π€ Data Loading β How translated content is loaded efficiently.
π¨ Frontend & UI System
Design tokens, screen state, and preloading strategies.
- π Aesthetics & Design β Modern UX principles and Tailwind v4 design tokens.
- π₯οΈ UI & Screen State β Responsive layout management.
- π¨ Hover Preloading β Sub-millisecond navigation via predictive fetching.
- ποΈ Toast & Notification β The global user feedback system.
π‘οΈ Authentication & User Management
Identity, tenancy, and authorization flows.
- π Authentication System β OAuth, 2FA, and passkey architecture.
- π₯ Multi-Tenancy β Native
tenantIdscoping for physical data isolation. - π·οΈ Tokens & Cache β JWT management and session invalidation.
- π€ User Overview β Role-based access control (RBAC).
π‘ Monitoring & Telemetry
System visibility and performance tracking.
- π‘ Telemetry Ecology β The global health and usage tracking network.
- π Metrics Implementation β Back-end metric collection and reporting.
- π Logger Levels β Level-gated logging: right signal, low cost, no spam.
Next Steps: Review the Request Lifecycle to see how every API call is gated by the 15-stage middleware pipeline.