Phpanta
A small full-stack web framework for plain PHP 8.5 and browser-native TypeScript. No runtime dependencies, no template language, no composer on the server: a site vendors Phpanta as a git submodule, requires one autoloader, and deploys plain files.
It was extracted from the site of neuro.SYS, which is built on it. So is this one: every page here is rendered by a controller, a view and a shell, then exported to static files for GitHub Pages by the framework's own export command.
What it is made of
- Typed HTTP. A request is parsed defensively into a readonly
Request, a response is a typed object, and every header is a name case and a value class. - A markup tree. A view returns nodes, never a string. Escaping and the URL-scheme check live in
render(), so they hold however an element was built. - Immutable, lazy collections for every group that crosses a public boundary.
- Translation. Visible text is a
Translatable, and the tree puts every word into the nearestlangwhen it renders. - A signed API.
/api/{service}/{version}/{action}is the one address family that writes, and every call is signed with an ECDSA key the server cannot use. A deployment is one signed request. - Health checks. What a site needs of its host is declared in code, and the running deployment reports whether it has it.
- SPA navigation in which every link is a real
href, so a page without JavaScript works the same.
Where to go next
- Getting started — vendoring it into a site, the app, building, deploying.
- The rules — the habits it replaces, and why each one fails loudly.
- Architecture — a request, traced through the layers.
- The repository — the source, and the full documents under
docs/.