Many app projects start with the same question: do we build for iPhone, Android or the web first? My answer is often that you don't have to choose. With Ionic, Vue and Capacitor, one codebase can become an app in the App Store, an app on Google Play and a web app in the browser. It isn't the right choice for everything, and further down I describe when I choose Flutter instead. But for most business apps, internal tools and B2B solutions, it's the stack that gives you the most app for the money.
This post walks through how I work with the stack in practice: what each of the three parts does, how I structure a project, how a change gets from my editor onto a phone, and what I've learned from the apps I've built.
The three building blocks
Vue: the UI layer
Vue handles the components, the reactivity and the logic in the interface. A screen in the app is a Vue component that shows data and reacts to what the user does. I write everything in TypeScript and use Vue's Composition API, so logic can be packaged into small, reusable functions instead of being spread across large components.
For state I use Pinia. It's Vue's official state library, and it keeps data and business logic out of the components. A component asks a store for data and calls an action when something needs to happen. It doesn't know whether the data comes from an API, from local storage or from a cache. For small helpers like debounce, media queries and local storage I often use vueuse, so I don't reinvent the same helpers in every project.
Ionic: the mobile building blocks
Ionic is a UI library of components that behave like mobile apps: navigation with the right transitions, lists, tabs, sheets that slide up from the bottom, pull-to-refresh, swipe actions and form fields that suit a touch screen. The components adapt to the platform, so an app looks at home on both iOS and Android without two sets of designs.
The most important thing Ionic gives you is navigation. A mobile app has a stack of screens you move back and forth through, where the back button and the swipe gesture need to behave the way the user expects. That's a surprising amount of work to build yourself, and it's exactly the kind of detail that gives a web app away when it isn't right.
Capacitor: the bridge to the phone
Capacitor wraps the web app as a real native app and gives access to the phone's features through plugins. The project has an ios and an android folder with real Xcode and Android Studio projects, so the app can be built, signed and released like any other app.
The official plugins cover most of what a typical app needs: app lifecycle, haptic feedback, keyboard, local notifications, local storage of preferences, splash screen and status bar. Beyond those there are community plugins for things like speech recognition and QR scanning, and if something is missing you can write your own plugin in Swift and Kotlin and call it from TypeScript.
How I structure a project
The biggest difference between an app that's easy to change a year from now and one that isn't rarely lies in the choice of framework. It lies in how the code is divided. This is what I typically do:
- Screens and components live on their own. A screen puts components together and connects them to a store. The components themselves don't know about APIs.
- Stores in Pinia own state and actions: fetch the trip, add an item to the list, save a setting.
- A repository layer sits between the stores and the outside world. It's an interface describing what the app needs to fetch and save, and a concrete implementation that talks to a REST API, a CMS or local storage.
- A thin API client below the repositories handles HTTP, authentication, errors and retries.
- Platform-specific code (Capacitor plugins) is wrapped in small services, so the rest of the app never calls plugins directly and can run in a browser under test.
That can sound like a lot of layers for an app. But each layer is thin, and the payoff is that you can replace one part without touching the rest. On one client app the content lives in Payload CMS behind exactly that kind of ContentRepository interface, the same pattern I use on my websites. The components don't know there's a CMS behind them.
Typed API calls from the backend's spec
When the backend is built with FastAPI, I get an OpenAPI spec for free. I use it with openapi-typescript to generate TypeScript types for every endpoint, so the API client in the app is typed from the backend's actual contract. If the backend changes a field, it becomes a type error in the app before it becomes a bug for a user. That's one of the things that makes it realistic to work on both backend and app in the same week without breaking anything.
Languages and time zones from the start
I set up vue-i18n with Danish and English from day one, even when the app only launches in Danish. It costs almost nothing at the start and is expensive to introduce later, once there are hardcoded strings in a hundred components.
The same goes for time. If the app shows data from installations, devices or users that aren't necessarily in the same time zone as the phone, I use date-fns-tz to calculate consistently in the right zone. Time zone bugs are some of the hardest to spot, because they only show up for some users, at some times of the year.
From code to phone and web
One of the biggest advantages of the stack is that most of the development happens in an ordinary browser. This is the path a change takes:
- Development in the browser. I run the app with Vite and see changes immediately. Most of the UI and all of the business logic can be built and tested here.
- Testing on real devices. When a change touches something platform-specific, like notifications, the keyboard or the camera, Capacitor syncs the web code into the native projects, and the app runs on a simulator or a phone.
- Automated tests. Playwright clicks through the most important flows in a real browser on every change. Because the app is also a web app, the same tests can run in a CI pipeline without a phone.
- The web version is built as a static app and deployed in a container, like my other web projects.
- The app versions are built and signed in Xcode and Android Studio and go through App Store and Google Play review.
The web version can be updated at any time. The app versions have to pass store review, so I plan native releases a little more and bundle changes that need new native code.
Where I've used it
Luggage Log: from Flutter to Ionic Vue
Luggage Log is a shareable packing list for travel groups. It started as a Flutter app, and on 22 May 2026 production switched over to Ionic Vue. The switch happened once all 38 end-to-end tests passed on the new app.
The reason wasn't that Flutter was bad. Luggage Log also needed to work in a browser, and the landing page was already built in TypeScript. With Ionic Vue the app could share a language and tooling with the rest of the frontend, get types generated straight from the backend's API, and the web version came along for free.
What made the migration realistic was the backend. Luggage Log has a FastAPI API in front of PocketBase, and the old Flutter app had already been moved over to use it instead of talking to the database directly. So the new app was just another client for the same API. No data had to move and no new backend had to be built. I've written more about that part in the post on FastAPI and PocketBase.
Today the app uses quite a lot of the phone through Capacitor:
- Local notifications for reminders.
- Haptic feedback when you tick items off.
- Keyboard and status bar plugins, so the layout behaves when the keyboard is up.
- Local storage of preferences and a splash screen on startup.
- Speech recognition, so you can say items to the list instead of typing them.
- QR codes, which the app can both show and scan.
Analytics go through PostHog.
B2B energy management app
For an industrial client I've built a B2B app for monitoring and controlling energy installations. Among other things it shows inverters, frequency control and energy balance, and it's built with Ionic Vue 8.7, Capacitor 7 and Pinia 3.
A few things from that project I carry forward:
- Robust API calls. The app talks to installations and services that don't always answer the first time. The API layer is built with axios and a retry, so a brief network drop doesn't turn into an error message for the user.
- Time zones taken seriously. Data from installations is shown with
date-fns-tz, so times are correct wherever the phone is. - Several OEM versions from the same code. The app is built so an OEM version is selected at build time from a folder of configuration and branding. The same codebase can be delivered under several brands without maintaining several apps.
- Danish and English via vue-i18n, and Playwright tests of the most important screens.
Watt-E and others
Watt-E has a smaller companion app in Ionic Vue 8 with Capacitor 6 and Pinia alongside the main platform. It shares a backend with the platform and gives users a quick way in from their phone.
I've also built an app for another client on Ionic 9 and Vue, where the content is managed in Payload CMS through a repository interface. That means the client can edit texts and content in the app themselves without a new release in the app stores.
When an existing app needs to move
Luggage Log taught me that a migration between app frameworks stands or falls on the order you do things in. This is how I'd approach it again:
- Get the backend in place first. If the old app talks directly to a database, move it onto a proper API before you write a line of the new app. Then the new app is just another client.
- Write end-to-end tests of the most important flows. They describe what the app must do, independent of the framework it's written in, and they're your definition of "done".
- Build the new app until the tests pass. Web version first, where iteration is fastest, then the native features.
- Switch over when everything is green, and keep the old app around until you're sure the new one holds up in production.
It isn't the fastest route on paper. But it turns the switch into a boring day instead of a risky one.
Tips for Capacitor plugins
These are general rules I follow on every project:
- Wrap your plugins. Never call a plugin directly from a component. Make a small service with a web fallback, so the app can run and be tested in a browser.
- Keep plugin versions in step with Capacitor. Official plugins follow Capacitor's major version. Upgrade them together, and read the migration guide before you bump a major version.
- Check community plugins before you commit to them. See when they were last updated and whether they support the Capacitor version you're on.
- Ask for permissions at the right moment. Ask for access to notifications or the microphone when the user needs the feature, not on first launch.
- Test native features on real devices. The simulator is good, but the keyboard, notifications and permissions sometimes behave differently on a real phone.
Common pitfalls
These are also general lessons about the stack:
- Leaving a web app inside an app shell. If you just wrap an ordinary website, it feels like a website. Use Ionic's navigation and components so the app behaves like an app.
- Forgetting offline and bad connections. A phone is often on a poor network. Build in retries, clear loading states and local storage from the start.
- Big components with API calls inside. It works in a prototype, but it makes the app hard to test and change. Keep the calls in repositories and stores.
- Putting off languages and time zones. Both are cheap to get right from the start and expensive to fix later.
Ionic or Flutter?
I build with both, and the choice is mostly about the project around the app. In short:
- Choose Ionic Vue when the app needs to share code, types and people with a TypeScript web platform, when a web version matters as much as the app version, when you need several variants of the same app, or when the content should be managed from a CMS.
- Choose [Flutter](/en/blog/tech-stack-flutter) when the app itself is the product, when it has heavy custom animation or a design that has to be pixel-precise, and when the last bit of finish in the experience matters more than sharing with a web platform.
Both can build good apps. The most expensive choice is the one that fits badly with the rest of the project.
What you get out of it
- One codebase, three platforms. iOS, Android and web from the same source.
- Faster development. Web technology gives short iterations, and tests can run in an ordinary browser.
- Native features when you need them. Capacitor gives access to the phone's features, and missing pieces can be built in Swift and Kotlin.
- Sharing with the rest of the project. The same language and types as the backend and the website.
- Room for several versions. The same app can ship under several brands or configurations.
- Content without a new release, when texts and content are managed from a CMS.
Working in the same stack?
Do you build with Ionic and Vue yourself, or are you thinking about moving an existing app? I have experience with new apps, OEM variants and migrating from Flutter, and I'm happy to share what I've learned about Capacitor plugins, testing and releases. Get in touch.

