Skip to content

The simplest web framework and site generator yet – no bloat, no bundler, no client-side JS by default.

License

Notifications You must be signed in to change notification settings

mastrojs/mastro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

243 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro

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.

Website | Try Mastro online

Minimal yet powerful

  • 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 bloat

  • 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.

How to run

In the browser

Deploy to GitHub Pages without installing anything: Run Mastro in your browser

Command line

Deno (recommended)

After installing Deno, either use the Mastro template for Deno or run:

deno run -A npm:@mastrojs/create-mastro@0.0.9

Node.js

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.)

Bun

Either use the Mastro template for Bun or run:

bun create @mastrojs/mastro@0.0.9

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. Usually, it's just a single file wrapping a carefully chosen external dependency.

Join the community / contribute

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.

About

The simplest web framework and site generator yet – no bloat, no bundler, no client-side JS by default.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project