An open format and embeddable engine for relational reporting — where every report is a portable query graph, a materialized SQLite table, and a parametric layout.
MAD is an embedded relational reporting platform for ad hoc query, reporting, and design: the MAD Designer and MAD Viewer apps for iOS and native macOS (AppKit), the headless engine that runs them on Linux and macOS, and the open .mad document format. A .mad file holds a report’s whole definition — the database schema snapshot, the query graph (tables, joins, predicates, groupings), and the banded layout of its elements — in under 100 KB, cleanly separated from the materialized SQLite table (.maddb + .mdcache) it produces on refresh.
The code is at github.com/mthomason/MAD, MIT-licensed; the names and app artwork are not covered by that licence (see NOTICE).
Try MAD Designer on macOS (macOS 12.0+, Apple Silicon):
- Homebrew:
brew install --cask mthomason/tap/mad-designer
Direct Download: MAD-Designer-macOS.dmg MAD-Designer-macOS.zip (for direct downloads, run xattr -cr "/Applications/MAD Designer.app"once after copying to/Applications)
MAD Designer for macOS — native AppKit desktop application (NSDocument, visual table/join query canvas, interactive section minimap and banded report designer, and paginated PDF/HTML/CSV/JSON report viewer):


MAD Designer for iOS, from choosing a data source to reading the finished report in MAD Viewer:
The same engine headless on Linux: inspect, schema, query, refresh, and
export through the mad CLI, with no database server and no credentials:

The recording’s exported report is plain HTML, opened in any browser.
.mad file packages the
schema contract, the query AST, and the presentation layout into one
inspectable, diffable artifact that produces byte-identical SQL and exports
across Apple and Linux.libpq, SQLite — plus
libarchive/bzip2 and zint for barcodes. No reporting SDK is being
resold.MADDataTableFast) and computes two-pass groupings
and aggregates from there, so paginated rendering stays fast within a
phone’s memory..mad container is a bzip2 tar archive holding a portable SQLite store;
no Apple framework is required to open it..mad formatRead the introduction to the specification first, or jump to a chapter:
What a document is ·
The container ·
The store ·
Reading and writing ·
Companion files ·
Hazards ·
Normative v1 ·
Open questions ·
Verification
AppKit desktop app:
visual query canvas, banded report designer with minimap and inspector,
paginated viewer, and how to build or package it from source.mad CLI — inspect,
refresh, and export a .mad from Docker in one line..mad in GitHub Actions and upload its export; mthomason/mad-action@v1.MADDatabase, register the
driver, return rows.Vision — reports as composable database tables, multi-source
queries in a single report, native UIKit data views beyond the paper paradigm,
and converting legacy Crystal Reports (.rpt) into open .mad files.
The MAD Designer app — the report designer built on this engine — has its own site at mad.everydayapps.com.