phibac developer docs

What you can build for

phibac works with apps that run as web pages in a browser. This page lists the kinds of app people ask about and whether each one works today.

Platform Status What it means
Web app Supported A site made of static files (HTML, JavaScript, CSS), built with any framework or none, served from a web address you register.
Installable web app (PWA) Supported A web app that the user installs from the browser to their home screen or desktop. It is still served from the web address you register.
Electron Not yet tested A desktop app built with Electron has not been tested. These docs make no promise that it works.
Tauri Not yet tested An app built with Tauri has not been tested. These docs make no promise that it works.
Capacitor Not yet tested A mobile app built with Capacitor has not been tested. These docs make no promise that it works.
Native iOS and Android Not supported There is no phibac SDK for native apps. The only SDK is the JavaScript library @phibac/sdk, which runs in a browser.

Why only web apps

Sign-in opens a browser popup on the phibac server, and an app must register the web origin it is served from, so phibac works where your app runs as a page in a browser.

In more detail:

  • Sign-in happens in a popup. When your app calls connect(), the SDK (the JavaScript library your page uses) opens a popup window on the phibac server. There the user signs in, with a passkey (a key kept on their device and unlocked with the device's screen lock, fingerprint or face) or a password, and approves your app. Your app never handles either.
  • Apps register their origin. An origin is https or http, the host and the port a page is served from, such as https://notes.example.com. Each app lists the origins it is served from, and the server accepts the app only from those origins (and from http://localhost while you develop). An origin must be a plain https:// address, or http:// on your own computer (localhost, 127.0.0.1 or [::1]). An app loaded from a file or from any other kind of address cannot register its origin.

The wrapper tools in the table load a web app inside a desktop or mobile app. Whether sign-in and origins work inside them has not been tested, so these docs do not say how to use them. A later test of each wrapper decides what these docs may claim.

What to build instead

Build a web app. If you want an icon on the user's home screen or desktop, make it an installable web app (PWA): it is the same web app, served from the same registered origin.

To start, follow Build your first app.