# frontend-admin Specification ## Purpose The platform console for managing users, shops and currencies. ## Requirements ### Requirement: Platform user and shop management Platform admins SHALL assign user roles (with shop scope), create shops, and suspend/activate shops. Suspended shops' products MUST NOT be purchasable (enforced by API, reflected in UI). #### Scenario: assign shop owner - **WHEN** an admin assigns role shop_owner with a shop to a user - **THEN** that user can log into shop-admin and manage that shop ### Requirement: Currency management Platform admins SHALL view currencies and update exchange rates; new rates affect subsequent conversions. #### Scenario: rate update - **WHEN** an admin updates CNY rate_to_base - **THEN** the mall conversion endpoint returns amounts computed with the new rate ### Requirement: Platform points mall management Platform admins SHALL manage points products and inspect and fulfill redemption orders through the admin console using the shared API contract. Admin SHALL expose points-mall navigation beside existing platform operations. #### Scenario: manage a redemption catalog item - **WHEN** a platform admin publishes a configured points product - **THEN** it becomes available in the customer points mall #### Scenario: points mall appears in admin navigation - **WHEN** an authenticated platform admin opens the admin console - **THEN** points-product and redemption-order management are reachable from the console nav ### Requirement: Shared design system in the platform console The platform admin console SHALL use `@vmall/ui` primitives and `@vmall/shared` theme tokens for chrome (buttons, fields, cards, tables, page headers, nav). It MUST NOT depend on Element Plus or the removed `ui.css` stylesheet. #### Scenario: console chrome from the kit - **WHEN** an authenticated platform admin opens the dashboard - **THEN** primary actions and page chrome render through the shared kit with the current accent preset ### Requirement: Accent preset switcher Platform admin SHALL expose the shared accent preset control (`red`, `blue`, `teal`, `violet`) in the authenticated shell header. #### Scenario: switcher visible - **WHEN** an authenticated platform admin opens the console - **THEN** they can select an accent preset without leaving the current page