Skip to content

The simplest web framework and site generator you've ever seen: 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

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro

The simplest web framework and site generator you've ever seen.

Website | Try Mastro online

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.

How to run

In the browser

Build and deploy your website to GitHub Pages for free – without installing anything: Get started on GitHub.dev

Command line

If you prefer the command line, or need to run a server, install either Deno (recommended), or Node.js.

Deno

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

deno run -A jsr:@mastrojs/[email protected]/init

Node.js

Either use the Mastro template for Node.js or run:

npx xjsr @mastrojs/[email protected]/init

Deploy to production

To deploy your website, see Different ways to run Mastro.

Extensions

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.

Community / Contribute

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!

About

The simplest web framework and site generator you've ever seen: no bloat, no bundler, no client-side JS by default.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project