Why Mastro?
The JavaScript ecosystem has been moving to ever more complex frameworks and build systems. But this isn’t necessary anymore.
- Browsers now have bfcache and MPA view transistions. SPAs have peaked.
- Native CSS features replace much of SCSS.
- Node.js supports TypeScript type stripping and file watching out of the box.
- With ES modules in all browsers, bundling shouldn’t be the default anymore.
Design Principles
-
Mastro is for people who care about their users, and value accessible websites that load fast – even on low-end phones and slow networks.
-
Mastro is for people who care about the web and understand it as its own medium.
- A webpage is not a printed page with fixed dimensions.
- Mastro is designed to work with the grain of the web. Write semantic HTML, and progressively enhance it with beautiful CSS and interactive JavaScript.
- Mastro is primarily designed for content-driven websites, and not for apps that download megabytes of client-side code and reimplement basic browser functionality.
-
Mastro is for people who care about simple and pragmatic technology.
- Instead of towers of leaky abstractions, Mastro gives you direct access to the underlying platform: the browser and your JavaScript runtime.
- No magic: simple things should be simple, and complex things possible.
- Mastro grows with you: it is a beginner-friendly static site generator, but can morph into an unopinionated full-stack framework running database-driven REST APIs and rich client-side interactivity.
- Explicit separation of server and client-side. Code and secrets that were intended to stay on the server shouldn’t accidentally end up in the client bundle.
- Everything is a route – Mastro provides a uniform interface for all content types: HTML, JSON, XML, binary, whatever. Instead of being abstracted away, the full power of the HTTP protocol is at your disposal through the standard Request/Response API.
-
Mastro is for people who care about their dependencies.
- Mastro will never take on VC-money and there will be no eventual enshittification.
- Mastro’s implementation is low-maintenance and so small that you can read it in an hour or two. Should you ever outgrow it, you can simply fork it and adjust things to your needs.
- Mastro is modular. If you prefer e.g. another templating engine, use that instead.
- Mastro has a tiny API-surface, which is already very stable. Once we hit v1.0, the public API will get frozen, so that projects that depend on Mastro aren’t stuck on an update-treadmill.
- Additional packages in the
@mastronamespace may have higher rates of change, and we invite the community to create additional packages on top of the standard Request/Response-API.