Skip to content

Desktop & mobile apps ​

Desktop (Electron) ​

The desktop app wraps the web app and adds what a browser can't: sharing an application's audio, taskbar and tray badges, notification clicks, signing in through the system browser, and closing to the tray.

Run it against your dev server. With the web app running (yarn --cwd frontend start):

sh
cd electron
yarn install
yarn start

yarn start builds the main process and preload, then starts Electron against the Vite dev server.

Build installers:

CommandBuilds
yarn packageFor the current platform: an AppImage on Linux
yarn build:linuxA Linux AppImage
yarn build:winA Windows installer and a portable .exe
yarn build:allBoth

Each builds the web app first, then packages it into electron/release/. Local builds are unsigned and versioned 1.0.0.

Security. The web app inside the shell never touches Node.js: native features are exposed only through electron/preload.js, and yarn test checks the shell's security boundaries. Run yarn build after changing the preload, so development and packaged apps use the same bridge.

Mobile (Expo) ​

The mobile app is Expo and React Native, using the SDK directly. Calls use LiveKit's native WebRTC module, and Android calls run through a foreground-service module of its own. Neither exists in Expo Go, so you develop in a development build of the app.

Get a development build once, and again whenever a native dependency or plugin changes:

sh
cd mobile
yarn install
yarn build:dev        # Android, built by EAS
yarn build:dev:ios    # iPhone (needs an Apple Developer account and a registered device)

Or build on your own machine with npx expo run:android, or npx expo run:ios on a Mac with Xcode. Development builds install beside the release app, as Refract.Chat (Dev).

Run it against your local backend:

  1. Start the backend as in Getting started.
  2. In mobile/, run yarn start and open the development build. It finds Metro on the same Wi-Fi, or scan the QR code Metro prints.
  3. On the instance screen, enter http://<your machine's LAN address>:8778.
  4. Sign in as a demo account, such as alice@localhost with the password password.

JavaScript changes reload as usual. After changing the SDK, run ./sync-sdk.sh from the repository root, since it's copied into mobile/node_modules rather than linked.

Checks: yarn check:ts and yarn check:bundle, which bundles the app the way a release build does.

Released under the GNU Affero General Public License v3.0.