Maat Documentation
Maat is a backend framework for Dart. It brings together routing, middleware, validation, dependency injection, database access, authentication, queues, mail, notifications, and realtime features behind one consistent application lifecycle.
If you have used Laravel, the structure will feel familiar. Maat keeps the productive conventions while using Dart’s type system, async model, and native compiler directly.
New to Maat?
Start with Build Your First Maat Application. You will create, validate, test, and run a JSON endpoint in one short guide.
Create an Application
You can create and run a new application with four commands:
dart pub global activate ptahmaat new blogcd blogmaat serveOpen http://127.0.0.1:8000 or request the generated health endpoint at
http://127.0.0.1:8000/api/health.
Why Maat
Maat is designed for teams that want a full web framework without giving up the strengths of Dart:
- Typed application code. Controllers, middleware, models, commands, and services are ordinary Dart classes.
- No reflection. The application behaves the same in development and in an ahead-of-time compiled executable.
- One deployment artifact. Production builds use
dart build cliand do not require a Dart SDK on the server. - Familiar conventions. Routes, service providers, validation rules, migrations, resources, and feature tests follow a predictable vocabulary.
- Explicit wiring. Configuration and providers are registered in code, so dependencies remain visible and analyzable.
Learn the Framework
Start Here
- Installation explains the requirements, installer, and local server.
- Build Your First Maat Application walks through a validated endpoint and its test.
- Directory Structure shows where application code belongs.
- Configuration covers
.envand dot-notation config.
Handle HTTP Requests
- Routing, Controllers, and Middleware define the request pipeline.
- Requests, Validation, and Responses cover input and output.
- Error Handling explains how exceptions become safe responses.
- Views, Frontend, and Assets cover server-rendered applications.
Store and Protect Data
- Database, Seshat ORM, and Migrations cover persistence.
- API Resources define public JSON shapes.
- Authentication and Cartouche protect browser and token-authenticated routes.
Build Application Features
- Service Container and Service Providers explain application wiring.
- Events, Mail, and Notifications connect domain actions to delivery.
- Broadcasting and WebSockets add realtime updates.
Test and Ship
- Sesh Console documents generators and application commands.
- Djed provides trusted local
.testdomains on macOS. - Testing covers the in-process HTTP client, fakes, factories, and database reset helpers.
- Deployment covers native builds, containers, proxies, and production checks.
- Coming From Laravel maps familiar concepts to Maat’s Dart APIs.
Production Model
Maat applications compile ahead of time:
dart build cli --target=bin/server.dart --output=build./build/serverThe resulting executable contains your application and its Dart dependencies. Runtime configuration still comes from environment variables, so the same artifact can move between staging and production.