The simplest web framework and site generator you've ever seen.
Static site generation and on-demand rendering of HTML or JSON – it all works exactly the same in Mastro: a file-based router, and a handful of composable functions to return standard Response objects. No magic, no config – just focus on building awesome websites.
- No bloat: written in just ~700 lines of TypeScript, Mastro is a framework distilled to its essence.
- No client-side JavaScript (until you add some): create MPA websites that load blazingly fast.
- No bundler (until you add one): your code arrives in the browser exactly how you wrote it.
- No magic: use normal
<img>
and<a>
tags referencing HTTP-first assets. - No VC-money: this forces us to stay lean and prevents eventual enshitification.
- No hosting offer: selling a service is not what we're interested in.
- No update treadmill: we use web standards instead of relying on many dependencies.
Build and deploy your website to GitHub Pages for free – without installing anything: Get started on GitHub.dev
If you prefer the command line, or need to run a server, install either Deno (recommended), or Node.js.
After installing Deno, either use the Mastro template for Deno or run:
deno run -A jsr:@mastrojs/[email protected]/init
Either use the Mastro template for Node.js or run:
npx xjsr @mastrojs/[email protected]/init
To deploy your website, see Different ways to run Mastro.
The core of Mastro is tiny. But to get you up to speed on common needs, there is a growing list of tiny extensions that are tailored to be used with Mastro.
- @mastrojs/markdown
- @mastrojs/images
- @mastrojs/feed
- Reactive Mastro – a tiny client-side reactive GUI library for your existing MPA or Mastro project.
It’s still early days. But we’re looking to build an inclusive community of all kinds of people, united by a shared passion for crafting websites.
Something not working as expected or confusing? Would you like to contribute or have a question? Please see open issues and don't hesitate to open a new one to start a conversation!