# Web POS Cashier Shell — v62

## Goal

v62 is the first release that turns `apps/web` from a bootstrap placeholder into
a cashier-facing POS workflow connected to the existing server-side sales,
payments, cash-shift and printing contracts.

## Included workflow

- Sanctum login/logout API for the web POS.
- Tenant entry and membership context resolution.
- Company / branch / register scope setup.
- Current shift detection.
- Shift opening and closing.
- Server-side cart creation.
- Barcode scan.
- Optimistic cart version handling.
- Quantity updates using unique client operation IDs.
- Checkout using idempotency keys.
- Full cash settlement.
- Sale refresh after payment.
- Receipt print job request.
- New-sale reset.
- Keyboard shortcuts: F2 barcode focus, F4 checkout.

## Security model

The new login endpoint performs authentication only. Domain authorization remains
in the existing IAM permission middleware on every protected route.

The browser token is kept in `sessionStorage`, not permanent local storage. A
logout request revokes the current Sanctum token, and closing the browser session
removes the local session material.

## Scope and limitations

v62 deliberately does not invent card-terminal behavior. The existing payments
domain requires an explicit provider outcome for card/external payments. Until
the provider/device integration is implemented, the cashier UI exposes the
fully supported cash path only.

Product addition is barcode-first because the current server sales contract
supports barcode scan as the authoritative cart-add operation.

## Development

Start Laravel on port 8000 and Vite normally. Vite proxies `/api` and `/up` to
Laravel, avoiding a separate development CORS dependency.

Use `php artisan demo:seed-retail` to create/refresh local demo data and obtain
the tenant public ULID printed by the command.
