Vapor helps teams build JSON APIs, web backends, and sites in Swift using an async, type-safe routing model on top of SwiftNIO.
Overview
Vapor is an HTTP web framework for the Swift language. It targets server-side projects such as REST APIs, backend services, and websites where teams already use Swift on Apple platforms or want one language across client and server.
The core framework sits on Apple’s SwiftNIO stack and uses Swift concurrency for non-blocking request handling. Developers declare routes, decode parameters and query strings, and return typed responses while leaning on compile-time checks to catch many mistakes early.
Adjacent official packages extend the ecosystem: Fluent for database models without hand-written SQL, JWT helpers, and the Leaf template engine for HTML or email generation. Hundreds of community packages integrate databases, authentication, and tooling.
Documentation and examples cover creating projects with the Vapor Toolbox, wiring persistence layers, and deploying HTTP servers. Production users include retail, research, and developer-tool companies that standardize on Swift for their backend tier.
Key features
- SwiftNIO-based HTTP server core
- Async route handlers
- Strongly typed request decoding
- Fluent ORM integration
- JWT signing and verification helpers
- Leaf HTML templating
- Large Swift package ecosystem
- Vapor Toolbox project scaffolding
Use cases
- JSON APIs in Swift
- Shared language client-server stacks
- Server-rendered Swift websites
- Auth token services with JWT
- Prototype backends for Apple platforms