A Type-Safe, High-Performance Headless CMS for Apple-Native Teams
SwiftCMS brings Strapi's flexibility to Swift's performance — runtime-defined content types with type-safe client SDKs, built for teams shipping iOS and macOS apps.
Get SwiftCMS running locally in under 5 minutes:
git clone https://github.com/artfularchivesstudio-spec/SwiftCMS.git && cd Swift-CMS cp .env.example .env make setup # Starts PostgreSQL, Redis, Meilisearch swift run App serve --hostname 0.0.0.0 --port 8080Access the admin panel: http://localhost:8080/admin
- Email:
admin@swiftcms.dev - Password:
admin123
API available:
- REST: http://localhost:8080/api/v1
- GraphQL: http://localhost:8080/graphql (if enabled)
- WebSocket: ws://localhost:8080/ws
- Dynamic Content Types - Runtime-defined with JSON Schema validation
- Content Lifecycle - Draft → Review → Published → Archived workflow
- Version History - Track changes with diff and restore capabilities
- i18n & Localization - Multi-language support with fallback chains
- Media Management - Upload and manage images, videos, documents
- Full-Text Search - Powered by Meilisearch with typo tolerance
- Role-Based Access Control - Granular permissions for users & roles
- API Keys - Machine-to-machine authentication
- Type-Safe Swift SDK - Auto-generated client libraries
- Plugin System - Extend functionality with custom modules
- Event System - Webhooks, EventBus, and real-time notifications
- GraphQL API - Flexible queries and mutations
- WebSocket Support - Real-time updates and collaborative editing
- CLI Tools - Migration, seeding, and SDK generation
- Pluggable Authentication - Auth0, Firebase, or Local JWT
- Scalable Storage - Local filesystem or AWS S3
- Background Jobs - Scheduled posts, webhook retries, import/export
- Docker + Kubernetes - Production-ready container deployment
- OpenTelemetry - Observability and monitoring support
- Rate Limiting - Built-in protection against abuse
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ iOS/macOS │ │ Web Frontend │ │ Admin Panel │ │ (SwiftUI) │ │ (React/Vue) │ │ (Leaf/HTMX) │ └─────────┬───────┘ └──────────┬───────┘ └─────────┬───────┘ │ │ │ └───────────────────────┴──────────────────────┘ │ ┌───────────────────────┼──────────────────────┐ │ │ │ ┌─────────▼───────┐ ┌──────────▼───────┐ ┌────────▼────────┐ │ REST API │ │ GraphQL API │ │ WebSocket API │ │ /api/v1 │ │ /graphql │ │ /ws │ └─────────┬───────┘ └──────────┬───────┘ └────────┬────────┘ │ │ │ └───────────────────────┴─────────────────────┘ │ ┌───────────────────────┼──────────────────────┐ │ │ │ ┌─────────▼───────┐ ┌──────────▼───────┐ ┌────────▼────────┐ │ Content │ │ Auth │ │ Search │ │ Media │ │ Users/Roles │ │ Jobs │ │ Schema │ │ Permissions │ │ Events │ └─────────┬───────┘ └──────────┬───────┘ └────────┬────────┘ │ │ │ └───────────────────────┴─────────────────────┘ │ ┌───────────────────────┼──────────────────────┐ │ │ │ ┌─────────▼───────┐ ┌──────────▼───────┐ ┌────────▼────────┐ │ PostgreSQL │ │ Redis │ │ Meilisearch │ │ (JSONB) │ │ (Cache/Jobs) │ │ (Search) │ └─────────────────┘ └──────────────────┘ └─────────────────┘ - Installation Guide - Get started quickly
- Configuration Guide - Environment variables, auth setup, and more
- Plugin Development - Create custom extensions
- API Documentation - REST, GraphQL, and WebSocket APIs
- Examples - Blog and e-commerce starters
- iOS/macOS Apps - Native Swift client SDK generation
- Multi-platform Content - Single CMS for web, mobile, and desktop
- Agile Teams - Iterate on content structure without code changes
- Agencies - Build client sites with dynamic content requirements
- Startups - Scale from prototype to production with the same stack
- Mobile news apps with editorial workflow
- E-commerce product catalogs with search
- Marketing websites with flexible landing pages
- SaaS documentation with version control
- Multi-tenant CMS platforms
| Layer | Technology |
|---|---|
| Language | Swift 6.1+ |
| Web Framework | Vapor 4.x |
| Database | PostgreSQL 16+ with JSONB |
| ORM | Fluent 4.x |
| Cache/Queue | Redis 7+ |
| Search | Meilisearch |
| Auth | Auth0, Firebase, Local JWT |
| Storage | Local filesystem or AWS S3 |
| Template Engine | Leaf |
| Admin UI | HTMX + Alpine.js + DaisyUI |
| iOS SDK | Auto-generated Swift Package |
| Container | Docker + Kubernetes |
| Observability | OpenTelemetry |
SwiftCMS automatically generates type-safe client SDKs for your content types:
# Generate iOS/macOS SDK swift run cms generate-sdk swift \ --output ./ClientSDK \ --package-name MyAppAPI # Use in your app import MyAppAPI let client = SwiftCMSClient(baseURL: "https://api.yourapp.com") let posts = try await client.getContent(contentType: "posts")docker build -t swiftcms . docker compose up -dkubectl apply -f k8s/See Deployment Guide for production setup.
# Run all tests swift test # Run specific module tests swift test --filter CMSCoreTests # Run with coverage swift test --enable-code-coverage xcrun llvm-cov report .build/debug/AppPackageTests.xctest/Contents/MacOS/AppPackageTests -instr-profile .build/debug/codecov/default.profdataWe welcome contributions! Please see our Contributing Guide for:
- Development setup
- Code style guidelines
- Pull request process
- Testing requirements
- Blog Starter - SwiftUI iOS blog app
- E-commerce Catalog - Product catalog with search
Each example includes:
- Complete setup instructions
- Content type definitions
- Sample data
- Deployment guides
MIT License - see LICENSE file for details.
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ for the Swift Community