Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
name: Tests
name: tests

on:
push:
branches: [main]
pull_request:
workflow_call:
workflow_dispatch:

jobs:

just-pass:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.4']
steps:
- run: echo "Just pass"
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, intl, bcmath
coverage: none

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

pest-tests:
if: false
uses: ./.github/workflows/run-pest-tests.yml
- name: Check code style
run: composer format:test

e2e-tests:
if: false
uses: ./.github/workflows/run-e2e-tests.yml
- name: Run tests
run: composer test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/vendor
/node_modules
.env
composer.lock
.phpunit.result.cache
.phpunit.cache
.DS_Store
22 changes: 5 additions & 17 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
The MIT License (MIT)
# The MIT License (MIT)

Copyright (c) komma-softhouse software development <[email protected]>
Copyright (c) Komma SoftHouse / Elias Olivtradet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Skeleton Plugin

🚀 Skeleton template for building Filament 5.x plugins | Komma SoftHouse plugin standard

This repository replaces the old `skeleton-module` (Laravel Modules) template for everything that ships as a **redistributable Filament plugin**. Internal app modules keep their own standard; anything installed via Composer into third-party Laravel apps starts here.

Built on the official Filament 5.x plugin guidelines:

- [Getting started](https://filamentphp.com/docs/5.x/plugins/getting-started)
- [Panel plugins](https://filamentphp.com/docs/5.x/plugins/panel-plugins)
- [Building a panel plugin](https://filamentphp.com/docs/5.x/plugins/building-a-panel-plugin)
- [Building a standalone plugin](https://filamentphp.com/docs/5.x/plugins/building-a-standalone-plugin)
- [Configurable resources and pages](https://filamentphp.com/docs/5.x/plugins/configurable-resources-and-pages)

## Requirements

- PHP >= 8.4
- Laravel >= 13.0
- Filament >= 5.0

## Creating a new plugin

1. On GitHub, click **Use this template** to create the new plugin repository.
2. Clone it and run the configurator:

```bash
php ./configure.php
```

Answer the prompts (plugin name, vendor, namespace, description). The script rewrites the package name, namespaces, class names and file names, optionally resets git history, and removes itself — the same workflow as the official Filament plugin skeleton.

3. Install and verify:

```bash
composer install
composer test
```

4. Read [`docs/how-to-build-a-filament-plugin.md`](docs/how-to-build-a-filament-plugin.md) — the Komma plugin standard — and start building.

## Using a plugin built from this skeleton

Register it in the host panel provider:

```php
use Komma\SkeletonPlugin\SkeletonPlugin;

public function panel(Panel $panel): Panel
{
return $panel
->plugin(
SkeletonPlugin::make()
->exampleFeature(),
);
}
```

Every feature toggle ships **disabled by default**: a host that enables nothing gets zero extra dependencies.

## What's inside

| Path | Purpose |
| ---------------------------------------- | -------------------------------------------------------------------------------------- |
| `src/SkeletonPlugin.php` | Panel plugin object (`getId` / `register` / `boot`, `make()`, `get()`, fluent toggles) |
| `src/SkeletonPluginServiceProvider.php` | `PackageServiceProvider` (spatie/laravel-package-tools) with asset registration notes |
| `config/skeleton-plugin.php` | Publishable config — toggles off by default |
| `resources/lang/*.json` | JSON translations keyed by English literals (`__('English literal')`) |
| `tests/` | Pest + Testbench with the full Filament 5 provider set |
| `.github/workflows/tests.yml` | CI: Pint (style) + Pest on PHP 8.4 |
| `docs/how-to-build-a-filament-plugin.md` | The Komma ecosystem plugin standard |

## Testing

```bash
composer test
```

## Credits

- [Elias Olivtradet](https://github.com/edeoliv)
- [All Contributors](../../contributors)

## License

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