Skip to content

Maat Documentation

Maat is a backend framework for Dart. It brings together routing, middleware, validation, dependency injection, database access, authentication, 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:

Terminal window
dart pub global activate ptah
maat new blog
cd blog
maat serve

Open 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 cli and 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

Handle HTTP Requests

Store and Protect Data

Build Application Features

  • Service Container and Service Providers explain application wiring.
  • Events, Mail, and Notifications connect domain actions to delivery.
  • Task Scheduling puts recurring work in Dart behind one cron entry.
  • Akhet watches the queues those jobs run on — depth, throughput, failures, and one-click retry.
  • Udjat records what a request or job did — queries, exceptions, logs, mail, and more — correlated into one batch and viewable in Vizier.
  • Mekhat renders what Udjat collected about the request you are looking at directly into the page, as an in-page request bar.
  • Broadcasting and WebSockets add realtime updates.
  • Typed Realtime Clients delivers those updates to Dart and Flutter as Stream<OrderUpdated>.

Test and Ship

  • Sesh Console documents generators and application commands.
  • Djed provides trusted local .test domains 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.

Community Extensions

Example Applications

Each one is a runnable package in this repository with its own README.

  • Todo builds a server-rendered site: routes, Khnum templates, validation, and realtime updates through Thoth.
  • Catalog exports route contracts as OpenAPI and generates a typed Dart client from them.
  • Orders delivers an authenticated broadcast to a Dart client as a typed stream.
  • Maintenance serves a JSON API and a Vizier admin panel from one application, with one field definition read by both.
  • Resident App consumes that API from Flutter using nothing but the generated client.
  • Maintenance Client is that generated client, packaged so both sides can import it by package: URI.

Production Model

Maat applications compile ahead of time:

Terminal window
dart build cli --target=bin/server.dart --output=build
./build/server

The 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.