The idea
Because writing a page should mean writing a page.
I wanted MVC at the scale of a single page: the URL is the filename, the controller and view are separate sections, and data access is built in. The feel of Ruby and the boring portability of the JVM are how it stays small. Why is the experiment that asks how small a page language can stay.
The idea
Most web frameworks need scaffolding before the first page exists: a project layout, a router, a template engine, and a set of conventions. I wanted to see what MVC looks like when the unit is the page itself.
Why puts the page's pieces in one file: imports: for shared pieces, controller: for the logic, and view: for the output. SQLite access is built in, so there is no separate model layer to set up. The URL is the filename, so there's no route table. The server parses it on request, so there's no build step. The experiment is how small a language can be and still keep logic and markup cleanly apart.
The bet: the page is the unit
If the page is the unit, the language can be tiny. A page needs a place to list shared files, a place to do the work, and a place to render. That is imports:, controller:, view: — three sections in one file.
MVC here is deliberately small. The controller and view are separate sections; data access is db.query, db.get, and db.exec, plus any shared defs you import. There is no full model layer to set up.
Everything follows from that. No router, because the path is the filename. No build step, because the server parses on request. No component system, because an import is a partial and a partial is another file. A shared header stays a file you can open and edit, not a package you have to upgrade.
The experiment was to keep pushing on that constraint: how much can a page do before it needs a framework?
The file-per-URL model will look familiar to anyone who has used PHP or ERB-style tools. The difference is that the separation is enforced by the file format: logic and markup live in different sections, so a page can't turn into tag soup.
Ruby's shape, not Ruby
Ruby gets a lot right for this kind of code. Blocks make list work read like a sentence. def is enough structure for the small functions a page needs. Truthiness is simple: only nil and false are false. String interpolation is pleasant. None of that requires the whole object model.
So Why borrows the shape and leaves the rest out. No classes, no modules, no exceptions, no package manager, no metaprogramming. A page can define functions and pass blocks; it cannot grow a framework inside itself.
The interesting part is not the interpreter. It is how much a page can do before it needs a framework.
The JVM as a boring host
The runtime should be the least interesting part of a page tool. The JVM is installed in a lot of places, virtual threads make a simple request-per-thread server cheap, and a shaded SQLite driver means the whole thing can be one jar. No native extension, no language runtime to install, no separate database service for a small site.
That is the entire deployment story: a jar and a folder. If you can run Java, you can run the site.
What I learned
The page model held up better than I expected. One file can read and write. A form, a bound SQL insert, a redirect, and a one-shot notice fit naturally in a page. Header and footer partials keep the view small. The demo guestbook is about forty lines including its HTML.
The edges were more interesting than the happy path. There is no response object, so redirect became a thrown signal. Query parameters already owned params, so forms needed a second global. Validation has nowhere to live. A flash needs state the page model did not have. A schema change has no migration story. Those edges are written down in the friction log rather than smoothed over.
The other surprise was diagnostics. A language that parses a page on every request can afford to be precise: file:line, the source line and a caret, the partial or import chain, a spelling hint. why check turns the same work into a pre-flight check. Error messages are part of the page model, not an afterthought.
What it is not
It is a proof of concept, not a production runtime. There is no sandbox — pages can run arbitrary SQL and read the database. There is no authentication, TLS, connection pooling, migration runner, or package manager. The flash store is a bounded, expiring in-memory store. The interpreter is a tree-walker and makes no performance promises.
Those are deliberate non-goals for now. The point was to build the smallest honest version of the page model and find out where it gets awkward. The notes record the decisions and the things left out; the friction log records what the model made hard.
If that sounds useful, install it and try the recipes. If it sounds like a bad idea, the friction log is the honest counterargument.