Skip to content
Eric Bailey edited this page Jun 6, 2021 · 7 revisions

Presta is a minimalist serverless-first web framework. You can use it to build static and dynamic pages, entire APIs, or even small portions of larger websites and applications. Its small size and simplicity means it can fit into tight spaces, while it's low-level approach allows it to be used as the foundation for larger projects. Thanks to esbuild, it's also extremely fast.

Presta is boring — it doesn't even care what frontend framework you use (if you use one at all). That's what makes it fun!

And, you can get started right now from your command line. Create a file, then run presta watch.

// index.js
export const route = '*'
export async function handler () {
  return '<h1>Hello world!</h1>'
}
npx presta watch index.js

Why another framework

If the web is a series of layers, then the thinner our layer is the easier it is to see the one beneath. Where did we come from, where are we going, how much will a beer cost when we get there. Most "modern" ways to build websites have become gardens with higher and higher walls. Escaping them is hard, and there aren't many options out there that allow us to mix and match schools of thought.

These thick layers obscure where we came from and where we're at now. And that's probably both good and bad.

Good because it makes it hard to fail, but bad because what's good for devs isn't always good for end users.

We need think more about what's "simple by default" and "fast by default". We should embrace new patterns that make our lives easier, without setting up new barriers that keep out other devs and other end users. Sprinkle of new, with healthy helping of old.

The foundations are now sufficiently complicated enough on their own that it seems foolish to go add more optional complexity on top of it - Frank Chimero

What makes it different

Clean abstractions that initially draw us in often turn cumbersome when we try to eject from convention-heavy frameworks. Presta tries to avoid this pitfall by prescribing almost no convention at all.

Files, pages, API endpoints — everything is defined the same way in Presta: a serverless function. Below is a hybrid (static and dynamic) HTML page and API endpoint built alongside each other.

And since Presta doesn't build a frontend runtime for you (again, think hard if you need one), it doesn't care what you use. Vue, Svelte — yes, even React — et al are all great options to partially hydrate portions of a page into interactive features. Esbuild yourself a bundle(s) of joy, add them to your pages generated with Presta, and you're ready to go.

Because Presta focuses only on the low-level plumbing, it harbors very little complexity. In fact, it's less than 2k lines of library code right now. This makes maintenance and contributions easy!

And since it's so low-level, it leaves us a lot of room to build up from here.

Roadmap

Presta is small and aims to remain small. Though it's under active development, the core API is stable and probably won't change in the foreseeable future.

At the moment the roadmap is made up of a few things:

  • core stability and further performance improvements
  • better deployment story, with easy multi-platform support
  • establish ecosystem of companion libraries (already WIP)

Goals

Create a fun and inclusive community of people who like to make nice pieces of internet that are good for everyone (and the environment, when we can).

Clone this wiki locally