Production-ready packages for modern Swift server development
The Swift server framework that gets you from idea to production in record time. Start with zero configuration, then scale seamlessly to production complexity.
Built on Vapor (used by Apple) with type-safe HTML, routing, and dependencies throughout. Its modular architecture lets you compose exactly what you need, when you need it.
import Boiler
@main
struct Server {
static func main() async throws {
try await Boiler.execute {
HTMLDocument {
h1 { "Hello, World!" }
.color(.accent)
}
}
}
}
Write HTML & CSS with the power and safety of Swift. Catch errors at compile-time, not runtime.
Features SwiftUI-like syntax that feels native to Swift developers, with dark mode built-in and zero runtime overhead. All validation happens at compile time, and it renders efficiently as bytes or String.
import HTML
let page = HTMLDocument {
h1 { "Type-safe HTML" }
.color(.primary)
div {
p { "Compile-time validation" }
.fontSize(.rem(1.2))
}
.backgroundColor(
light: .blue150,
dark: .blue900
)
}
Professional Swift SDK with 100% Mailgun API coverage. Battle-tested with 200+ tests in production environments.
Built with modern Swift 6 concurrency (async/await throughout), type-safe from end to end, and includes dependency injection for easy testing.
import Mailgun
@Dependency(\.mailgun.client) var mailgun
let response = try await mailgun.messages.send(
.init(
from: try .init("hello@yourdomain.com"),
to: [try .init("user@example.com")],
subject: "Welcome to our service!"
) {
h1 { "Welcome aboard!" }
}
)
The production source code for coenttb.com, showcasing real-world usage of the Boiler framework and swift-html DSL in a live production environment serving thousands of users daily.
This repository demonstrates best practices for building modern Swift server applications with features including type-safe routing, PostgreSQL database integration with migrations, user authentication (coming soon) and session management (coming soon), transactional email via Mailgun, and RSS/Atom syndication feeds.
Built with a modular architecture that separates concerns into reusable packages, making it an excellent reference for developers looking to understand how to structure and deploy production-grade Swift web applications. The codebase includes comprehensive environment-based configuration, Docker deployment support, and Heroku compatibility out of the box.
Type-safe Swift SDK for Stripe payment processing with 100% API coverage. Production-tested with 200+ tests, built with modern Swift 6 concurrency, and integrates seamlessly via dependency injection (@Dependency(\.stripe)
).
Lightning-fast HTML to PDF conversion for iOS and macOS. Handle thousands of documents concurrently with customizable margins and layouts. Seamlessly embed images and create professional PDFs from your HTML content.
Type-safe environment variable management with support for JSON and .env files. Features environment-aware overrides, required keys validation, and seamless Dependencies integration for clean dependency injection.
Type-safe HTTP authentication with URL routing integration. Supports both Basic and Bearer auth, features a composable architecture, and is fully testable with comprehensive mocking support.
Comprehensive internationalization with 180+ languages support. Features intelligent fallback chains, type-safe translation API, localized date formatting, and proper plural forms support for natural language handling.
Type-safe email address validation and domain modeling. RFC-compliant validation ensures you never store invalid email addresses. Features compile-time safety and seamless integration with swift-authenticating.
Protect your APIs from abuse with configurable rate limiting. Implements both token bucket and sliding window algorithms with flexible limits and seamless Dependencies integration.
JSON Web Token handling for secure authentication. Sign, verify, and decode JWTs with multiple algorithm support, claims validation, expiration handling, and a type-safe API.
The swift-web-standards organization provides type-safe Swift implementations of essential Internet RFCs:
Pure JWT implementation without cryptographic dependencies. RFC 7519 compliant, lightweight, and universally cross-platform compatible. Features fast parsing and inspection with easy mocking for testing.
Swift implementation of Simple Mail Transfer Protocol. RFC 5321 compliant and essential for email infrastructure and mail server communication with type-safe protocol handling.
Internet Message Format standard implementation. RFC 5322 compliant parsing and validation of email headers, addresses, and message structure. Includes date/time parsing and comprehensive header field validation.
HTTP Basic Authentication Scheme implementation. RFC 7617 compliant with secure credentials encoding/decoding and proper HTTP header handling for standards-compliant authentication.
OAuth 2.0 Bearer Token Usage implementation. RFC 6750 compliant and essential for modern API authentication with proper authorization header parsing and OAuth 2.0 support.
Additional RFC implementations including DNS (RFC 1035), Internet Host Requirements (RFC 1123), Email Date Formats (RFC 2822), and International Email (RFC 6531). A growing collection of essential web standards.
These packages are part of a comprehensive Swift web development ecosystem. Visit the GitHub repositories for more packages including: