Mastro
June 20, 2026 ยท View on GitHub
The simplest web framework and site generator yet.
๐ค For people who care about their users and web standards.
๐จโ๐ณ Build directly on top of the browser and Node.js, Deno, Bun, or Workers.
Mastro was designed from the ground up to use modern browser and runtime built-ins (like view transitions and type-stripping), enabling a radically simpler design where everything is a route.
Minimal yet powerful
- Static site generation โ ideal for blogs, marketing sites or webshops that are fast.
- Server-side rendering โ use Mastro as a full-stack web framework.
- Everything is a route: serve JSON REST APIs, CSS, or images, with the same API as HTML.
- Composable: a router and plain helper functions โ it's that simple.
No bloat
- No overhead: implemented in just ~800 lines of TypeScript with no dependencies.
- No client-side JavaScript (until you add some): create MPA websites that load fast.
- No bundler (until you add one): your code ships exactly how you wrote it.
- No magic: use plain
<img>and<a>tags referencing asset routes. - No VC-money: no eventual enshitification โ selling is none of our business.
- No update treadmill: we use web standards instead dependencies.
- No lock-in: swap out Mastro later or fork it โ it's only ~800 lines after all.
How to run
In the browser
Deploy to GitHub Pages without installing anything: run Mastro in your browser
Command line
Deno
After installing Deno, either use the Mastro template for Deno or run:
deno run -A npm:@mastrojs/create-mastro@0.1.6
Node.js
Either use the Mastro template for Node.js or run:
pnpm create @mastrojs/mastro@0.1.6
(npm and yarn also work, but pnpm is recommended.)
Bun
Either use the Mastro template for Bun or run:
bun create @mastrojs/mastro@0.1.6
Documentation
Deploy to production
To deploy your website, see Different ways to run Mastro.
Extensions
The core of Mastro is tiny. But to get you started quickly for common use-cases, there is a growing list of extensions that are tailored to be used with Mastro. Often, it's just a single file wrapping a carefully chosen external dependency.
- Tiny libs in the
@mastrojsnamespace:- Reactive Mastro โ a tiny client-side reactive GUI library for MPAs
- markdown to HTML
- images โ resize/compress/etc.
- og-image โ generate images from text
- feed โ generate RSS/Atom feeds
- atproto โ add support for Standard.site
- api โ type-safe REST APIs and clients
- result โ a minimal
Resulttype
- Install 3rd-party packages like:
- Kysely โ type-safe SQL query builder
- Sveltia CMS โ git-based CMS
Join the community
We're looking to build an inclusive community, where people of all kinds of backgrounds and experience levels feel welcome and safe, and help each other out. A place to ask questions and learn new things.
Do you have a question, need help, or would like to talk about future plans? Please start a GitHub Discussion or chat on Stoat.
Something not working as expected or confusing? We consider that a bug. Please open a GitHub issue.