Perfect is a family of Swift 6 packages for HTTP servers, databases, sessions, email, push, FileMaker, and payments, each released and tested on its own for macOS and Linux.
Overview
Perfect is a modular set of server-side Swift packages for building networked applications and the services they depend on. Capabilities span HTTP and HTTPS serving, database connectivity, authentication sessions, outbound email, push notifications, FileMaker integration, payment helpers, and everyday utilities.
Each package targets Swift 6 with strict concurrency, keeps dependencies small, and documents requirements and Package.swift integration per module. Most components run on macOS and Linux; several data-access packages also support iOS. Starter templates wire common pieces such as the NIO-based server, CRUD helpers, MySQL driver, and logging.
The HTTP server package offers composable async routes, WebSocket support, TLS with per-domain certificates, and graceful restarts on top of SwiftNIO. Database packages cover relational and document stores, SQLite, Redis, and FileMaker. Utility packages handle tasks like XML processing that older monolithic versions bundled internally.
The original all-in-one PerfectLib framework is preserved only on a legacy branch and is no longer maintained. New work should consume the split packages, migrating away from deprecated helpers such as Perfect-CURL or Perfect-Thread toward Foundation and Swift concurrency APIs documented in migration notes.
Key features
- SwiftNIO-based HTTP and HTTPS server
- Async composable routing and WebSockets
- MySQL, PostgreSQL, SQLite, Redis drivers
- CRUD helpers and ORM-style access
- Sessions, sign-in, and email utilities
- Push notification support
- FileMaker connectivity package
- Per-package Swift 6 releases
Use cases
- REST APIs written entirely in Swift
- Swift backend sharing code with iOS apps
- Database-backed Linux or macOS services
- TLS-terminated web services on SwiftNIO
- Migrating legacy PerfectLib projects