Skip to main content

Order creation flow (primary use case)

The most complex data flow in MUZE is order creation. It touches every tier: The entitlement evaluation steps are detailed in Entitlement engine.

Authentication flow

On subsequent requests the browser sends the session cookie automatically. SessionGuard validates it against the Session table.

Data scoping flow

Every data query resolves scope the same way: URL-level enforcement is handled by ScopeGuard; query-level filtering happens in each service method. The implementation patterns are in Data scoping.

Client switching

For admins, the active client is application-wide state. Every client-sensitive query embeds activeClientId in its React Query key and sends ?clientId= to the API, so switching clients produces a new cache identity and an automatic refetch. The clientId parameter can only narrow a query, never widen it (see API design).