# Route contracts

The implemented application uses server-rendered Bootstrap forms and explicit GET/POST web routes. See WORKING-ROUTES.md and `php spark routes` for the active contract. Every mutation requires CSRF; protected routes require active staff and the domain permission. Auto-routing is disabled.

The JSON business API described in the original scaffold remains future work. No proposed API mutation is enabled. Implement API contracts and validate them before publishing those routes; use the same named domain services as the working web application.

In development only, GET /api/v1/scaffold is a manager-only diagnostic reporting working-core capability. It does not mean purchasing, production, QR or the complete ERP is implemented. /preview is a separate read-only design gallery and is excluded in production.

Current normalized permissions are in CafeSeeder: catalog.manage, inventory.manage, inventory.adjust, suppliers.manage, tables.manage, users.manage, settings.manage, reports.view, orders.add, payments.add, orders.prepare, payments.refund, orders.close_unpaid_loss, purchases.manage and production.manage. Do not reintroduce conflicting draft aliases.
