Search by

vitamin2 / juicebox

vitamin2

This is the core Statamic addon used by VITAMIN 2.

Package info

github.com/vitamin2ag/juicebox

Type:statamic-addon

pkg:composer/vitamin2/juicebox

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 3

v0.4.3 2026-11-11 15:28 UTC

README

This is the core Statamic addon used by VITAMIN 2.

How to Install

You can install this addon via Composer:

composer require vitamin2/juicebox

Features live in features/, are registered by edalzell/laravel-features and, for the Statamic side (tags, fieldtypes, fieldsets, blueprints, routes, update scripts and control panel assets), by edalzell/statamic-features. Both are installed with this addon. They are autoloaded by the edalzell/laravel-features-plugin Composer plugin. Composer asks whether to allow it on install; if it was declined, allow it and rebuild the autoloader:

composer config allow-plugins.edalzell/laravel-features-plugin true
composer dump-autoload

Features

  • Redirects: redirects requests that would otherwise return a 404 to a new URL.
  • Secure Headers: sets security headers (HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy) on every web response.

Development

composer test            # full gate: analyse + lint:check + refactor:check + test:types + test:unit
composer test:unit       # pest (parallel)
composer test:types      # pest --type-coverage --min=100
composer test:coverage   # pest --coverage --min=100 (loads a coverage driver for the run)
composer test:mutate     # pest --mutate --min=100 (loads a coverage driver for the run)
composer test:browser    # builds the workbench, then the browser tests (needs npm ci and Playwright)
composer test:assets     # typecheck, oxlint and Prettier over the control panel sources (needs npm ci)
composer build           # builds the workbench
composer analyse         # phpstan
composer lint:check      # pint --test
composer refactor:check  # rector --dry-run

lint and refactor (without :check) apply fixes instead of just checking.

See docs/adding-a-feature.md for how to add a feature.

Workbench

A minimal Statamic 6 site (Orchestra Workbench) for trying the addon in a browser:

composer serve   # builds the workbench and starts it on http://127.0.0.1:8000

The control panel is at /cp. A seeded super user is available for local use: dev@vitamin2.digital / password (workbench/users/).