# PWA Setup

## What is PWA?

PWA stands for Progressive Web Application. It is a type of application software delivered through the web, built using common web technologies including HTML, CSS, and JavaScript. It is intended to work on any platform that uses a standards-compliant browser, including both desktop and mobile devices.

Progressive web apps (PWA) are web applications that can be accessed through a web browser and provide a similar experience to a native mobile app. They can be used in emart  to provide a more seamless and engaging user experience for students.

Some ways PWA can be used in emart include:

1. Add to home screen: PWAs can be added to the home screen of a device, giving students quick and easy access to the emart .
2. Cross-platform compatibility: PWAs can be accessed on a wide range of devices and browsers, which can be useful for students who use different devices or platforms.
3. Mobile compatibility: PWAs are designed to be mobile-friendly, which is important since many students may access the emart from a mobile device.
4. Cost-effective: PWAs are cheaper to develop and maintain than traditional mobile apps, which can be beneficial for organizations with limited budgets.

It's worth noting that not all project are compatible with PWA, it's important to check if the platform you are using supports this technology before implementing it. Also, it's important to test the PWA on different devices and browsers to ensure that it provides a consistent user experience across all platforms.

{% hint style="info" %}
PWA is lite app, When you open it in Mobile Browser its ask for add app in mobile. Its Not APK. You can not submit to Play Store.
{% endhint %}

{% hint style="warning" %}
:brain:**Note:** The website is to be served from a secure (HTTPS) domain.

https://yourdomain.com/public/
{% endhint %}

## Why do I need it?&#x20;

One reason users love apps is they generally offer better experiences than web applications. However, developing and maintaining native apps is a lot of work, not to mention the expenses involved.

If your users use different platforms (Android, iOS, etc.), you have to code your app for each platform.

PWAs, however, don’t require you to code for each platform. They were designed with the philosophy of “code once, use everywhere.” Once you code your PWA, it can be used in-browser (as a website or web app), on desktops, and on mobile devices.

## How to Setup PWA?

Go to your project and log in as admin.

* Go to Admin Dashboard->Site Settings->PWA Settings.
* Here, you will be able to change the PWA Settings like PWA enable or not, App Name, Theme color for header, Background color, and shortcut icon, etc.
* Here, you can update the icon, and also icons size should be **512\*512**.
* Splash icon size should be **2048\*2732**. Path: _<mark style="color:green;">**(public -> images -> icons)**</mark>_
* App URL Like : **https://yourdomain.com/public/**  \
  Change App URL Go to Dashboard->Site Settings->Settings.

<figure><img src="https://1505858533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjgpGxM-KUqUZzrvmCg%2Fuploads%2FToNUo2dJBjJbbg7lr4F0%2FProgressive-Web-App-Setting-Admin-Dashboard%20(1).png?alt=media&#x26;token=6990dd24-f02d-4807-aeaf-4bb85be58407" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1505858533-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjgpGxM-KUqUZzrvmCg%2Fuploads%2FiYPEyVRKLyNF26Fh7Cts%2FProgressive-Web-App-Setting-Admin-Dashboard%20(2).png?alt=media&#x26;token=28d90fcb-f5b6-447a-9f73-4ea034ba2bf0" alt=""><figcaption></figcaption></figure>

**for Change icons directly in files:** Go to `public -> images -> icons` and change icons

**for Change URL directly in files:** go to `.env` and add app url its required Like:

```
APP_URL=https://yourdomain.com/public/
```

{% hint style="info" %}
:man\_mage:**Tips:** Splash Screen works only on Apple Device.
{% endhint %}
