When designing a modern software application, one of the first major decisions is platform support. Do you build a native iOS app in Swift? A native Android app in Kotlin? A web app in React or Svelte? Or do you try to maintain all three, multiplying your development cost and slow-rolling updates?
For Embernacle, our goal was to make Scripture study accessible to anyone, on any device, under any network condition. We wanted to support:
- A desktop web browser for deep study at a desk.
- An iPhone/iPad app for portable reading.
- An Android phone/tablet app for broad accessibility.
To achieve this without compromise, we built Embernacle as a Progressive Web App (PWA) combined with a Capacitor wrapper for mobile deployments. Here is why this architecture is the future of cross-platform applications.
What is a Progressive Web App?
A PWA is a website that uses modern web APIs to deliver an app-like experience. When you visit a PWA in your mobile browser, it prompts you to “Add to Home Screen.” Once installed, it behaves exactly like a native app:
- It runs in a standalone window, removing the browser address bar.
- It works completely offline using service worker caches.
- It has access to native features like local storage, push notifications, and haptics.
- It loads instantly because all core assets are cached locally.
By building on web standards, a single codebase can run on a Mac, Windows, Linux, Chromebook, iOS, or Android device.
Bridging the Gap: Capacitor
While PWAs are fantastic, they have limitations when it comes to app store distribution. Apple and Google do not natively list web URLs in their App Store and Google Play Store.
To solve this, we use Capacitor—a cross-platform native runtime developed by Ionic. Capacitor wraps our web assets (our compiled Svelte code, CSS, and Bible JSON files) into a native shell:
- Native WebView: On iOS, it runs inside Apple’s WKWebView; on Android, it runs inside Google’s System WebView. Performance is identical to native components.
- Javascript Bridge: Capacitor provides a lightweight bridge to call native device APIs (like haptic feedback engines, status bar controls, and push notification services) directly from our Svelte code.
- App Store Packaging: It compiles our project into standard Xcode and Android Studio projects, allowing us to distribute Embernacle in the official app stores.
+-------------------------------------------------+
| Embernacle Svelte App |
+-------------------------------------------------+
| Capacitor JS Bridge |
+-------------------------------------------------+
| iOS WKWebView (Xcode) | Android WebView (AS) |
+-------------------------+-----------------------+
| Apple App Store | Google Play Store |
+-------------------------------------------------+
The Performance Advantage of Svelte
Many cross-platform frameworks (like React Native or Flutter) add a heavy runtime layer, leading to slow startup speeds, laggy scrolls, and high battery usage.
To prevent this, Embernacle is built using Svelte. Unlike frameworks that do virtual DOM diffing in the browser at runtime, Svelte compiles our code into highly optimized, tiny vanilla JavaScript at build time.
- Tiny Bundle Sizes: The entire application shell is under 500kB.
- High Performance: Svelte updates the DOM directly with zero overhead, ensuring that scrolling through thousands of lines of Bible text is buttery smooth (running at 60fps or 120fps).
- Low Memory Usage: Svelte apps run efficiently on older, lower-spec mobile devices, making the workspace accessible to readers globally.
The Future of Lightweight Apps
By combining a Progressive Web App core with Capacitor mobile wrappers and a compiled Svelte UI layer, Embernacle delivers the best of both worlds: the universal reach and instant loading of the web, alongside the full power, haptics, and app store presence of native mobile platforms. It is a lightweight, high-performance architecture built for long-term utility.