Overview:
The Kotlin PWA starter-kit is a Gradle project that enables developers to create progressive web apps using 100% Kotlin. The project consists of two modules - the client module and the service worker module. The client module includes React and styled-components libraries wrapped in Kotlin, while the service worker module uses Kotlin Coroutines library to handle asynchronous operations.
Features:
- Button to subscribe/unsubscribe to web push notifications on supported browsers
- Offline work functionality to enable users to continue using the app even without an internet connection
- “Add to home page” functionality on mobile devices for easy access to the app
Installation:
To run the app, follow these steps:
- Clone the repository.
- Navigate to the project directory.
- Run the following command to run the app:
./gradlew browserDevelopmentRun
- To run the app with hot reload, use the following command:
./gradlew browserDevelopmentRun --continuous
Note: The app can also be built for production using the command:
./gradlew build
The bundled files can be found in the build/distributions directory.
Summary:
The Kotlin PWA starter-kit is a powerful tool for developers looking to create progressive web apps using Kotlin. With features such as web push notifications, offline work, and “add to home page” functionality, this starter kit provides a comprehensive solution for building modern web applications. The use of Kotlin Coroutines and libraries like React and styled-components ensures a seamless development experience. The installation process is straightforward, allowing developers to quickly get started with their projects.