Download the PHP package alareqi/filament-pwa without Composer

On this page you can find all versions of the php package alareqi/filament-pwa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-pwa

Filament PWA Plugin

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A comprehensive Progressive Web App (PWA) plugin for Filament v3 and v4 admin panels. Transform your Filament admin panel into a fully-featured PWA with offline functionality, installation prompts, automatic icon generation, and comprehensive internationalization support.

โœจ Features

๐Ÿ“‹ Table of Contents

๐Ÿ“‹ Requirements

System Requirements

Optional Dependencies

Browser Support

Production Requirements

๐Ÿš€ Installation & Setup

Step 1: Install the Package

Install the package via Composer:

Note: This package supports both Filament v3 and v4. The installation process is identical for both versions.

Step 2: Publish Assets (Optional)

Publish the configuration file and assets:

Step 3: Generate PWA Icons

Generate all required PWA icons from your logo:

Step 4: Validate Setup

Validate your PWA configuration:

โšก Quick Start

Method 1: Fluent API (Recommended)

Register the plugin in your Panel provider with fluent configuration:

Method 2: Configuration File

Alternatively, register the plugin and configure via config file:

Then configure in config/filament-pwa.php:

Method 3: Dynamic Configuration with Closures

For advanced use cases, use closures for dynamic configuration:

๐Ÿ”ง Configuration

The plugin offers extensive configuration options through multiple approaches:

Core Configuration Options

Option Type Default Description
name string\|Closure config('app.name') . ' Admin' PWA application name
short_name string\|Closure 'Admin' Short name for home screen
description string\|Closure 'Admin panel for ' . config('app.name') App description
start_url string\|Closure '/admin' Starting URL when app opens
display string 'standalone' Display mode (standalone, fullscreen, minimal-ui, browser)
theme_color string\|Closure Auto-detected from Filament Theme color for browser UI
background_color string\|Closure '#ffffff' Background color during loading
orientation string 'portrait-primary' Screen orientation preference
scope string '/admin' Navigation scope
lang string\|Closure Auto-detected from Laravel Language code
dir string\|Closure Auto-detected from language Text direction (ltr, rtl)

Installation Configuration

Icon Configuration

Service Worker Configuration

๐ŸŒ Internationalization

The plugin includes comprehensive internationalization support with built-in translations for 10+ languages and full RTL/LTR support.

Supported Languages

Language Code Direction Status
English en LTR โœ… Complete
Arabic ar RTL โœ… Complete
Spanish es LTR โœ… Complete
French fr LTR โœ… Complete
German de LTR โœ… Complete
Portuguese pt LTR โœ… Complete
Italian it LTR โœ… Complete
Russian ru LTR โœ… Complete
Japanese ja LTR โœ… Complete
Chinese (Simplified) zh-CN LTR โœ… Complete
Dutch nl LTR โœ… Complete

Language Configuration

Automatic Detection (Recommended)

The plugin automatically detects language and text direction from Laravel's configuration:

Manual Configuration

Dynamic Language Configuration

RTL Language Support

For RTL languages like Arabic, the plugin automatically:

Custom Translations

To add custom translations or modify existing ones:

  1. Publish the language files:

  2. Modify translations in resources/lang/{locale}/pwa.php:

  3. Add new language support:

Translation Keys Reference

The plugin uses the following translation keys:

๐ŸŽจ Icon Generation

The plugin automatically generates all required PWA icons from a single source image with high-quality output and maskable icon support.

Supported Source Formats

Basic Icon Generation

Generated Icon Sizes

The plugin generates icons in the following sizes by default:

Maskable Icons

Maskable icons ensure your app icon looks great on all devices by providing a safe area:

Maskable icons are automatically generated with:

Advanced Icon Configuration

Image Processing Requirements

The plugin uses different image processing libraries based on availability:

  1. Imagick (Recommended) - Best quality, supports SVG natively
  2. GD Extension - Fallback option, limited SVG support
  3. Intervention Image - Enhanced image processing capabilities

Install Imagick for best results:

Troubleshooting Icon Generation

Source image not found:

Poor quality icons:

Permission errors:

Manual Icon Placement

If you prefer to create icons manually, place them in the configured icons directory:

๐Ÿš€ Advanced Features

Debug Mode

Enable debug mode to always show installation prompts during development:

Custom Service Worker

Extend the service worker functionality:

App Shortcuts

Add shortcuts that appear when users long-press your app icon:

HTTPS Requirements

PWAs require HTTPS in production. The plugin validates this automatically:

For development, you can use:

Performance Optimization

The plugin includes several performance optimizations:

๐ŸŽจ Automatic Color Detection

The plugin automatically detects and uses your Filament panel's primary color for the PWA installation banner and other UI elements. The color detection system works with both Filament v3 and v4:

Detection Priority

  1. Current Panel Context - Colors from the active panel (highest priority)
  2. Runtime Panel Detection - Detected from current route/request context
  3. Admin Panel - Default admin panel colors
  4. Any Available Panel - First available panel colors
  5. Configuration Files - Filament config file colors
  6. Fallback Color - #6366f1 (Tailwind Indigo 500)

Supported Color Formats

The system handles various color formats used by Filament:

Manual Override

You can override the automatic detection:

๐Ÿ”ง Troubleshooting

Common Issues

Installation prompt not showing:

Icons not loading:

Service worker not updating:

PWA banner styling broken in Filament v4:

Validation shows "Manifest file not found" or "Service worker not found":

PWA not installable:

Validation Command

Use the validation command to check your PWA setup:

This checks for:

Note: The plugin serves manifest.json and sw.js dynamically through routes, not as physical files. The validation has been updated to check route registration instead of file existence.

Debug Information

Get detailed debug information about color detection and configuration:

The debug output includes:

Browser Developer Tools

Use browser developer tools to debug PWA issues:

  1. Chrome DevTools > Application > Manifest - Check manifest configuration
  2. Application > Service Workers - Monitor service worker status
  3. Application > Storage - Check cached resources
  4. Console - Look for PWA-related errors

๐Ÿ“š API Reference

FilamentPwaPlugin Methods

Basic Configuration

Display & Orientation

Internationalization

Installation & Features

Icons & Service Worker

PwaService Methods

๐Ÿ“– Documentation

๐Ÿงช Testing

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING for details on:

Adding New Language Support

To add support for a new language:

  1. Copy the English translation file:

  2. Translate all strings while preserving:

    • Array structure and keys
    • Placeholder variables (like :attribute)
    • Technical terms appropriately
  3. Test the translations in your application

  4. Submit a pull request with your translation

๐Ÿ”’ Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

๐Ÿ“ Changelog

Please see CHANGELOG for more information on what has changed recently.

๐Ÿ‘ฅ Credits

Translation Contributors

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.


**Made with โค๏ธ for the Filament community** [โญ Star this repo](https://github.com/aymanalareqi/filament-pwa) โ€ข [๐Ÿ› Report Bug](https://github.com/aymanalareqi/filament-pwa/issues) โ€ข [๐Ÿ’ก Request Feature](https://github.com/aymanalareqi/filament-pwa/issues)

All versions of filament-pwa with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^3.0|^4.0
illuminate/contracts Version ^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alareqi/filament-pwa contains the following files

Loading the files please wait ....