vapor
Installation
SKILL.md
Vapor Best Practices
1. Concurrency
- ALWAYS use Swift Concurrency (
async/await) overEventLoopFuture. - All route handlers MUST be annotated with
@Sendable.
2. Controllers & Routing
- Organize routes into
RouteCollectionconformances. - Do not put logic in
routes.swift; delegate immediately to a Controller. - Group routes by feature (e.g.,
UsersController,AuthController). - Register controllers:
app.register(collection: MyController()). - API versioning:
app.grouped("api", "v1").
3. Middleware
- Use
AsyncMiddlewarefor custom middleware:
Related skills
More from tryswift/try-swift-tokyo
tca
Expert guidance on The Composable Architecture (TCA) for Swift, focusing on ReducerProtocol, macros, and testability.
32ignite
Guidelines for building static sites using the Ignite Swift framework.
14swift-concurrency
Definitive guide for Swift 6+ Concurrency, strictly enforcing Sendable, Actors, and Structured Concurrency.
14skip
Guidelines for Android development using the Skip framework (Swift to Kotlin transpilation).
1asc-submit
Build, archive, export, and upload the try! Swift Tokyo app to App Store Connect for iOS, macOS, and visionOS using ASC CLI.
1playwright
Patterns for Playwright E2E testing with custom fixtures, role-based selectors, and assertion patterns.
1