Skip to content
Margin

Margin

Publish a documentation folder as a searchable, versioned site.

Margin is a modern, agent-first framework for documentation. It turns Markdown and MDX into a documentation site backed by Postgres. It builds navigation from your files, accepts supported Mintlify configuration, and exposes the same content to readers and agents.

Start with one page

A documentation folder needs only one page:

docs/
└── index.mdx

Write a heading and some prose. The framework derives the title, URL, sidebar, and default appearance. Add docs.json when you need a display name, explicit navigation, colors, or other configuration.

Run locally

From the repository root, with Bun and Docker installed:

bun install
cp .env.example .env
docker compose up -d --wait postgres
bun run db:migrate
bun run dev

Open http://localhost:3000. Edits under docs/ trigger ingest while the dev server is running. The database uses port 5440 by default.

Choose the next step

This documentation is itself a folder the framework ingests. The same validation, content-versioning, and serving rules apply to your site.