Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React with Next.js, Ionic Framework, and Capacitor.
The Next.js + Tailwind CSS + Ionic Framework + Capacitor Mobile Starter is a boilerplate repository for building a single codebase that ships as an iOS app, Android app, and Progressive Web App (PWA) using Next.js for the React app, Tailwind CSS for styling, Ionic Framework for cross-platform UI controls, and Capacitor for native packaging.
This starter is a conceptual starting point that combines four tools into one workflow. It takes a standard Next.js application and patches it with Ionic Framework components and Capacitor's native runtime, so the same React code runs on a phone, a tablet, and a browser. The input is a React/Next.js project, and the output is a static export of the app (in the out/ directory) that can be copied by Capacitor into native iOS and Android projects, plus the supporting configuration to build and run on each platform. The repository is maintained by mlynch, the creator of Capacitor, and accompanies a dev.to blog post that explains the stack in detail.
next.config.js sets output: 'export'; running npm run build emits a fully static bundle to the out/ directory that can be deployed to any static host or copied into native shells.npm run sync copies the latest build, and npm run ios and npm run android launch it on each platform with full native API access.server.url in capacitor.config.json to your local Next.js server (for example http://192.168.1.2:3000) enables live reload on a device during development.out/ folder to any static host and get a PWA that shares the same code as the native apps.npm run dev to see UI changes reflected on a connected device without rebuilding the native project.The workflow is the standard Next.js development loop with a native packaging step. Run npm run build to generate the static export in ./out/, then run npm run sync to copy those files into the iOS and Android projects managed by Capacitor. Finally, use npm run ios or npm run android to open the app in the native simulator or on a device. For live development, run npm run dev and point the Capacitor server config at your local IP to get hot reload on device.
No. The app must run purely client-side because it uses Next.js's static HTML export. The README lists this as a caveat: there is no SSR in this code base, so search engine bots will not see meaningful content unless you add a parallel SSR/SSG route or separate SEO-optimized web surface.
Yes. The static export produced by npm run build is written to the out/ directory, and those files can be deployed to any static host such as Vercel static, Netlify, S3, or GitHub Pages, or copied into the native iOS and Android projects using Capacitor.
Find the IP address of your computer (for example 192.168.1.2) and the port your Next.js server runs on, then set the server.url field in capacitor.config.json to that URL, for example http://192.168.1.2:3000. After that, running npm run dev and then npm run ios or npm run android should refresh the app on the device as you edit.
Yes, but some minimal configuration is required. The README links to a GitHub discussion that explains the needed setup.
