Nextjs Material Pwa

screenshot of Nextjs Material Pwa
nextjs
react
material-ui

Template for creating progressive web apps with MaterialUI, Next.js and Workbox

Overview

The Next.js Material UI Progressive Web App (PWA) Template is a template repository that simplifies the process of setting up and creating progressive web apps. It includes features such as layout options for both desktop and mobile, customizable themes, an onboarding slideshow, service worker integration with the Workbox library, offline fallback, installation prompt, app shortcuts, and a custom Babel.js config.

Features

  • Layout: The template supports both desktop and mobile layouts. The desktop layout includes a sidebar on the left side, while the mobile layout offers two options: a traditional layout with a swipeable sidebar and a modern layout with menu items at the bottom.
  • Theming: There are two themes available - dark and light - and they can be easily customized.
  • Onboarding Slideshow: The template includes an optional onboarding slideshow that is commonly found in native apps. This can be easily removed if desired.
  • Service Worker: Service worker functionality is integrated using the Workbox library. The service worker precaches routes, images, CSS, and Google fonts, and a new cache manifest is created with each app build. The template also includes a prompt to reload the application when a new service worker is installed.
  • Offline Fallback: If navigation occurs when there is no network access, the template provides an offline fallback page. Fallback files must be in pure HTML, CSS, and JS format and should be placed in the public directory. The application also includes network offline detection, with a notification inside the app indicating that the application is offline.
  • Installation Prompt: The template includes a custom prompt for installing the app. Please note that this prompt only works on desktop OS and Android, not on iOS.
  • App Shortcuts: The application also includes demo shortcuts that are displayed when the app is installed. More information about PWA shortcuts can be found at "Get things done quickly with app shortcuts".
  • Custom Babel.js Config: The template includes a custom Babel configuration that allows for the use of custom environment variable in the application. This includes the app version taken from the package.json file and a boolean variable indicating whether the application is running in development mode.

Summary

The Next.js Material UI Progressive Web App (PWA) Template is a comprehensive template repository that simplifies the process of creating progressive web apps. It includes features such as flexible layouts, customizable themes, an optional onboarding slideshow, service worker integration, offline fallback, installation prompt, app shortcuts, and a custom Babel.js config. By using this template, developers can quickly set up a PWA with all the necessary features and functionality.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

material-ui
Material UI

material-ui adds classes to Tailwind CSS for all common UI components. Classes like btn, card, etc. This allows us to focus on important things instead of making basic elements for every project.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Pwa

A Progressive Web App (PWA) is a type of web application that uses modern web technologies to provide a native app-like experience to users, including offline functionality, push notifications, and device hardware access. PWAs can be installed on a user's home screen and launched like a traditional app, but do not require a separate app store listing or download.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.