Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

1.8 KB
Raw Blame
// The Linedesk app for iOS and Android: a native shell around the web app that Linedesk Cloud serves (decision of
// 2026-11-28, LIN-874). The app loads the server's own pages, so sign-in cookies, sync and updates work as on the web;
// native parts (push, sign-in through the system browser, back button, status bar, haptics) are Capacitor plugins
// the web app calls when it runs in here (apps/web/src/native).
// LINEDESK_APP_URL builds the app against another server (staging, a dev preview) at `cap sync` time.
import type { CapacitorConfig } from '@capacitor/cli'

const appUrl = new URL(process.env.LINEDESK_APP_URL ?? 'https://app.linedesk.ai')

const config: CapacitorConfig = {
  appId: 'ai.linedesk.app',
  appName: 'Linedesk',
  // Shown only when the server cannot be reached at start (www/index.html).
  webDir: 'www',
  server: {
    url: appUrl.origin,
    // Only for a local test server (http://localhost through `adb reverse`); Linedesk Cloud is https.
    cleartext: appUrl.protocol === 'http:',
    // Only the server's own pages open inside the app; every other address opens in the system browser.
    allowNavigation: [],
    errorPath: 'offline.html',
  },
  ios: {
    contentInset: 'never',
    // Service workers and passkeys in WKWebView need the server as an app-bound domain (Info.plist WKAppBoundDomains).
    limitsNavigationsToAppBoundDomains: true,
    scheme: 'Linedesk',
  },
  android: {
    // Back, links from emails and the sign-in hand-back come as intents; the web view keeps the server's origin.
    allowMixedContent: false,
  },
  plugins: {
    SplashScreen: { launchAutoHide: false, backgroundColor: '#FAFAF8', showSpinner: false },
    Keyboard: { resize: 'native', resizeOnFullScreen: true },
    PushNotifications: { presentationOptions: ['badge', 'sound', 'alert'] },
  },
}

export default config