Open source framework for the web, iOS and Android

Write pages like a website. Ship a website and native apps.

Duolith compiles one set of page files, with markup, scoped styles and TypeScript, to a fast website and to real native iOS and Android apps. No web view, no second codebase.

This page is the example

The page you are reading is a Duolith page. The compiler saw that nothing on it changes, so it wrote the HTML itself and shipped no runtime and no script file. Add a button that counts and the same file ships the runtime it needs.
12.4 KBthis whole page over the network, gzip
4requests to show it
0script files to download
32 msto first paint on a 4-core test machine

A page is one file

Script at the top, markup below, styles beside them. This is a whole app: it runs in the browser, and as native views on a phone.
---import { state } from "@duolith/client"; let count = state(0);--- <screen title="Counter" class="p-6 gap-4 items-center"> <text class="text-title">Pressed {count} times</text> <button on:press={() => count = count + 1}>Press me</button></screen>
With its state and its button, that app is 94 KB gzip, runtime included, and shows its first screen in 206 ms on the same test machine.

One stone, two faces

A Duolith is one stone with two faces. You write the pages once, the compiler cuts them into a website and a native app, and every rule that can be checked is checked before you ship. 122 decision records say why each part is the way it is, and 68 conformance fixtures hold the compiler to them.
This page is HTML and CSS written by the Duolith compiler. It downloads no script.