SveltyCMS Documentation
Complete documentation for SveltyCMS - a powerful, modern Headless CMS built with SvelteKit and Svelte 5. Designed for both users and developers.
Last updated: 10/5/2025
SveltyCMS Documentation
Welcome to SveltyCMS - a powerful, modern Headless CMS built with SvelteKit and Svelte 5. Our documentation is designed with two clear goals:
🎯 Documentation Goals
👥 For Users: Understand Every Feature + Feel Confident About Security
- Complete feature guides with security confidence
- Built-in safety features explained
- Best practices for secure content management
🛠️ For Developers: Understand How SveltyCMS Works
- Deep dive into architecture and systems
- Implementation patterns and best practices
- Extension and customization guides
📚 Choose Your Path
👥 User Guide - Features & Security Confidence
Perfect for content creators, editors, and administrators who need to:
- ✅ Use Features Safely - Complete guides with security best practices
- ✅ Manage Content - Create, edit, and publish with confidence
- ✅ Understand Security - Built-in protection features explained
- ✅ Troubleshoot Issues - Safe solutions to common problems
Key Security Highlights:
- 🛡️ Enterprise-grade authentication (JWT + OAuth)
- 🔐 Role-based permissions and access control
- 🔒 Encrypted data storage and transmission
- 📊 Audit logging and activity tracking
🛠️ Developer Guide - How It Works
Essential for developers who need to understand:
- ⚙️ System Architecture - How components work together
- 🔧 Setup & Configuration - Automated CLI installer explained
- 🧩 Extension Development - Building custom functionality
- 📡 API Integration - REST and GraphQL implementation
Core Systems Explained:
- 🚀 Automated setup via vite.config.ts
- 🔐 JWT + OAuth authentication flow
- 🏗️ SvelteKit + Svelte 5 architecture
- 📊 Database abstraction and optimization
🚀 Quick Start
For Users (Content Management)
1. 🌐 Access your CMS URL
2. 🔑 Log in securely
3. 📝 Start creating content
4. 🛡️ Enjoy built-in security
For Developers (Technical Setup)
git clone https://github.com/SveltyCMS/SveltyCMS.git
cd SveltyCMS
bun install
bun run dev # CLI installer launches automatically
🔧 Key Features & Security
- 🎨 Modern Interface: Built with SvelteKit and Tailwind CSS
- 🚀 Automated Setup: CLI installer handles all configuration
- 🔐 Security First: JWT + OAuth with granular permissions
- 📱 Responsive: Works seamlessly on all devices
- 🌍 i18n Ready: Multi-language support built-in
- ⚡ Performance: Optimized for speed and efficiency
- 🔄 Reactive Content: Real-time updates with versioning
- 🧩 Extensible: Custom widgets, themes, and plugins
📖 Essential Documentation
User Documentation (Security-Focused)
- 🚀 Getting Started - Get started safely
- 👥 User Registration - Secure account creation
- 🛡️ Admin Management - Secure administration
📚 Documentation Portal
🚀 Getting Started
- Quick Start Guide - Installation and first steps
- Setup Wizard - Initial configuration
- System Settings - Global configuration
📖 User Guides
- Content Management - Managing media and content
- Token System - Dynamic content tokens
- User Management - Users and permissions
💻 Developer Resources
- API Reference - REST and GraphQL API
- Architecture - System design and patterns
- Database - Database schema and adapters
- Widget System - Custom widget development
- Testing - Test suites and workflows
🛠️ DevOps & Deployment
- Production Deployment - Server setup and optimization
- Cloud Storage - S3/R2 integration
- Security - Security best practices
🏗️ System Architecture
SveltyCMS is built on a modern, headless architecture:
- Frontend: SvelteKit (SSR + CSR)
- Backend: Node.js / Bun
- Database: MongoDB (with agnostic adapter layer)
- Cache: Redis + In-Memory
- Content: Reactive System (Versioning + Polling)
- API: REST + GraphQL
For a deep dive, see the Architecture Documentation.
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details on:
- Code of Conduct
- Development Workflow
- Pull Request Process
- Coding Standards
📄 License
SveltyCMS is open-source software licensed under the MIT License.
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Community support
- Security Reports - Responsible disclosure
📋 System Requirements
- Browser: Chrome, Firefox, Safari, Edge (latest versions)
- JavaScript: Required (security features depend on it)
- Node.js: 18+ for development
- Database: MongoDB (recommended) or PostgreSQL/SQLite
- Redis: Optional but recommended for caching
System Architecture (2025+)
Database-Driven Configuration
SveltyCMS uses a modern, database-driven approach for all configuration:
Dynamic Settings (Database)
- ✅ 58 settings across 13 groups (General, Email, Security, Cache, etc.)
- ✅ Real-time updates without server restart
- ✅ Role-based access control
- ✅ Admin GUI at
/config/systemsetting - ✅ RESTful API:
/api/settings/[group]
Static Config (Minimal)
- Database connection strings
- JWT secrets and encryption keys
- OAuth client credentials
- Environment-specific startup config
Import/Export System
Drupal CMS-inspired configuration management:
Export Configuration
POST /api/export/full
{
"includeSettings": true,
"includeCollections": false,
"includeSensitive": false
}
Import Configuration
POST /api/import/full
{
"data": { /* exported config */ },
"options": {
"strategy": "merge", // skip | overwrite | merge
"dryRun": true // validate before applying
}
}
Workflows Enabled
- ✅ Staging → Production: Export from staging, import to production
- ✅ Version Control: Store configs in git
- ✅ Team Collaboration: Share configuration files
- ✅ Backup & Restore: Daily automated backups
- ✅ Environment-Specific: Dev/staging/prod configs
Cache System
Dual-layer caching for exceptional performance:
- Layer 1 (Redis): Ultra-fast in-memory cache (~1ms reads)
- Layer 2 (MongoDB): Persistent cache across restarts
- 8 TTL Categories: Static, Dynamic, API, Query, Session, Widget, Computed, Media
- Automatic Expiration: TTL-based with configurable values
- UI Management: Configure via System Settings
See Cache System Documentation for details.
Migration from Legacy Config
Old Approach (Deprecated)
- Static config files with CLI prompts
- Hard-coded settings in code
- Manual file editing for changes
- No import/export capability
New Approach (Current)
- Database-driven settings - All config in MongoDB
- RESTful API - Programmatic access via
/api/settings/* - Admin GUI - User-friendly interface at
/config/systemsetting - Import/Export - Environment management with validation
- Version Control - Config files in git alongside code
Migration Steps (for existing installations)
- Update to latest version:
git pull && bun install - Run database migration:
bun run migrate - Export old config: Legacy settings auto-migrated
- Verify settings: Check
/config/systemsetting - Test import/export: Try exporting and re-importing
- Update deployment scripts: Use new API endpoints
New to SveltyCMS? Start with Getting Started for users or Installation for developers.