PHPackages                             stats4sd/laravel-shiny-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stats4sd/laravel-shiny-loader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stats4sd/laravel-shiny-loader
=============================

This is my package laravel-shiny-loader

v1.2.1(2w ago)061MITPHPPHP ^8.4CI passing

Since Sep 11Pushed 2w agoCompare

[ Source](https://github.com/stats4sd/laravel-shiny-loader)[ Packagist](https://packagist.org/packages/stats4sd/laravel-shiny-loader)[ Docs](https://github.com/stats4sd/laravel-shiny-loader)[ GitHub Sponsors]()[ RSS](/packages/stats4sd-laravel-shiny-loader/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (52)Versions (12)Used By (0)

Laravel Shiny Loader
====================

[](#laravel-shiny-loader)

[![Latest Version on Packagist](https://camo.githubusercontent.com/da9e374b655818a76975c80c76d429e0c27ccb151f1c6a1f9bc8269711598c33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746174733473642f6c61726176656c2d7368696e792d6c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stats4sd/laravel-shiny-loader)[![Total Downloads](https://camo.githubusercontent.com/23f6c71a52f021394f15a6f1965e2e2a7a8b8900bf53df86916e23bffebc95a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746174733473642f6c61726176656c2d7368696e792d6c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stats4sd/laravel-shiny-loader)

A Laravel package that lets you embed Shiny apps into your Laravel application with iFrames.

...But surely that doesn't need a package? You're right - you can just use an iFrame and point it at your Shiny app (as long as the app is publicly accessible).

This package does more than that - it provides a way for Laravel to communicate with the Shiny app to:

- pass initialisation data into the app
- ensure that the current user is authenticated before loading the app.

How does it work?
-----------------

[](#how-does-it-work)

TODO: Update and bring over documentation from :

Requirements: one shiny server per Laravel app
----------------------------------------------

[](#requirements-one-shiny-server-per-laravel-app)

**All shiny apps embedded in one Laravel app must be served by a single shiny server instance, from a single root url.** Each app is served at `{root_url}/{app-name}/`, and the auth handshake relies on a `.sessions` directory at the shiny server's root, shared between all apps and readable by Laravel (same machine or a shared/mounted volume).

This means the app *names* are part of your application's structure: they must match the app's folder name on the shiny server in every environment, and your blade views reference them directly. They therefore live in the committed config file, not in `.env`. Only the root url and root path vary per environment.

Running apps individually with `shiny::runApp()` on ad-hoc ports is not supported — there is no shared root url in that mode. For local development, either run a shiny server (e.g. via Docker) serving all apps, or use the R package's `OVERRIDE_LARAVEL_AUTH=true` bypass (see [stats4sd/shiny-laravel-auth](https://github.com/stats4sd/shiny-laravel-auth)).

Installation
------------

[](#installation)

You can install the package via composer, then publish the config file:

```
composer require stats4sd/laravel-shiny-loader
php artisan vendor:publish --tag shiny-loader-config

```

Add the following properties to your .env file:

```
## Root url of the shiny server instance that serves ALL embedded shiny apps.
## Both the browser and the Laravel app must be able to reach this url.
SHINY_ROOT_URL="http://localhost:3838"

## Absolute path to the shiny server's site directory - the folder containing each app's folder
## and the shared `.sessions` directory used by the auth handshake.
SHINY_ROOT_PATH="/srv/shiny-server"

## A secret key that both the Laravel app and the Shiny apps know. This is used to authenticate
## requests from Laravel to the Shiny apps. It can be any string.
SHINY_AUTH_KEY="change-me"

```

Then register each embedded app's name in `config/shiny-loader.php` (names are folder names on the shiny server):

```
'apps' => [
    'monitor',
    'analysis',
],
```

Use
---

[](#use)

To enable authentication, register the auth route in your `routes/web.php` (wrap it in whatever auth middleware suits your app):

```
use Illuminate\Support\Facades\Route;

Route::middleware(['auth'])->group(function () {
    Route::shiny();
});
```

Embed an app with the ShinyIframe component, passing the app's *name* (it must be listed in `shiny-loader.apps`). You may optionally add `$postData` — an array of data to pass to the Shiny app when it loads:

```

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Dave Mills](https://github.com/dave-mills)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance96

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~78 days

Total

5

Last Release

17d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a7ba5ca40fde83339632231db5f6a95522c1de137f0029a338a5d90fa449a46?d=identicon)[dave-mills](/maintainers/dave-mills)

---

Top Contributors

[![dave-mills](https://avatars.githubusercontent.com/u/5711101?v=4)](https://github.com/dave-mills "dave-mills (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelStatistics for Sustainable Developmentlaravel-shiny-loader

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/stats4sd-laravel-shiny-loader/health.svg)

```
[![Health](https://phpackages.com/badges/stats4sd-laravel-shiny-loader/health.svg)](https://phpackages.com/packages/stats4sd-laravel-shiny-loader)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329575.9k33](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
