All Projects → mlynch → Nextjs Tailwind Ionic Capacitor Starter

mlynch / Nextjs Tailwind Ionic Capacitor Starter

A starting point for building an iOS, Android, and Progressive Web App with Tailwind CSS, React w/ Next.js, Ionic Framework, and Capacitor

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nextjs Tailwind Ionic Capacitor Starter

talks
Let's talk about ..
Stars: ✭ 13 (-95.87%)
Mutual labels:  ionic, ionic-framework
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-94.29%)
Mutual labels:  ionic, ionic-framework
keyonic-v2
A Keycloak Mobile Implementation using Angular v4 and Ionic v3
Stars: ✭ 23 (-92.7%)
Mutual labels:  ionic, ionic-framework
ionic-uber-clone
Ionic 4 Taxi Booking script
Stars: ✭ 34 (-89.21%)
Mutual labels:  ionic, ionic-framework
ionic-signature-pad
Ionic plugin to input singnature pad
Stars: ✭ 15 (-95.24%)
Mutual labels:  ionic, ionic-framework
ionic-firebase-image-upload
Building an Ionic App with Protected/Private Content. This app shows how to use Firebase Storage from an Ionic Angular app both with public and private content.
Stars: ✭ 19 (-93.97%)
Mutual labels:  ionic, ionic-framework
ionic-custom-components
🌈 Ionic Tutorial: Mastering Web Components in Ionic Framework. This repo is an Ionic project showcasing Angular custom components and Stencil custom web components.
Stars: ✭ 30 (-90.48%)
Mutual labels:  ionic, ionic-framework
ionicfirebaseauth
Exemplo de alguns tipos de autenticação com Ionic 2 e Firebase
Stars: ✭ 18 (-94.29%)
Mutual labels:  ionic, ionic-framework
ionic4-angular6-crud-example
Building CRUD Mobile App using Ionic 4, Angular 6 and Cordova
Stars: ✭ 50 (-84.13%)
Mutual labels:  ionic, ionic-framework
ionic-surveyjs
Sample project that shows how to integrate SurveyJS in Ionic APP.
Stars: ✭ 28 (-91.11%)
Mutual labels:  ionic, ionic-framework
ionic-image-upload
Ionic Plugin for Uploading Images to Amazon S3
Stars: ✭ 26 (-91.75%)
Mutual labels:  ionic, ionic-framework
ionic-modal-custom-transitions
Add Custom Transitions to Ionic Modals.
Stars: ✭ 22 (-93.02%)
Mutual labels:  ionic, ionic-framework
ionic4-ngrx-firebase
A basic application for Ionic 4 with firebase & ngrx actions, reducers and effects
Stars: ✭ 17 (-94.6%)
Mutual labels:  ionic, ionic-framework
tutorial-photo-gallery-vue
Photo Gallery Tutorial: Ionic Vue and Capacitor
Stars: ✭ 33 (-89.52%)
Mutual labels:  ionic, ionic-framework
ionic-3-video-calling-using-webrtc
This is demo code of how to implement video calling in ionic 3 using webrtc
Stars: ✭ 58 (-81.59%)
Mutual labels:  ionic, ionic-framework
fireblogger
Ionic 2 social media microblogging platform built with firebase 3 as backend
Stars: ✭ 54 (-82.86%)
Mutual labels:  ionic, ionic-framework
ionic-facebook-login
Ionic starter app to show you how to add Facebook Log In to an Ionic App.
Stars: ✭ 69 (-78.1%)
Mutual labels:  ionic, ionic-framework
ionic-app-with-aws-cognito
Angular 4, Ionic 3, and AWS (Amazon) Cognito User Pools. Authentication out of the box.
Stars: ✭ 62 (-80.32%)
Mutual labels:  ionic, ionic-framework
ionic-native-sms-retriever-plugin-master
Cross-platform plugin for Cordova / PhoneGap to Retrieve SMS. Available for Android.
Stars: ✭ 16 (-94.92%)
Mutual labels:  ionic, ionic-framework
ngx-ionic-image-viewer
An Ionic 4 Angular component to view & zoom on images and photos without any additional dependencies.
Stars: ✭ 129 (-59.05%)
Mutual labels:  ionic, ionic-framework

Next.js + Tailwind CSS + Ionic Framework + Capacitor Mobile Starter

Screenshot

This repo is a conceptual starting point for building an iOS, Android, and Progressive Web App with Next.js, Tailwind CSS, Ionic Framework, and Capacitor.

Next.js handles the production React app experience, Tailwind can be used to style each page of your app, Ionic Framework provides the cross-platform system controls (navigation/transitions/tabs/etc.), and then Capacitor bundles all of it up and runs it on iOS, Android, and Web with full native access.

See this blog post for an overview of the stack and how it all works: https://dev.to/ionic/build-mobile-apps-with-tailwind-css-next-js-ionic-framework-and-capacitor-3kij

Please note: this repo isn't quite production ready as-is. Users will want to configure tailwind purging as a first step, and note SSR is currently disabled for the Next.js app as the app will be fully client-side rendered for iOS and Android. This is a limitation we are working to address in a future update.

Usage

This project is a standard Next.js app, so the typical Next.js development process applies (npm run dev for browser-based development). However, there is one caveat: the app must be exported to deploy to iOS and Android, since it must run purely client-side. (more on Next.js export)

To build the app, run:

npm run build
npm run export

All the client side files will be sent to the ./out/ directory. These files need to be copied to the native iOS and Android projects, and this is where Capacitor comes in:

npx cap copy

Finally, to run the app, open the Native IDE for the platform and follow the IDE's run process (note: a CLI run will be available in Capacitor 3:

npx cap open ios
npx cap open android

Livereload/Instant Refresh

To enable Livereload and Instant Refresh during development (when running npm run dev), find the IP address of your local interface (ex: 192.168.1.2) and port your Next.js server is running on, and then set the server url config value to point to it in capacitor.config.json:

{
  "server": {
    "url": "http://192.168.1.2:3000"
  }
}

Note: this configuration wil be easier in Capacitor 3 which recently went into beta.

Caveats

One caveat with this project: Because the app must be able to run purely client-side and use Next.js's Export command, that means no Server Side Rendering in this code base. There is likely a way to SSR and a fully static Next.js app in tandem but it requires a Babel plugin or would involve a more elaborate monorepo setup with code sharing that is out of scope for this project.

Additionally, Next.js routing is not really used much in this app beyond a catch-all route to render the native app shell and engage the Ionic React Router. This is primarily because Next.js routing is not set up to enable native-style transitions and history state management like the kind Ionic uses.

What is Capacitor?

You can think of Capacitor as a sort of "electron for mobile" that runs standard web apps on iOS, Android, Desktop, and Web.

Capacitor provides access to Native APIs and a plugin system for building any native functionality your app needs.

Capacitor apps can also run in the browser as a Progressive Web App with the same code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].