Open Source Swift

Production-ready packages for modern Swift server development

Featured Packages

Boiler

Swift 6.0Alpha v0.1.0AGPL-3.0 / Commercial
boiler-badge

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)
            }
        }
    }
}
View on GitHub →

swift-html

Swift 6.0v0.0.1Apache 2.0

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
    )
}
View on GitHub →

coenttb-mailgun

Swift 6.0Production ReadyAGPL-3.0 / Commercial

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!" }
    }
)
View on GitHub →

coenttb-com-server

Swift 6.0Production ReadyAGPL-3.0 / Commercial
coenttb-logo

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.

View on GitHub →

In Development

coenttb-stripe

In DevelopmentAGPL-3.0 / Commercial

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)).

View on GitHub →

Infrastructure & Tools

swift-html-to-pdf

Swift 6.0Popular (⭐ 42)Apache 2.0

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.

View on GitHub →

swift-environment-variables

Swift 6.0v0.0.1Apache 2.0

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.

View on GitHub →

swift-authenticating

Swift 6.0v0.1.0Apache 2.0

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.

View on GitHub →

swift-translating

Swift 6.0In DevelopmentApache 2.0

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.

View on GitHub →

swift-emailaddress

Swift 6.0v0.0.1Apache 2.0

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.

View on GitHub →

swift-ratelimiter

Swift 6.0v0.0.1Apache 2.0

Protect your APIs from abuse with configurable rate limiting. Implements both token bucket and sliding window algorithms with flexible limits and seamless Dependencies integration.

View on GitHub →

swift-jwt

Swift 6.0v0.0.1Apache 2.0

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.

View on GitHub →

Web Standards (RFC Implementations)

The swift-web-standards organization provides type-safe Swift implementations of essential Internet RFCs:

RFC 7519 - JWT

RFC Standardv1.0.0MIT

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.

View on GitHub →

RFC 5321 - SMTP

RFC StandardEmailMIT

Swift implementation of Simple Mail Transfer Protocol. RFC 5321 compliant and essential for email infrastructure and mail server communication with type-safe protocol handling.

View on GitHub →

RFC 5322 - Email Format

RFC StandardEmailMIT

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.

View on GitHub →

RFC 7617 - Basic Auth

RFC StandardAuthMIT

HTTP Basic Authentication Scheme implementation. RFC 7617 compliant with secure credentials encoding/decoding and proper HTTP header handling for standards-compliant authentication.

View on GitHub →

RFC 6750 - Bearer Token

RFC StandardOAuthMIT

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.

View on GitHub →

More RFC Standards

RFC StandardsCollectionMIT

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.

View on GitHub →

Supporting Libraries

These packages are part of a comprehensive Swift web development ecosystem. Visit the GitHub repositories for more packages including: