The simplest web framework and site generator yet.
Mastro is a minimal tool to build content-driven websites. Use web standards and plain JavaScript – work directly with the high-performance engine that is a modern browser.
- It all works the same: HTML pages, JSON REST APIs, RSS feeds – you name it.
- SSG and SSR: static site generation and on-demand server-side rendering.
- Composable abstractions: a router and a few helper functions – that's all.
- Multi-runtime: works on Deno, Node.js, Bun and Workers.
- No overhead: written in just ~700 lines of TypeScript, Mastro runs fast.
- No client-side JavaScript (until you add some): create MPA websites that load fast.
- No bundler (until you add one): your code ships exactly as you wrote it.
- No magic: use plain
<img>and<a>tags referencing HTTP-first assets. - No VC-money: no eventual enshitification – selling is none of our business.
- No update treadmill: we use web standards instead of complex dependencies.
- No lock-in: swap out Mastro later or fork it – it's only ~700 lines after all.
Deploy to GitHub Pages without installing anything: Run Mastro in your browser
After installing Deno, either use the Mastro template for Deno or run:
deno run -A npm:@mastrojs/create-mastro@0.0.9
Either use the Mastro template for Node.js or run:
pnpm create @mastrojs/mastro@0.0.9
(npm and yarn also work, but pnpm is recommended.)
Either use the Mastro template for Bun or run:
bun create @mastrojs/mastro@0.0.9
To deploy your website, see Different ways to run Mastro.
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. Usually, it's just a single file wrapping a carefully chosen external dependency.
- Reactive Mastro – a tiny client-side reactive GUI library for MPAs
- @mastrojs/markdown – generate HTML from markdown
- @mastrojs/images – transform images (resize, compress, etc)
- @mastrojs/og-image – generate Open Graph images from text
- @mastrojs/feed – generate an Atom feed
- Kysely – type-safe SQL query builder
- Sveltia CMS – git-based CMS
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.
Something not working as expected or confusing? We consider that a bug. Please open a GitHub issue.