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
323 changes: 222 additions & 101 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,141 +1,262 @@
# Frosh Tools

This plugin contains some utility functions for managing a Shopware 6 shop.

The current feature set consists of:

- **System-Status**
- Checks PHP Version, MySQL, Queue is working etc.
- Checks for performance optimizations and links documentation
- **Cache Manager**
- Lists App and Http Cache and all folders in var/cache
- Clear specific caches
- Compile theme
- **Scheduled Task Manager**
- Shows all Scheduled Tasks and can execute one specific
- Edit interval and next execution
- Register Scheduled Tasks
- **Queue Manager**
- Shows the amount of messages in the queue
- Reset queue
- **Elasticsearch Manager**
- Shows the current status of the Elasticsearch nodes & cluster
- Lists all indices of the Elasticsearch instance
- Quick actions for index handling
- Execute Elasticsearch console commands
- **Log Viewer**
- Shows the entries of /var/log/*.log files
- **Security Center**
- Dependency advisories, runtime end-of-life checks, and file integrity
- Export a CycloneDX 1.7 SBOM (`sbom.cdx.json`) from `composer.lock`
- **Shopware File Checker**
- Checks if core files have been changed
- **State Machine Viewer**
- basic view of order, transaction and delivery states
- **Override system config by config files**
- Overwrite any system config value with static or environment values
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md)
[![Shopware](https://img.shields.io/badge/Shopware-6.6%20%7C%206.7-189eff.svg)](https://www.shopware.com/)
[![Packagist](https://img.shields.io/packagist/v/frosh/tools.svg)](https://packagist.org/packages/frosh/tools)

## Installation
**Operator toolkit for Shopware 6** — health checks, cache & queue ops, security audits, logs, Elasticsearch tooling, and more, directly in the Administration.

### Git
- Clone this repository into custom/plugins of your Shopware 6 installation
- Install composer dependencies `shopware-cli extension prepare custom/plugins/FroshTools`
- Build the assets with `shopware-cli extension build custom/plugins/FroshTools`
Maintained by [FriendsOfShopware](https://friendsofshopware.com).
Repository: [github.com/FriendsOfShopware/FroshTools](https://github.com/FriendsOfShopware/FroshTools)

### Packagist
composer require frosh/tools
bin/console plugin:refresh
bin/console plugin:install --activate FroshTools
---

### Store (Bearer token required from packages.shopware.com)
composer require store.shopware.com/froshtools
bin/console plugin:refresh
bin/console plugin:install --activate FroshTools
## Why Frosh Tools?

## Commands
Shopware shops accumulate operational work that usually needs SSH, Redis CLIs, Elasticsearch dashboards, or ad-hoc scripts. Frosh Tools brings those day-to-day tasks into the Admin under **Settings → Plugins → Tools**, so merchants and developers can inspect and act without leaving the browser.

### `frosh:dev:robots-txt` - For testshops - add/change robots.txt to stop crawlers
| For operators | For developers |
| --- | --- |
| Clear caches & compile themes | System health + performance recommendations |
| Inspect queues and scheduled tasks | Feature flags, state machines, webhooks |
| Read production logs | Elasticsearch console & index lifecycle |
| Security overview + SBOM export | File integrity for core and extensions |
| Monitor tasks/queues via CLI mail alerts | Redis namespace/tag cleanup helpers |

```bash
bin/console frosh:dev:robots-txt
```
Compatible with **Shopware 6.6 and 6.7**.

### `frosh:dev:robots-txt -r` - For testshops - revert changes in robots.txt
---

```bash
bin/console frosh:dev:robots-txt -r
```
## Screenshots

### `frosh:composer-plugin:update` - update plugins managed by composer
```bash
bin/console frosh:composer-plugin:update
```
Full HD (1920×1080) captures from Shopware **6.7** Administration. Images are WebP for a smaller repo footprint.

### `frosh:monitor` - Monitor your scheduled tasks and queue with this command and get notified via email.
```bash
bin/console frosh:monitor <sales-channel-id>
```
Only screens that show real product value are included — empty states (disabled Elasticsearch, unconfigured Shopmon marketing CTA) are omitted on purpose.

### `frosh:es:delete-unused-indices` - Delete unused Elasticsearch indices
```bash
bin/console frosh:es:delete-unused-indices
```
### System Status

### `frosh:extension:checksum:check` - Check extension file integrity
```bash
bin/console frosh:extension:checksum:check [extension-name]
```
Live health checks (PHP, MySQL, queue, tasks, …) plus performance recommendations with documentation-oriented guidance.

### `frosh:extension:checksum:create` - Create extension checksums
```bash
bin/console frosh:extension:checksum:create [extension-name]
```
![System Status](docs/images/system-status.webp)

### Security Center

Dependency advisories, runtime end-of-life checks, configuration risks, file integrity — and **Export SBOM** (CycloneDX 1.7 from `composer.lock`).

![Security Center](docs/images/security-center.webp)

### Cache Manager

List cache pools, clear individual pools, compile the theme, and clear PHP OPcache.

![Cache Manager](docs/images/cache.webp)

### Statistics

OPcache hit rate/memory, cache backend metrics, and database server statistics.

![Statistics](docs/images/statistics.webp)

### Queue Manager

Transport overview (Doctrine, Redis, AMQP, …), message sizes, worker heartbeat, browse/retry/delete messages, purge or reset.

![Queue Manager](docs/images/queue.webp)

### Scheduled Tasks

Inspect all tasks, edit interval & next run, run a single task, register missing tasks.

![Scheduled Tasks](docs/images/scheduled-tasks.webp)

### State Machine Viewer

Interactive diagrams for order, payment, delivery, and other registered state machines.

![State Machine Viewer](docs/images/state-machines.webp)

### Log Viewer

Browse any file under `var/log/` from the Admin.

![Log Viewer](docs/images/log-viewer.webp)

### Feature Flags

List core and extension feature flags; toggle where supported.

![Feature Flags](docs/images/feature-flags.webp)

### Webhooks

Dedicated list/detail UI for Shopware webhooks (including inline search).

![Webhooks](docs/images/webhooks.webp)

---

## Features

### Administration — Tools module

| Area | Capabilities |
| --- | --- |
| **System Status** | Health checkers (PHP/FPM, MySQL, queue lag, scheduled tasks, composer audit summary, debug/prod mode, …) and a large set of **performance recommendations** (admin worker, mail-over-queue, increment storage, OPcache flags, ES, product-stream indexing, …). |
| **Security Center** | Severity overview; Packagist dependency advisories; PHP / MySQL / Symfony / Shopware EOL; environment risks; **core & extension file integrity**; **CycloneDX 1.7 SBOM export**. |
| **Cache** | Pool listing with clear actions, theme compile, OPcache clear. |
| **Statistics** | OPcache, cache-adapter, and database metrics for capacity troubleshooting. |
| **Queue** | Multi-transport support (Doctrine, Redis, AMQP, fallback); browse without consuming (or fetch+requeue); retry failed messages; purge transport; reset queue. |
| **Scheduled Tasks** | List, run, deactivate; edit interval & next execution; register tasks. |
| **State Machines** | Diagram viewer for any registered state machine. |
| **Log Viewer** | Read `var/log/*.log` in the browser. |
| **Feature Flags** | Inspect and toggle flags from core/plugins. |
Comment thread
shyim marked this conversation as resolved.
| **Elasticsearch** | Status, indices, reindex, alias switch, unused/orphaned cleanup, console. Optional `show_all_indices`. |
| **Fastly** | Purge all / by URL and basic stats when Fastly is configured. |
| **Shopmon** | Optional integration setup for external Shopmon monitoring. |
| **Webhooks** | Separate Admin module to create, search, and manage webhooks. |

### Status badge in the Admin header

The Shopware version indicator is extended with a compact **health status** (success / warning / error) so problems surface without opening Tools.

### Console commands

| Command | Purpose |
| --- | --- |
| `frosh:dev:robots-txt` | Block crawlers on test shops (`-r` to revert) |
| `frosh:composer-plugin:update` | Update Composer-managed plugins |
| `frosh:monitor <sales-channel-id>` | Email alert when queues/tasks exceed grace times |
Comment thread
greptile-apps[bot] marked this conversation as resolved.
| `frosh:es:delete-unused-indices` | Delete unused Elasticsearch indices |
| `frosh:extension:checksum:check [name]` | Verify extension file integrity |
| `frosh:extension:checksum:create [name]` | Create extension checksum manifests |
| `frosh:redis-namespace:list` | List Redis namespaces *(experimental)* |
| `frosh:redis-namespace:cleanup` | Clean Redis namespaces (`--dry-run` supported) *(experimental)* |
| `frosh:redis-tag:cleanup` | Clean Redis tags |
| `frosh:twig:warmup` | Warm Twig template cache |
| `frosh-tools:health-check-json` | Print merged health-check results as JSON (CI / monitoring) |

---

## Requirements

- Shopware **6.6** or **6.7**
- PHP version required by your Shopware minor
- Admin ACL privilege `frosh_tools:read` (and webhook privileges where applicable)

---

## Installation

### Composer (recommended)

### `frosh:redis-namespace:cleanup` - Clean up Redis namespaces (experimental)
```bash
bin/console frosh:redis-namespace:cleanup [--dry-run]
composer require frosh/tools
bin/console plugin:refresh
bin/console plugin:install --activate FroshTools
bin/console cache:clear
```

### `frosh:redis-namespace:list` - List Redis namespaces (experimental)
### Shopware Store package

```bash
bin/console frosh:redis-namespace:list
composer require store.shopware.com/froshtools
bin/console plugin:refresh
bin/console plugin:install --activate FroshTools
bin/console cache:clear
```

### `frosh:redis-tag:cleanup` - Clean up Redis tags
> Store installs need a valid `packages.shopware.com` Composer auth token.

### From Git (development)

```bash
bin/console frosh:redis-tag:cleanup
git clone https://github.com/FriendsOfShopware/FroshTools.git custom/plugins/FroshTools
shopware-cli extension prepare custom/plugins/FroshTools
shopware-cli extension build custom/plugins/FroshTools
bin/console plugin:refresh
bin/console plugin:install --activate FroshTools
bin/console cache:clear
```

## Suppress files from being restorable in FileChecker
After activation, open **Settings → Plugins → Tools** (or search for “Tools” in the Admin).

---

## Configuration

Optional Symfony config — create `config/packages/frosh_tools.yaml`:

```yaml
# config/packages/frosh_tools.yaml
frosh_tools:
# Skip specific health/performance checkers by id (when needed)
checker:
disabled_checks: []

# Paths that File Checker should not offer to restore
file_checker:
exclude_files:
- vendor/shopware/core/FirstFile.php
- vendor/shopware/core/SecondFile.php

# Elasticsearch manager: list every index instead of only Shopware prefixes
elasticsearch:
show_all_indices: false
```
Comment thread
greptile-apps[bot] marked this conversation as resolved.

## Show all Elasticsearch indices
Plugin system config (Admin → Extensions → Frosh Tools):

By default, the Elasticsearch manager only shows indices matching the configured Shopware index prefixes (`elasticsearch.index_prefix` / `elasticsearch.administration.index_prefix`). To list (and manage) all indices of the cluster instead:
- **Monitor mail address** — recipient for `frosh:monitor`
- **Queue grace time** (minutes) — when a queue is considered stuck
- **Task grace time** (minutes) — when a scheduled task is considered stuck

```yaml
# config/packages/frosh_tools.yaml
frosh_tools:
elasticsearch:
show_all_indices: true
JSON Schema for IDE validation: [`frosh-tools-schema.json`](frosh-tools-schema.json).

---

## Monitoring & CI hooks

```bash
# Human-oriented mail alert (cron)
bin/console frosh:monitor <sales-channel-id>

# Machine-readable health snapshot
bin/console frosh-tools:health-check-json
```

## Screenshots
Wire the JSON command into uptime checks, deploy gates, or external monitors. The Security Center **Export SBOM** action produces a CycloneDX 1.7 document suitable for dependency scanners.

---

## Development

```bash
# Format / static checks via shopware-cli (Docker)
composer format
composer check

# PHPUnit (from a Shopware project that requires this plugin)
composer phpunit
```

Admin sources live under `src/Resources/app/administration`. Rebuild with:

```bash
shopware-cli extension build custom/plugins/FroshTools
# or, from the Shopware root:
bin/build-administration.sh
```

---

## Links

- [GitHub Issues](https://github.com/FriendsOfShopware/FroshTools/issues) — bugs & feature requests
- [FriendsOfShopware](https://friendsofshopware.com)
- [Shopware Store listing](https://store.shopware.com/) (search “Frosh Tools”)
- Maintainer: [Soner Sayakci (@shyim)](https://github.com/shyim)

---

## License

![System Status](https://i.imgur.com/tKVIvFh.png)
![Cache Manager](https://i.imgur.com/9aIpljE.png)
![Scheduled Task Manager](https://i.imgur.com/osXwRgk.png)
![Queue Manager](https://i.imgur.com/Jca0Diw.png)
![Log Viewer](https://i.imgur.com/521xMdS.png)
![File Checker](https://i.imgur.com/WslZDJ3.png)
![Elasticsearch Manager](https://i.imgur.com/BtU7jTu.png)
![Feature Flags](https://i.imgur.com/VL0gLeM.png)
![State Machine Viewer](https://i.imgur.com/LAsbFMY.png)
[MIT](LICENSE.md)
Binary file added docs/images/cache.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/feature-flags.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/log-viewer.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/queue.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/scheduled-tasks.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/security-center.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/state-machines.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/statistics.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/system-status.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/webhooks.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading