概要
SveltyCMS は、モダンで軽量な SvelteKit で構築されたヘッドレス CMS です。速度、柔軟性、拡張性を重視して設計されており、最小限のセットアップで使える高速かつ全面的にカスタマイズ可能な CMS を求める開発者に適しています。TailwindCSS、テーマ、ウィジェットを使って簡単に拡張できます。
Web・アプリ開発できること
- Collection Builder - ✅ - GUI and code-based definitions
- Typed Widget System - ✅ - Localization, validation, access control
- Multi-language (Paraglide) - ✅ - Compile-time i18n (type-safe)
- REST API - ✅ - CRUD and configuration endpoints
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナル
SveltyCMS - Headless CMS with SvelteKit Power
(Still in Development — your support is appreciated!)
A powerful Enterprise Headless CMS with SvelteKit Power
It's lightning fast, flexible and an easy to use modern content management system to provide a headless backend
This SveltyCMS headless CMS provides a powerful backend based on a modern SvelteKit 3 / Svelte 5 framework. Being designed to be database agnostic with a lean 2-version active support window, we fully support MongoDB (8.0–9.0), PostgreSQL (18.0–19.0), SQLite (3.51–3.54.1), and MariaDB (11.4 LTS–13.2) (via Drizzle ORM).
You can define Content Collections in two ways: in code or via the GUI-based collection builder. Full TypeScript support and a rich widget library make it straightforward to build custom data structures.
All widget fields support localization, validation using Valibot, and access control.
System localization uses Inlang Paraglide JS v3, a lightweight, type-safe i18n library. English and German ship by default. Additional admin UI languages can be added in Setup (writes project.inlang/settings.json and runs machine translate) or by hand — see System Languages.
We use the latest tailwindcss v4, so the CMS can be quickly optimized to your personal needs.
Backend data is available via REST API or GraphQL Yoga for fast, flexible frontends.
⭐ Key Features
| Feature | Status | Notes |
|---|---|---|
| Collection Builder | ✅ | GUI and code-based definitions |
| Typed Widget System | ✅ | Localization, validation, access control |
| Multi-language (Paraglide) | ✅ | Compile-time i18n (type-safe) |
| REST API | ✅ | CRUD and configuration endpoints |
| GraphQL API (Yoga) | ✅ | GraphQL API; Yoga upgrade path tracked on roadmap |
| Database agnostic | ✅ | MongoDB, PostgreSQL, SQLite, MariaDB (Drizzle) |
| List / count product layer | ✅ | findPage (hasMore/keyset), count modes, L1 count cache (all engines) |
| Database Resilience | ✅ | Retries, self-healing reconnection, diagnostics |
| Email Templating | ✅ | Svelte Email + SMTP |
| Roles & Permissions | ✅ | Database-backed RBAC |
| Persistent DoS Protection | ✅ | Hardware-aware rate limiting; state across restarts |
⚡ Why SveltyCMS is Both Fast AND Secure: The Zero-Tax Architecture
Most CMS architectures treat security as an expensive middleware tax: every request pays with async database roundtrips for session checks, unindexed permission evaluations, and heavy dynamic query AST builders. SveltyCMS inverts this paradigm with strict structural parity across all 4 supported database engines (SQLite, PostgreSQL, MariaDB, and MongoDB):
- Compiled Query Engine (Zero AST Allocation):
Unlike legacy stacks that dynamically rebuild query abstract syntax trees (ASTs) on every request, SveltyCMS pre-compiles database statements with cached parameter bindings (
WeakMapplans) and native BSON/Extended-JSON drivers. DB execution plans are instant. - Single-Pass Relational Batching ($O(1)$) vs. $N+1$ Cascades: Joined relational queries are coalesced into single-pass statements. This eliminates the connection-pool exhaustion that throttles traditional headless systems under concurrent traffic.
- Zero-Tax Cryptographic Security:
- Tamper-Evident Audit Chaining: SHA-256 hash chaining of mutation entries runs in-memory (< 2 µs) with asynchronous non-blocking flushes.
- Synchronous RBAC & Instant Invalidation: In-process Bitmask/Set role authorization drops synchronously on role mutation without waiting for TTL expiration or re-querying the database on every HTTP hit.
- Native Field-Level Encryption (ALE): AES-256-GCM encryption with HKDF domain separation executes synchronously in < 18 µs (< 3% write duration overhead).
- Eco-Efficiency & Benchmark Verification: Efficiency is tracked in the benchmark ledger (methodology, database matrix, and reproduction commands included), and the read-plane architecture is described in Two-Plane Core.
🚀 Quick Start
Get up and running fast:
🐳 Prefer a container? SveltyCMS does not publish a prebuilt image. Build one from the multi-stage
Dockerfilein Production deployment, or use the exampledocker-compose.example.ymlin the repository root.
- Clone and install
git clone https://github.com/SveltyCMS/SveltyCMS.git
cd SveltyCMS
bun install # or npm install / pnpm install
- Start dev server (guided installer auto-launches)
bun run dev # or npm run dev / pnpm run dev
- Open the app
- SvelyCMS: http://localhost:5173/
- GraphQL: http://localhost:5173/api/graphql
Prefer a full walkthrough? See: ./docs/getting-started.mdx
🛠️ Developer Experience (DXP)
- CLI installer auto-launches for smooth first-run setup
- Typed widgets and schema-driven collection builder
- Fast feedback loop with hot reloads and strong typing
🚀 Setup
Clone the repository
To clone our repository you need to be able to use Git.
git clone https://github.com/SveltyCMS/SveltyCMS.git
cd SveltyCMS
Install all dependencies
[!TIP] Dual-Runtime Flexibility:
- Node.js (>=24): Recommended for maximum sustained production throughput (1.8× to 2.4× higher RPS on full-stack workloads via V8 TurboFan optimization).
- Bun (>=1.3 / 1.4): Recommended for blazing-fast developer tooling, instant package installation (
bun install), test execution (bun test), and optional edge / serverless builds via nativeBun.serve.
Install LATEST STABLE Node.js (>=24) or Bun to get started. Then choose your preferred package manager:
bun
# Install bun if you haven't already
curl -fsSL https://bun.sh/install | bash
# Install all dependencies
bun install
# Development (guided setup launches automatically on first run)
bun run dev
# Production Build (Node.js runtime — highest sustained throughput)
bun run build:node
node build/index.js
# Production Build (Native Bun.serve — sub-10ms startup)
bun run build:bun
bun build/index.js
⚠️ Windows users: If bun install fails with ParserError or corrupted packages (upstream Windows Bun issue), use npm install --legacy-peer-deps instead. bun run dev and other commands work normally after install.
npm
# Install all dependencies (add --legacy-peer-deps only if npm reports peer conflicts)
npm install --legacy-peer-deps
# Development (CLI installer launches automatically if needed)
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
pnpm
# Install pnpm if you haven't already
npm install -g pnpm
# Install all dependencies
pnpm install
# Development (CLI installer launches automatically if needed)
pnpm run dev
# Build for production
pnpm run build
# Preview production build
pnpm run preview
Setup Wizard (auto)
When starting the dev server without configuration, the guided installer launches automatically:
- Smart detection via
vite.config.ts - Database configuration: MongoDB, PostgreSQL, SQLite, or MariaDB
- Admin account setup, secrets/keys generation
- Optional SMTP and Google OAuth configuration
Start with:
bun run dev # or npm run dev / pnpm run dev
Development and Production
We use the unified Vite+ (VoidZero) toolchain and support dual-target execution for both Node.js (>=24) and Bun (>=1.3):
- Development:
bun run dev(ornpm run dev/pnpm run devonlocalhost:5173) - Production Build:
bun run build(ornpm run build) - Production Server (Node.js):
npm run start:nodeornode index.cjs(standard production server powered by Node 24 V8 engine) - Production Server (Bun):
bun run start:bun(native high-throughputBun.serveruntime) orbun index.cjs(the sharednode:httpentry on the Bun runtime) - Container (self-built): no prebuilt image is published. Use the multi-stage
Dockerfileand the compose example in Production deployment. - Preview:
bun run preview(runs onlocalhost:4173) - Linting:
bun run check(oxfmt + oxlint — project-wide checks in <50ms)
| Task / Lifecycle | Recommended Runtime | Why |
|---|---|---|
| Development & Tooling | Bun | 3–4× faster cold starts, instant package management, lightning-fast bun test and oxlint. |
| Production Server (Node.js) | Node.js 24 | Maximum V8 JSON parsing/serialization performance on high-volume JSON API workloads. |
| Production Server (Bun Native) | Bun 1.3+ | Native Bun.serve event loop, zero-copy socket I/O, and native bun:sqlite performance. |
See our package.json for all available commands.
🔒 Authentication & Security
SveltyCMS implements defense in depth. The internal checklist re-checked on 2026-09-29 is ~99.9/100 (99.93). That figure is a self-assessment, not a penetration test. See Security.
Multi-Layer Protection:
- AI Bot Defense Shield — Known scanner and AI-crawler user agents, and honeypot paths such as
/wp-and/.env, receive an empty 200. A honeypot hit flags the IP. The socket is not held open. - 4-Layer Defense-in-Depth — Middleware → Dispatcher → Handler → Page Action; every layer re-validates permissions independently with fail-closed defaults.
- Enterprise SSO — Native SAML 2.0 and SCIM 2.0 support for automated user provisioning (Okta, Azure AD).
- Zero-Bias Cryptography — CSPRNG token generation with rejection sampling, Argon2id password hashing (64MB memory-hard), AES-256-GCM encryption, SHA-256 crypto-chained audit logs.
- Cross-Origin Isolation — COOP, COEP, and CORP headers on all API responses prevent Spectre/Meltdown side-channel attacks.
- Multi-Tenancy — Native
tenantIdisolation at the database adapter level with TBAC role scoping. - Granular RBAC — Role-based and field-level access control; OAuth HMAC state integrity; timing-safe cryptographic comparisons;
__Host-cookie prefix enforcement (RFC 6265bis).
You can log in with email/password, Google OAuth, or GitHub OAuth. Role- and field-based access control lets you define precisely who can view, edit, or delete content.
🎨 Modern Theming & Design System
SveltyCMS features a native Svelte 5 component library (42+ primitives) built on Tailwind 4 CSS variables with zero third-party UI dependencies.
- Swappable Admin Themes — Centralized
app.cssusing Tailwind 4@themeblocks. Replace the default color palette to give your CMS a corporate brand identity — from startup purple to enterprise blue in minutes. - Dark Mode — Native support via
mediaandclassselectors. - Accessibility-First — All components verified for WCAG 2.2 AA compliance in the Kitchen Sink validation lab.
- Zero Runtime Overhead — Components use Svelte 5 Runes (
$state,$props) with Svelteuse:actionpatterns instead of heavy state machines.
🌍 Great System Localization i18n infrastructure
We use Paraglide JS with the inlang ecosystem for type-safe system translations. English and German ship compiled. Add a language
Community review: Fink (or a PR on |
♿ Accessibility & Inclusivity
SveltyCMS is designed with inclusivity at its core, strictly following WCAG 2.2 AA and ATAG 2.0 standards, and proactively moving towards WCAG 3.0 (Functional Performance).
- Screen Reader Ready: Semantic HTML landmarks, ARIA live regions for status updates, and descriptive labels.
- Keyboard Navigation: Full support for keyboard-only users, including complex widgets like tree views and drag-and-drop interfaces.
- Cognitive Accessibility: Clear input validation, consistent navigation, and focus management.
- For Developers: We provide a comprehensive Accessibility Guide to help you maintain these standards in your custom widgets.
📋 Easily create Data Collections
Great Experience to designing user-friendly and intuitive interfaces for managing content. Full Typescript support to display all available widgets, options to create fully custom data structures.
📧 Flexible Email Templating System
Build and send emails using Svelty Email and TypeScript.
📦 Optimized Bundle Size SveltyCMS is built with modern optimization techniques resulting in a compact bundle compared to traditional CMS platforms:
| CMS Platform | Total Asset Size | Bundle Size (Brotli) | Technology Stack |
|---|---|---|---|
| SveltyCMS | 3.01 MB | 842 KB ⚡ | Svelte 5 + Vite+ |
| WordPress Admin | ~12.5 MB | ~950 KB | jQuery + PHP |
| Drupal Admin | ~15.0 MB | ~1.2 MB | jQuery + Drupal |
| Payload CMS | ~8.5 MB | ~1.1 MB | React + Next.js |
| Directus | ~6.5 MB | ~1.0 MB | Vue.js |
[!NOTE] Secure-by-Design Architecture: The 842 KB figure represents the total Brotli-compressed assets for the standard admin dashboard. By leveraging Svelte 5's zero-runtime reactivity and the Vite+ tree-shaking compiler, we achieve a highly optimized delivery where the client only receives exactly what it needs to render.
⚡ Performance Benchmarks
Self-measured suites under tests/benchmarks/ with per-DB MDX reports. Not a global “fastest CMS” ranking — numbers depend on hardware, DB, and whether you measure adapter vs full HTTP stack.
What we measure
| Area | Notes |
|---|---|
| 4 database adapters | SQLite (embedded), PostgreSQL / MariaDB / MongoDB (local containers) |
| Optional Redis L2 | Cache variants in the matrix runner |
| List / count product layer | findPage vs legacy list+count; count estimate vs exact; L1 count cache hits (~0.024 ms for count only, not full list bodies) |
| Reports | docs/project/benchmarks/benchmark_<db>.mdx |
Order-of-magnitude results (self-measured; re-run to refresh)
| Layer | Typical self-measured class |
|---|---|
| SQLite adapter FIND ONE | ~0.05–0.08 ms |
| Networked adapter FIND/INSERT (local container) | ~0.5–2+ ms (RTT-bound) |
findPage vs dual findMany+count |
~1.6–5.7× on that path (2026-08-04 matrix) |
| L1 count cache hit | ~0.024–0.029 ms (all four engines) |
Methodology and EU-safe competitive framing: benchmarks · performance architecture · two-plane core · achievements log.
How to run
# Console only (safe for normal dev)
bun test tests/benchmarks/database-performance.test.ts
# Record to report
BENCHMARK_RECORD=1 bun test tests/benchmarks/database-performance.test.ts
# Full matrix (long)
bun run scripts/benchmark-matrix/index.ts --sql
📚 Documentation
- 📖 Documentation — Guides, API reference, and architecture
- 🎯 Getting Started — Quick start guide
- 🗺️ Roadmap 2026 — In-progress vs planned work
- 🧪 Test status — What to run; CI is source of truth for pass/fail
- 🔒 Security — Architecture (self-assessment, not a third-party audit)
- 🔄 Upgrading SveltyCMS — Safe update guide
- 🏗️ Architecture: Database Resilience — ./docs/reference/database/database-resilience.mdx
- 🤝 Contributing Guide — How to contribute
🔌 Quick API Examples
REST (fetch 5 posts):
curl -H "Authorization: Bearer <token>" \
"http://localhost:5173/api/collections/posts?limit=5"
GraphQL (posts with author):
query {
posts(limit: 5) {
id
title
slug
author {
name
}
}
}
📜 License: Fair Source (BSL 1.1)
SveltyCMS is licensed under the Business Source License 1.1 (BSL 1.1) — Fair Source software that balances openness with sustainability.
What this means:
- ✅ Free for individuals & small businesses — Use, modify, and deploy in production if your organization's total finances are under $1,000,000 USD
- 💼 Paid license for larger organizations — Commercial license required if total finances exceed $1M USD
- 🔓 Future open source — Automatically converts to MIT License on the "Change Date" specified in the license file
- 🤝 Open collaboration — Source code is publicly available; contributions welcome
Who needs a paid license?
If your organization's Total Finances (revenue, funding, assets) exceed $1,000,000 USD, you must purchase a commercial license to use SveltyCMS in production.
Commercial licensing inquiries:
📧 Email: [email protected]
For more details, see the full LICENSE file.
❓ Need help?
Contact us if you're struggling with installation or other issues:
- 💬 GitHub Discussions
- 💬 Discord Server
- 🔧 Report Issues
- 📖 Documentation
- 📧 Email: [email protected]
🚀 Versioning & Release Process
For detailed information on our Git workflow, branching strategy, and commit conventions, see our Git Workflow & Automated Releases guide.
How Releases Work
SveltyCMS uses commit-driven (semantic) releases: when CI passes on main, the release workflow derives the next version from the Conventional Commits since the last v* tag — feat → minor, a breaking change → major (minor while on 0.x), anything else → patch — writes it into package.json, and publishes. You rarely bump by hand; bun run version:bump [auto|patch|minor|major|<x.y.z>] (or the --release pre-push gate) overrides the derivation when a range must release differently.
next: feat: add media gallery ─┐
fix: toolbar spacing ├─ accumulate over days/weeks
feat: image derivatives ─┘
│
merge next → main (when stable)
│
▼
CI passes on main → auto-release:
├─ derive next version from Conventional Commits
(feat → minor, breaking → major, else patch)
├─ git tag vX.Y.Z (from the bumped package.json)
├─ GitHub Release with auto-generated notes
└─ npm publish → npmjs.com (best-effort)
nextbranch: Active development — all features and fixes land here. No releases.mainbranch: Production — merged fromnextwhen stable. Releases happen automatically when CI passes (or by pushing av*tag).- Version source:
scripts/version.ts autoderives the next version from the commits since the highestv*tag, then the release tags the resultingpackage.json.bun run version:bump <kind|x.y.z>or a manualv*tag push overrides this.
Commit Convention
Every commit must follow Conventional Commits:
feat:— new featurefix:— bug fixperf:— performance improvementdocs:,chore:,refactor:,test:,ci:,security:— maintenance
Commit prefixes drive the version bump: feat → minor, a breaking change (! or BREAKING CHANGE) → major (minor while on 0.x), everything else → patch — applied to the commits since the last v* tag. They also feed the auto-generated release notes. Override with bun run version:bump <kind|x.y.z> when a range should release differently.
Verified CI Parity
Before submitting Pull Requests, ensure your changes pass all checks by running:
bun run lint && bun run check && bun run test:unit
This runs the linter (oxlint), type checker (svelte-check), and the full unit test suite (vitest) exactly as the CI pipeline does.
Thank you for helping us maintain a consistent and predictable release process!
🤝 Contributing
We welcome all kinds of contributions! Please see our CONTRIBUTING.md for details on how to get started.
💖 Sponsoring
If you find our project useful and would like to support its development, you can become a sponsor! Your sponsorship will help us cover the costs of maintaining the project and allow us to dedicate more time to its development.
There are several ways you can sponsor us:
Thank you for your support! 🙏
👏 Thanks
To all our contributors — without you, SveltyCMS would never have been possible.
⭐ Give us a star
If you like what we're doing, give us a star and share our SveltyCMS project with others!
関連プロジェクトを探す
読み込み中…