fluent
Fluent is a Swift ORM library for the Vapor web framework that abstracts both SQL and NoSQL databases. It provides an intuitive API for defining models, building queries, and managing relationships in server-side Swift applications.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | vapor/fluent |
| Owner | vapor |
| Primary language | Swift |
| License | MIT — OSI-approved |
| Stars | 1.4k |
| Forks | 176 |
| Open issues | 25 |
| Latest release | 4.13.0 (2025-09-25) |
| Last updated | 2026-02-10 |
| Source | https://github.com/vapor/fluent |
What fluent is
Fluent is a Swift-based ORM built on FluentKit, integrating deeply with Vapor's application lifecycle and dependency injection. It supports multiple database backends through a unified query interface and includes authentication mapping helpers for Vapor's auth APIs.
Get the fluent source
Clone the repository and explore it locally.
git clone https://github.com/vapor/fluent.gitcd fluent# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Fluent models require explicit migration definitions; plan data model evolution carefully before production, as schema changes must be versioned and tracked.
- Query performance varies by backend; test eager-loading and indexes on your target database(s) to prevent N+1 queries and slow joins in production.
- Swift's compile-time type checking reduces errors, but debugging runtime query issues requires familiarity with Fluent's query DSL and underlying FluentKit behavior.
- Authentication integration requires understanding Vapor's auth APIs; plan user model and session strategy early to avoid rework.
- Dependency on Vapor's lifecycle and dependency injection container; teams must adopt Vapor conventions to avoid architectural friction.
When to avoid it — and what to weigh
- Your team is not committed to Swift — Fluent only works in Swift. If your backend must support Python, Node.js, Go, or other languages, this ORM is unsuitable; consider a polyglot-friendly solution instead.
- You require database-agnostic ORM portability across frameworks — Fluent is tightly integrated with Vapor. Switching frameworks later requires significant refactoring; if future portability is critical, evaluate loosely-coupled ORMs or raw query builders.
- Your project has high performance requirements with legacy databases — Fluent abstractions may not expose all database-specific optimization features (indexing strategies, query hints, etc.). Projects needing fine-grained control should use lower-level database drivers.
- The Vapor ecosystem is immature or underdeveloped for your use case — While Vapor is solid, it has a smaller community than Node.js/Express or Django. If critical integrations (payment processors, analytics, specialized services) lack Vapor support, integration costs may be high.
License & commercial use
Fluent is licensed under the MIT License, a permissive, OSI-approved open-source license with no copyleft restrictions.
MIT License permits unrestricted commercial use, modification, and distribution. No proprietary or commercial use restrictions apply. However, verify your Vapor dependencies (database drivers, middleware packages) for their own license terms before deploying to production.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Fluent uses parameterized queries by default, mitigating SQL injection in standard usage. However, security posture depends on correct ORM usage (avoid string interpolation in queries), database driver vulnerabilities, and access control at the application layer. Conduct threat modeling for sensitive data (PII, payments) and ensure proper authentication/authorization is implemented in Vapor handlers, not relied upon in ORM alone.
Alternatives to consider
Diesel (Rust)
If switching to Rust for performance or memory safety, Diesel is a compile-time-checked ORM. Requires a Rust backend, not a Swift one.
SQLAlchemy (Python) + FastAPI
Mature, widely-adopted ORM with extensive third-party integrations. Choose if your team prefers Python's ecosystem and don't need to be Swift-native.
Prisma (Node.js, Go, Rust, Python)
Modern, polyglot ORM with strong type safety and auto-generated client. Preferred if you need framework/language flexibility and don't require Swift-only tooling.
Build on fluent with DEV.co software developers
Fluent is ideal for Swift teams building Vapor applications with complex data models. Evaluate driver support for your database and test migrations before production. Need help assessing fit? Connect with our engineering team.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
fluent FAQ
Does Fluent support migrations and schema versioning?
Can I use Fluent without Vapor?
What databases does Fluent support?
How does Fluent handle N+1 query problems?
Software development & web development with DEV.co
From first prototype to production, DEV.co delivers software development services around tools like fluent. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source databases and beyond.
Ready to build with Fluent?
Fluent is ideal for Swift teams building Vapor applications with complex data models. Evaluate driver support for your database and test migrations before production. Need help assessing fit? Connect with our engineering team.