Universal Commerce Protocol
The standard for building commerce-enabled applications. Decouple your business logic from backend implementation details.
What is UCP?
The Universal Commerce Protocol (UCP) is an open standard that defines a unified interface for commerce operations. It abstracts away the complexity of different e-commerce backends (Shopify, Magento, Salesforce, etc.) into a single, consistent API.
UCP Java is the reference implementation for the JVM, built on top of Spring Boot. It provides:
- A unified domain model (Product, Cart, Order, Customer)
- Standardized Service Provider Interfaces (SPIs)
- Automatic configuration and wiring
Who is this for?
🚀 Platform Builders
Building a SaaS that needs to integrate with your customers' existing stores? Write your integration once against UCP and support every major commerce backend instantly.
🔗 Integration Specialists
Connect ERPs, CRMs, and POS systems to multiple e-commerce platforms without maintaining N distinct integration codebases. Normalize data at the edge.
🏢 Enterprise Teams
Migrating from a monolith to microservices? Or merging multiple acquired brands? Use UCP as an anti-corruption layer to standardize commerce logic across your organization.
Why UCP?
⚡ Unified Domain Model
Stop mapping JSON manually. Use standardized Product, Cart, and
Order POJOs that behave consistently across any backend implementation.
🔧 Spring Boot Native
Zero-boilerplate configuration. Add the starter, define your properties, and inject `CommerceAdapter`. It feels just like using Spring Data.
🔌 Extensible SPI
Need to support a custom legacy backend? Implement a few interfaces (CatalogSPI,
CartSPI) and UCP handles the rest.
🛡️ Resilience Built-in
Production-grade by default. Circuit breakers, retries, and fallback mechanisms are baked into the core protocol adapter.
Quick Install
dependencies {
implementation 'dev.ucomprotocol:ucp-spring-boot-starter:1.0.0'
}
Simple Usage
@Service
public class ProductService {
private final CommerceAdapter commerceAdapter;
public ProductService(CommerceAdapter commerceAdapter) {
this.commerceAdapter = commerceAdapter;
}
public Product getProduct(String id) {
return commerceAdapter.getCatalogAdapter()
.getProductById(id)
.orElseThrow();
}
}