This ALPS profile defines descriptors and operations for a basic e-commerce application, including product listings, cart handling, and a checkout process, enabling seamless API communication between frontend clients and backend services.
Type | ID | Title | Contained | Extra Info |
---|---|---|---|---|
address | address | |||
Cart | Shopping Cart | id goProductList goCheckout doUpdateQuantity doRemoveItem |
||
Checkout | Checkout | email address goPayment |
||
description | description | |||
doAddToCart | Add product to cart | id quantity |
||
doPayment | Complete payment | |||
doRemoveItem | Remove item from cart | id | ||
doUpdateQuantity | Update item quantity | id quantity |
||
goCart | View shopping cart | |||
goCheckout | Proceed to checkout | |||
goPayment | Proceed to payment | |||
goProductDetail | View product details | id | ||
goProductList | View product list | id | ||
id | identifier | |||
name | name | |||
Payment | Payment | doPayment | ||
price | price | |||
ProductDetail | Product Detail | id name description price goProductList doAddToCart |
||
ProductList | Product List | id name description goProductDetail goCart goProductList |
||
quantity | quantity |
<alps
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://alps-io.github.io/schemas/alps.xsd">
<title>app-state-diagram</title>
<doc>This ALPS profile defines descriptors and operations for a basic e-commerce application, including product listings, cart handling, and a checkout process, enabling seamless API communication between frontend clients and backend services.</doc>
<!-- Ontology -->
<descriptor id="id" def="https://schema.org/identifier" title="identifier">
<doc>Unique identifier for an entity such as product or cart item.</doc>
</descriptor>
<descriptor id="name" def="https://schema.org/name" title="name">
<doc>Name of the product or user.</doc>
</descriptor>
<descriptor id="description" def="https://schema.org/description" title="description">
<doc>Detailed textual description of the item.</doc>
</descriptor>
<descriptor id="price" def="https://schema.org/price" title="price">
<doc>Monetary price of the product, in the applicable currency.</doc>
</descriptor>
<descriptor id="quantity" def="https://schema.org/Quantity" title="quantity">
<doc>Number of units to purchase or update in the cart.</doc>
</descriptor>
<descriptor id="email" def="https://schema.org/email" title="email">
<doc>User email address used during checkout or account management.</doc>
</descriptor>
<descriptor id="address" def="https://schema.org/address" title="address">
<doc>Postal address information used for order delivery.</doc>
</descriptor>
<!-- Taxonomy -->
<descriptor id="ProductList" def="https://schema.org/ItemList" title="Product List" tag="collection">
<doc>Screen displaying available products with basic info and navigation options.</doc>
<descriptor href="#id"/>
<descriptor href="#name"/>
<descriptor href="#description"/>
<descriptor href="#goProductDetail"/>
<descriptor href="#goCart"/>
<descriptor href="#goProductList"/>
</descriptor>
<descriptor id="ProductDetail" def="https://schema.org/Product" title="Product Detail" tag="item">
<doc>Detailed view of a single product, including pricing and cart action.</doc>
<descriptor href="#id"/>
<descriptor href="#name"/>
<descriptor href="#description"/>
<descriptor href="#price"/>
<descriptor href="#goProductList"/>
<descriptor href="#doAddToCart"/>
</descriptor>
<descriptor id="Cart" def="https://schema.org/Cart" title="Shopping Cart" tag="collection">
<doc>Contains selected products for purchase, with update and navigation actions.</doc>
<descriptor href="#id"/>
<descriptor href="#goProductList"/>
<descriptor href="#goCheckout"/>
<descriptor href="#doUpdateQuantity"/>
<descriptor href="#doRemoveItem"/>
</descriptor>
<descriptor id="Checkout" title="Checkout" tag="process">
<doc>User confirms cart contents and inputs delivery information.</doc>
<descriptor href="#email"/>
<descriptor href="#address"/>
<descriptor href="#goPayment"/>
</descriptor>
<descriptor id="Payment" def="https://schema.org/PayAction" title="Payment" tag="process">
<doc>Handles payment processing and transitions back to product list on success.</doc>
<descriptor href="#doPayment"/>
</descriptor>
<!-- Choreography -->
<descriptor id="goProductList" type="safe" rt="#ProductList" title="View product list">
<doc>Navigate to the list of all available products.</doc>
<descriptor href="#id"/>
</descriptor>
<descriptor id="goProductDetail" type="safe" rt="#ProductDetail" title="View product details">
<doc>Transition to a page showing details of a specific product.</doc>
<descriptor href="#id"/>
</descriptor>
<descriptor id="goCart" type="safe" rt="#Cart" title="View shopping cart">
<doc>Open the cart page showing selected items and available actions.</doc>
</descriptor>
<descriptor id="goCheckout" type="safe" rt="#Checkout" title="Proceed to checkout">
<doc>Start the checkout process to finalize purchase and enter delivery info.</doc>
</descriptor>
<descriptor id="goPayment" type="safe" rt="#Payment" title="Proceed to payment">
<doc>Transition from checkout to payment screen.</doc>
</descriptor>
<descriptor id="doAddToCart" type="unsafe" rt="#Cart" title="Add product to cart">
<doc>Add a selected product to the cart with specified quantity.</doc>
<descriptor href="#id"/>
<descriptor href="#quantity"/>
</descriptor>
<descriptor id="doUpdateQuantity" type="idempotent" rt="#Cart" title="Update item quantity">
<doc>Update the quantity of a specific item already in the cart.</doc>
<descriptor href="#id"/>
<descriptor href="#quantity"/>
</descriptor>
<descriptor id="doRemoveItem" type="idempotent" rt="#Cart" title="Remove item from cart">
<doc>Remove an item from the shopping cart by its identifier.</doc>
<descriptor href="#id"/>
</descriptor>
<descriptor id="doPayment" type="idempotent" rt="#ProductList" title="Complete payment">
<doc>Complete the payment and return to the product list upon success.</doc>
</descriptor>
</alps>