SwiftData for Server-Side Swift

Share your SwiftData models between iOS apps and Vapor servers. Write once, run everywhere with 100% API compatibility.

Same Models, Everywhere

Define your models once and use them on iOS, macOS, and your Vapor server.

// Works on iOS, macOS, and Server
@Model
final class User {
    var name: String

    @Attribute(.unique)
    var email: String

    @Relationship(deleteRule: .cascade)
    var posts: [Post] = []

    init(name: String, email: String) {
        self.name = name
        self.email = email
    }
}

Why SwiftDataServer?

100% API Compatible

Use the same @Model, #Predicate, FetchDescriptor, and ModelContext APIs you know from SwiftData.

Multiple Backends

PostgreSQL, MySQL, and SQLite backends. Choose the database that fits your needs.

Vapor Integration

First-class Vapor support with request-scoped contexts and automatic migrations. Swift 6 ready, Swift 5 compatible.

Relationships

Full support for one-to-many and many-to-many relationships with automatic join tables.

Automatic Migrations

Schema changes are detected and applied automatically. No manual migration files to write or maintain.

Powerful Predicates

Filter queries with #Predicate macros. Type-safe, composable, and identical to Apple's SwiftData syntax.

Ready to get started?

Ship your full-stack Swift app faster with shared models.

Purchase License - $500