# Shop Admin

## Package docs status

This page is generated from package source documentation in `the Capell packages repository` and the checked-in manifest. Source documentation is not distribution status. Before running a Composer command, verify that the exact package and compatible 1.x release are available through public Packagist or the authenticated marketplace account.

| Field | Value |
| --- | --- |
| Composer package | `capell-app/shop-admin` |
| Package slug | `shop-admin` |
| Product group | Capell Commerce |
| Tier | free |
| Bundle | `commerce` |
| Runtime contexts | `admin` |
| Capell version | `^1.0` |
| Catalogue role | extension |
| Release channel | Labs |
| Docs source | `packages/shop-admin/docs` |
| Manifest | `capell.json` |

<!-- prettier-ignore-start -->

A buyer rings to say the proof is approved, or a supplier emails an invoice for one order. You want that on the order itself, where the rest of your team will see it, and not in someone's inbox. This adds that place to the admin.

Open an order from the Shop orders list and you can add a private note or upload a file. Notes and files are listed oldest first with who added them and when. Buyers never see them, and once saved they cannot be edited or deleted. Files must be a PDF, PNG, JPEG, WebP or plain text file under the size limit your developer sets. They are not scanned for malware.

The same page lists the actions your other Shop packages offer for that order, such as booking a courier once it is paid. Each opens a small form, asks you to confirm anything that cannot be undone, and tells you whether it worked.

Four permissions control it, for viewing orders, adding notes and files, downloading files and running actions. You only see the orders of Stores linked to a Site you are assigned to. Global administrators see every Store.

- **Price and availability:** Not yet listed on the Capell Marketplace; price and availability are published with the listing.
- **Licence:** Published with the Marketplace listing.
- **Requires:** `PHP ^8.4`, `capell-app/admin ^1.0.78`, `capell-app/core ^1.0.79`, `capell-app/shop ^1.0.12`, `lorisleiva/laravel-actions ^2.8`, `spatie/laravel-package-tools ^1.14.1`.
- **Install:** `composer require capell-app/shop-admin:@beta`.

## Quick Start

1. Install the package: `composer require capell-app/shop-admin:@beta`.
2. Open the package admin page or resource and verify Shop Admin is available.

## For Developers

Every ability checks the permission and the operator's Store before Shop is called, and the download route answers 404 for any Store, order or attachment that does not belong together, so an attachment id cannot be used across Stores. Files are always sent as attachments with nosniff and no-store.

## Configure

This extension works without configuration. There is nothing to set after install.

## Limits And Pitfalls

- Install the required Capell packages at the versions in `composer.json`: `capell-app/admin ^1.0.78`, `capell-app/core ^1.0.79`, `capell-app/shop ^1.0.12`.
- Review middleware, throttling, signatures, and public-output safety in `routes/web.php` before exposing routes.

## Screens And Workflow

Docs gap: add `docs/screenshots.json` before promoting this package with visual workflow claims.

- Admin index screen if the package has a Filament resource.
- Create/edit screen if editors create records.
- Settings/configuration screen when settings exist.
- Frontend output when the package renders public pages.
- Package detail or install intent screen when marketplace-owned.

## Install Impact

- Required packages: `capell-app/admin`, `capell-app/core`, `capell-app/shop`.
- Admin navigation: declares `admin-resource: ShopAdminAdminResourcesContribution`; each Filament page or resource controls its own navigation visibility.
- Admin/editor extensions: none declared.
- Permissions: `View:ShopOrder`, `AddAttachment:ShopOrder`, `DownloadAttachment:ShopOrder`, `RunAction:ShopOrder`; access also governed by package policies: `ShopOrderPolicy`.
- Public routes: loads `routes/web.php`; registers `ShopAdminRoutesContribution`.
- Database changes: no package migrations declared.
- Config: no package config files.
- Settings: no package settings declared.
- Queues or schedules: none declared.
- Cache tags: none declared.
- Commands: none declared.

## Troubleshooting

| Symptom | Likely cause | Check | Fix |
| --- | --- | --- | --- |
| Package surface is missing after install | Provider or manifest is not loaded | Confirm `capell.json`, package `composer.json`, and provider registration | Reinstall the package, refresh Composer autoload, and clear host caches |
| Route returns unexpected output | Route cache, middleware, or signed URL setup does not match the package route file | Check the route files listed in `Technical Shape` | Clear route cache and verify middleware before exposing public routes |

## Upgrading

No manual steps between minor versions.

Read [CHANGELOG.md](CHANGELOG.md) before upgrading.

## Next Steps

- [Package docs](README.md)
- [Overview](overview.md)
- [Worked extension examples](extension-contracts.md)
- [Troubleshooting](#troubleshooting)
- [Developer reference](reference.md)
- [Capell content language plan](../../docs/CONTENT_LANGUAGE_PLAN.md)
- [Capell documentation design system](../../docs/DESIGN_SYSTEM.md)
- [Capell and package ERD notes](../../docs/erd/capell-and-package-erds.md)
- Related packages: [Shop](../shop/README.md).

<!-- prettier-ignore-end -->