# Feature: Sandbox chrome (platform)

## Purpose

When the app is not running in production, every browser page shows a fixed **Sandbox** bar at the top and bottom of the viewport so testers cannot mistake the instance for live.

## Boundaries

- **Owns:** `resources/views/components/sandbox-chrome.blade.php`, sandbox styles in `resources/css/app.css`, `sandbox-mode` class on the root HTML in `resources/views/app.blade.php`
- **Does not own:** Hosting/provisioning of a sandbox server, QuickBooks sandbox credentials (`QUICKBOOKS_ENVIRONMENT`), marketing or admin layouts
- **Depends on (platform only):** Laravel `APP_ENV` / `app()->isProduction()`
- **Depends on (other domains):** none
- **Removable?** No — shared kernel chrome (safe to delete the component + CSS if a deployment never uses non-production web)

## Models

None.

## Routes

None. Chrome is injected on the Inertia root view, so it appears on marketing, auth, app, and Super Admin pages after the first full page load and stays in the DOM across Inertia visits.

## Permissions

N/A. Visibility is environment-based, not role-based.

## Behaviour

| `APP_ENV` | Bars |
|-----------|------|
| `production` | Hidden |
| Any other value (`local`, `testing`, `staging`, …) | Fixed top + bottom bars labelled **Sandbox** |

The bars are `position: fixed` (viewport, not page flow). Body padding and sticky-header offsets keep app chrome from sitting under them.

## Tests

- Path: `laravel/tests/Feature/SandboxChromeTest.php`
- Cover: non-production HTML includes top and bottom bars; production HTML does not

## Add / remove checklist

### Add

- [x] Blade chrome + root-view class
- [x] CSS for bars and layout offset
- [x] This wiki page linked from `docs/README.md`
- [x] Feature tests passing

### Remove

- [ ] Delete `sandbox-chrome` component, CSS block, and `sandbox-mode` class
- [ ] Delete this page and index link
- [ ] Delete `SandboxChromeTest`
- [ ] Remaining suite still green
