app-state-diagram

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.

View:
Tags:
Semantic
Safe
Unsafe
Idempotent

Semantic Descriptors

Type ID Title Contained Extra Info
address address def:schema.org/addressdoc:Postal address information used for order delivery.
Cart Shopping Cart id
goProductList
goCheckout
doUpdateQuantity
doRemoveItem
def:schema.org/Carttag:collectiondoc:Contains selected products for purchase, with update and navigation actions.
Checkout Checkout email
address
goPayment
tag:processdoc:User confirms cart contents and inputs delivery information.
description description def:schema.org/descriptiondoc:Detailed textual description of the item.
doAddToCart Add product to cart id
quantity
rt:Cartdoc:Add a selected product to the cart with specified quantity.
doPayment Complete payment rt:ProductListdoc:Complete the payment and return to the product list upon success.
doRemoveItem Remove item from cart id rt:Cartdoc:Remove an item from the shopping cart by its identifier.
doUpdateQuantity Update item quantity id
quantity
rt:Cartdoc:Update the quantity of a specific item already in the cart.
email email def:schema.org/emaildoc:User email address used during checkout or account management.
goCart View shopping cart rt:Cartdoc:Open the cart page showing selected items and available actions.
goCheckout Proceed to checkout rt:Checkoutdoc:Start the checkout process to finalize purchase and enter delivery info.
goPayment Proceed to payment rt:Paymentdoc:Transition from checkout to payment screen.
goProductDetail View product details id rt:ProductDetaildoc:Transition to a page showing details of a specific product.
goProductList View product list id rt:ProductListdoc:Navigate to the list of all available products.
id identifier def:schema.org/identifierdoc:Unique identifier for an entity such as product or cart item.
name name def:schema.org/namedoc:Name of the product or user.
Payment Payment doPayment def:schema.org/PayActiontag:processdoc:Handles payment processing and transitions back to product list on success.
price price def:schema.org/pricedoc:Monetary price of the product, in the applicable currency.
ProductDetail Product Detail id
name
description
price
goProductList
doAddToCart
def:schema.org/Producttag:itemdoc:Detailed view of a single product, including pricing and cart action.
ProductList Product List id
name
description
goProductDetail
goCart
goProductList
def:schema.org/ItemListtag:collectiondoc:Screen displaying available products with basic info and navigation options.
quantity quantity def:schema.org/Quantitydoc:Number of units to purchase or update in the cart.

Profile

<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>