One stone, two faces
A Duolith is a single stone with two faces. Duolith the framework is the same idea: one set of pages, cut by a compiler into a website and into native iOS and Android apps.The problem
Most teams that want a website and a phone app end up with two of everything: two codebases, two sets of bugs, two release trains. The shortcut is a web view in an app wrapper, and people can feel it. The other shortcut is a native-first toolkit whose website is an afterthought that search engines cannot read.Writing for the web is still the fastest way to build a screen. A page file with markup, styles and a little script is something every web developer, and every coding agent, can already read and write.The idea
Keep the page file. Change what is done with it. Duolith reads each page once and writes two things from it: plain HTML, CSS and modules for the browser, and native views for iOS and Android through the Lynx engine. There is no web view in the app and no second codebase behind it.Because a compiler stands between the page and the device, it can do what a runtime cannot. It knows which pages never change, which state a button touches, which links lead nowhere and which images have no description, all before anything ships.Pay only for what a page does
Every file sits on a rung of a ladder. On the lowest rung nothing runs: the file is constants, so the compiler writes its HTML and ships no runtime. This page is on that rung. It weighs 12.1 KB over the network and downloads no script file.Add state and an event, and the page climbs one rung and ships the runtime. The smallest app with state, a counter, is 94 KB gzip and shows its first screen in 206 ms on a 4-core test machine. The build report names the rung of every file and the reason for it, so a heavier page is a choice you can see.Mistakes fail the build
What can be known before the app runs is checked before the app runs. A link to a page that does not exist, an image with no description, a translation that is missing, a package that cannot run on a phone: each is an error with a stable code, an explanation and a fix. There are 238 of them today.The same rule holds for the framework itself. 122 decision records say why each part is the way it is, and 68 conformance fixtures hold the compiler to the written specification.Built for people and for agents
A framework is now read by coding agents as often as by people. Duolith ships its specification in a form an agent can load, 21 topic packs of rules and skills, and a tool server that builds, checks and tests a project. Errors say what to change, so an agent can fix its own mistake on the next try.Where it stands
Duolith is open source and has not had its first release. The numbers on this site are measured from the repository each time the site is built, on the machine named in the benchmark notes. Nothing here is compared with another framework yet; when it is, the method will be published beside the numbers.This page is HTML and CSS written by the Duolith compiler. It downloads no script.