vapor

Installation
SKILL.md

Vapor Best Practices

1. Concurrency

  • ALWAYS use Swift Concurrency (async/await) over EventLoopFuture.
  • All route handlers MUST be annotated with @Sendable.

2. Controllers & Routing

  • Organize routes into RouteCollection conformances.
  • 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 AsyncMiddleware for custom middleware:
Related skills
Installs
15
GitHub Stars
195
First Seen
Feb 28, 2026