A web framework for sites that outgrew static hosting
Websites with a bit of crunch.
Write a folder of pages. Crisptastic runs them per request, then ships the whole site as one signed, encrypted file. No app server to write. No runtime image to build. More time for snacks.
$ crisptastic init my-site && cd my-site
$ crisptastic dev
The track listing
Two sides. Side A is what you write. Side B is how it gets out of the door.
Side A · Build
- Pages are files
blog/[slug].html.crispis/blog/:slug. The file name is the route and the content type. - Runs per requestOutput can depend on the URL, the form, the cookies and the session. Not a pre-baked bundle.
- Fetch and shape
@fetchan HTTPS JSON API, check.ok, reshape it with@shape. Failure doesn't throw. - Forms and sessions
@session,@cookie,@redirect. Effects apply only if the page finishes.
Side B · Ship
- Seal a Capsule
crisptastic deploywraps your site and secrets into one signed, encrypted file. - One host, many sitesA single program behind your reverse proxy serves each Capsule by exact domain.
- A store per siteA site that needs data gets its own embedded store. It can't reach anyone else's.
- Rate limits on the routeDeclare them in config. Over the line gets a
429before your page ever runs.
{{-- blog/[slug].html.crisp -> /blog/:slug --}}
@fetch post = get_json("https://api.example.com/posts/" + request.route.params.slug)
@if (post.ok) {
<h1>{{ post.value.title }}</h1>
{{~ post.value.html }}
} @else {
@status 404
<p>No such post.</p>
}
That's the whole page.
No controller, no build step to babysit, no framework in the browser unless you add one. Save the file and crisptastic dev reloads it.
- 1 The file name gives the route and
text/html. - 2
@fetchcalls the API. A failure doesn't throw, so you checkpost.ok. - 3
{{ }}prints escaped values.{{~ }}prints markup you trust. - 4
@statussets the response code. Nothing applies unless the page finishes.
Nutrition Facts
Serving size: 1 site · Servings per host: many
| Amount per site | |
| Files you ship | 1 |
|---|---|
| App servers you write | 0 |
| Runtime images you build | 0 |
| Per-site proxy configs | 0 |
| Browser framework shipped | 0g |
| Host processes to run | 1 |
Ingredients: pages, partials, Markdown, Sass, sessions, SDA, Auth0, Stripe Checkout, S3, Cloudflare Images. May contain traces of preview (Fabric clustering).
Allergy advice
We'd rather you find out here than in production. Crisptastic is not suitable if you need:
- WebSockets or response streaming
- Background jobs or long-running work
- Your own server code in the same process. Run a separate API and call it
- Mutually untrusted tenants on one host
- A mature, certified platform. This one's still young, and hasn't had an independent security review
Pick a flavour
Everything you need to decide, learn it and run it. It's all here, and none of it is behind a form.