vapor/fluent
49.4
Weak · 1 October 2026
844
lines of production code
Swift
primary language
2
measurements over time
What this system is
This system is a Swift-based database integration layer for Vapor applications, providing core infrastructure for caching, session management, and authentication. It supports both synchronous and asynchronous database operations, including migrations and query execution, while offering utilities for pagination and query history tracking. The implementation relies on FluentKit and includes comprehensive test coverage for its repository and authentication patterns.
Features
Add async/await support for Fluent operations
This change introduces Swift concurrency (async/await) support for the Fluent provider, allowing developers to perform database migrations, pagination, and authentication without blocking. Specifically, it adds \autoMigrate()\ and \autoRevert()\ methods to \Application\ for non-blocking migration execution, an \asyncCredentialsAuthenticator\ factory for \ModelCredentialsAuthenticatable\ models, an \asyncSessionAuthenticator\ for session-based authentication, and an async \paginate\ method on \QueryBuilder\.
Sources/Fluent/Concurrency · high confidence
New Fluent integration features: caching, sessions, pagination, and query history
This release adds several new capabilities to the Fluent provider for Vapor applications. You can now use the database as a cache backend via the new \FluentCache\ implementation and \Application.Caches.Provider.fluent\ registration. Session storage is supported through \Application.Sessions.Provider.fluent\ and \ModelSessionAuthenticatable\ for database-backed sessions. Pagination is simplified with a new \QueryBuilder.paginate(for:)\ method and configurable \pageSizeLimit\ settings at both application and request levels. Additionally, developers can record and inspect database queries executed during a request lifecycle using the new \Request.Fluent.history\ API, and authentication is streamlined with new \ModelAuthenticatable\, \ModelCredentialsAuthenticatable\, and \ModelTokenAuthenticatable\ protocols that provide default database-backed authenticators.
Sources/Fluent · high confidence
Test coverage
Added test coverage for Fluent integration features
Added new test suites in the Tests directory to verify Fluent integration capabilities, including cache operations (get/set), credential-based authentication (both synchronous and asynchronous login flows), custom query operators, pagination with configurable page size limits, query history tracking, repository pattern usage, and session management.
Tests · high confidence
Dependencies
Update Fluent dependencies to latest versions
The Fluent package now depends on FluentKit version 1.52.2 and Vapor version 4.117.0, ensuring compatibility with the latest features and fixes in these core libraries.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 49 (-0.4)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 46 → 43 (-2.8)
- Readiness 58 → 60 (+2.0)
- Security 43 → 43 (+0.0)
- Domain Modelling 61 → 61 (+0.0)
New (8)
- Documentation: no contributor guidance (README.md)
- Inconsistent Naming for Async Variants: ModelCredentialsAuthenticatable provides both a sync credentialsAuthenticator and an async asyncCredentialsAuthenticator. However, ModelAuthenticatable and ModelTokenAuthenticatable only provide a single authenticator method. This creates an inconsistent API surface where some authenticatable models require explicit async method calls while others use a single method (presumably sync or blocking).
- Low coverage: Sources/Fluent/Concurrency/FluentProvider+Concurrency.swift (Sources/Fluent/Concurrency/FluentProvider+Concurrency.swift)
- Low coverage: Sources/Fluent/Concurrency/Sessions+Concurrency.swift (Sources/Fluent/Concurrency/Sessions+Concurrency.swift)
- Low coverage: Sources/Fluent/MigrateCommand.swift (Sources/Fluent/MigrateCommand.swift)
- Low coverage: Sources/Fluent/ModelAuthenticatable.swift (Sources/Fluent/ModelAuthenticatable.swift)
- Low coverage: Sources/Fluent/ModelTokenAuthenticatable.swift (Sources/Fluent/ModelTokenAuthenticatable.swift)
- Redundant Protocol Definition: Both ModelAuthenticatable and ModelTokenAuthenticatable expose an identical authenticator method signature. Unless the return type any Authenticator is strictly constrained by the conforming type's context (which is not visible here but implied by the protocol name), these protocols appear to duplicate the same contract. If ModelTokenAuthenticatable is a specialized version, it should likely inherit from or extend ModelAuthenticatable rather than redefining the same method.
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
vapor/fluent was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 9ebcc17f7c60840585a6ba4740838e53029d3444 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.