
Fast backends in Dart
Everything your Dart backend needs.
Build APIs and full web apps in Dart, with batteries included. Routing, an ORM, validation, auth and a CLI work from the first command. One command adds the rest: queues, mail, GraphQL and more. Your app uses every CPU core and ships as one small native binary.
The speed comes from the native server. It runs on the isolate's own thread, so a request never waits for another thread. See Performance for every route and how it was run.
What you get
-
Fast by default
A native HTTP server, one isolate per CPU core and streamed bodies.
dox buildmakes one native binary. See Performance. -
ORM and query builder
Models, relations, migrations and transactions for Postgres, MySQL/MariaDB and SQLite. Postgres and MySQL use native drivers. See Database.
-
Typed validation
Write a
@Dtoclass. Dox checks the input and gives your controller a typed object. See Validation. -
OpenAPI
OpenAPI 3.1 docs and a Scalar docs page, made from your routes and DTOs. See
dox_openapi. -
File storage
Local disk, S3 and Azure Blob Storage behind one API, with signed URLs. See
dox_storage. -
Cache
Memory, file and Redis cache with tags and locks. See
dox_cache. -
Real time
Socket.IO, with Redis for many servers.
-
Security
JWT authentication, CORS, encryption and hashing.
-
CLI
Create projects, controllers, models and migrations. Run, build and migrate. See CLI reference.
One path for every request
- Routematch the URL
- Middlewarego on or stop
- DTOcheck the input
- Controlleryour code
- Viewrender a page
- Responsesend the answer
Each card is a page in "The basics". See How Dox works for every step.
What the code looks like
Route.post('/blogs', (BlogController c) => c.store);
@Inject() // 1
class BlogController {
BlogController(this.blogs);
final BlogService blogs;
Future<Blog> store(CreateBlog input) { // 2
return blogs.create(input);
}
}
@Dto() // 3
class CreateBlog {
@Length(min: 3, max: 100)
final String title;
@MinLength(10)
final String body;
...
}
- Dox makes the controller and gives it the service it asks for. There is no reflection and no list of classes to keep.
- Ask for the DTO as a parameter. Dox reads the JSON body, checks it, and gives you a typed object. Bad input gets a
422before your code runs. @Dto()marks an input class. The code generator writes the checks from the fields, their types and their rules.
Run it in two minutes
You need Dart 3.13 or newer, and nothing else. The starter project uses SQLite, so there is no database to install.
That is a Dox app. Next, follow the tutorial. It adds a model, a database table, validation, login and a Docker image, one short step at a time.
The CLI is not found?
dart pub global activate puts dox in $HOME/.pub-cache/bin.
Add that folder to your PATH. See Installation.
Pick your path
-
New to Dox
Then Routing, Request, Validation
-
Coming from Laravel
Then How Dox works
-
Looking for one answer
Uploads, auth, Docker, pagination. Then Reference
-
Going to production
Then Docker, Troubleshooting
Get help
- Found a bug or have a question? Open an issue on GitHub.
- Using an AI assistant? Install the package skills, or give it llms-full.txt: all of these docs as one plain text file. See AI agents.
- Want to help? Read Contribute.