Documentation
Build for a phone that folds
Everything from the first command to a catalog people can install from. Start at the top; the reference for every export is on the SDK and UI kit pages.
Start
- IntroductionDuo is a simulator of Apple's iPhone Duo that runs as a web page and as a desktop window. It has the phone's two displays, a hinge you can drag, a home screen, and an App Store. You can build apps for it.
- Getting startedTo build entirely in your browser, open Build, connect an OpenRouter key or a browser-accessible OpenAI-compatible endpoint, and describe your app. No local tools are needed. Your provider receives requests directly; Duo does not proxy your key or prompts.
- Your first appcreate writes five files. Here is what each one does and what to change first.
Build
- ManifestOne manifest.json per app. You write this file and nothing else about a release; build derives the rest into release.json, which is what the shell, the store and the loader read. Both types are exported by the SDK as Manifest and Release.
- LifecycleWhat happens between the shell creating a frame and your app's first paint, and how the connection ends.
- Displays and the foldDuo has a 387 point cover and a 790 point inner display, both 850 tall. The inner display can hold one app full width or two side by side. Your app runs on whichever is lit, and while the phone folds the other display already runs a copy, so the handover has no remount and no flash.
- Buttons and sensorsYour app can hear the phone's hardware: the volume buttons, Camera Control, the side button, the phone's pose and the Control Center switches. Every one is an event. Listen with os.device.on, and call what it returns to stop.
- StorageTwo key-value spaces, both strings only, both asynchronous, both revisioned. The frame has no localStorage; this is the whole persistence story.
- PermissionsAn app can use exactly what its manifest declares. There is no runtime prompt and no settings screen: the catalog owner reviews the list, the store row shows it, and the shell enforces it.
Ship
- CLI@doan-labs/duo-cli, a small Bun tool. Until it is published, run it from the repository as bun packages/cli/index.mjs <command>, or through the scripts create writes into your app's package.json.
- CatalogsApps do not ship with Duo. They install from a catalog: a static index.json next to immutable release folders, served with CORS from any origin. You can host one yourself today.
- PublishingThere are two ways to distribute a Duo app: submit it to the curated catalog through a pull request, or host a catalog yourself. Either way there is no account to create.