This project is a state-of-the-art starter template designed for building scalable, cross-platform applications with Next.js 14, TypeScript, Tailwind CSS, Ionic Framework, and Capacitor. It enables developers to efficiently create apps that run on iOS, Android, and the web with a single codebase.
This project was inspired by Max Lynch's Next.js + Tailwind CSS + Ionic Framework + Capacitor Mobile Starter. The original project provided a conceptual starting point for integrating these technologies into a cohesive development stack for building mobile and web applications. We have adapted and expanded upon this foundation to leverage the latest features of Next.js 14 and TypeScript, along with incorporating best practices and additional configurations to enhance the developer experience and application performance.
Clone the repository:
git clone https://github.com/UretzkyZvi/nextjs-typescript-tailwind-ionic-starter.git <project-directory>
Install dependencies:
cd <project-directory>
npm install
Add platforms: To add iOS and Android platforms to your project:
npx cap add ios
npx cap add android
This step requires Xcode for iOS and Android Studio for Android development.
Install Android Studio (for Android development): To run and test your app on an Android emulator, download and install Android Studio. During installation, ensure you include the Android SDK and configure it as per the installation instructions.
Install Xcode (for iOS development on Mac): To run and test your app on an iOS simulator, download and install Xcode from the Mac App Store. After installation, open Xcode to install additional required components when prompted. Xcode includes the iOS Simulator where you can run your iOS apps.
Start the development server with:
npm run dev
Open http://localhost:3000
in your browser to see the app.
The project integrates Capacitor for running on iOS and Android, configured in capacitor.config.ts
:
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'com.example.app',
appName: 'nextjs-typescript-tailwind-ionic-starter',
cordova: {},
loggingBehavior: "debug",
webDir: "out",
plugins: {
SplashScreen: {
launchShowDuration: 0
}
},
server: {
androidScheme: 'https',
hostname: 'localhost:3000',
},
android: {
loggingBehavior: "debug",
webContentsDebuggingEnabled: true,
}
};
export default config;
To compile the application and prepare it for iOS and Android:
npm run build
npx cap sync
npx cap open ios
npx cap open android
For live reload on devices, ensure your development server is accessible as configured in capacitor.config.ts
. Adjust the hostname
to match your development environment if necessary.
Card.tsx
, Notifications.tsx
, Settings.tsx
, Tabs.tsx
: Showcase Ionic components.AppShell.tsx
: Manages app layout and navigation.[page].tsx
: Implements dynamic routing with Next.js.capacitor.config.ts
: Contains Capacitor configuration for native platforms.next.config.mjs
: Configures Next.js, including TypeScript and Tailwind CSS integration.Contributions are welcome. Please review our contributing guidelines before submitting pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.