Overview
This product is a monorepo that provides a starter project for building universal applications with Next.js, Tailwind CSS, and Capacitor. It allows users to use Next.js routing on iOS and Android, enabling the sharing of code between different platforms while staying in a familiar web development stack. The project structure is organized using Turborepo, with separate repositories for the web application and the mobile apps. It includes Supertokens for authentication and session management, with official support from their team. React components are shared using a UI package, and there are shared libraries, configurations, and other operations.
Features
- Use Next.js on iOS and Android with access to native APIs through Capacitor.
- Share code between all platforms, making it more maintainable compared to separate projects with React Native.
- Structure the project using Turborepo for separate repositories for web and mobile apps.
- Authentication and session management using Supertokens with official support.
- Shared React components using a UI package.
- Shared libraries, configurations, and other operations.
Installation
To use this product, follow these steps:
- Run the command
npx create-supertokens-app@latest --manager=yarnto create a new Supertokens app using the latest version. - Choose a name for your app.
- Select ‘Capacitor’ as the platform.
- Make sure you have both yarn and npm installed on your computer. If you don’t have npm, install it first. Then install yarn globally with the command
npm install --global yarn. - Navigate to the folder where you want to install the app by using the command
cd <folder>. - Run
yarn installto install the required dependencies. - For iOS, go to the
next-appfolder and runyarn buildfollowed byyarn open:ios. - For Android, go to the
next-appfolder and runyarn buildfollowed byyarn open:android. - For more detailed information, refer to the Capacitor docs and Supertokens docs.
Summary
This product provides a monorepo structure for building universal applications with Next.js, Tailwind CSS, and Capacitor. It allows developers to share code between platforms while staying within their web development stack. Authentication and session management are handled by Supertokens, and there is official support for secure authentication on all platforms. The use of Turborepo and shared packages ensures consistency and reduces duplication. Overall, this product offers a convenient and maintainable solution for developing universal applications.