Openship 4 is a Next.js 15 + KeystoneJS 6 order orchestration platform that connects shops (order sources) with channels (fulfillment providers) through intelligent matching and routing. This is the main codebase for the Openship 4 application.
For comprehensive technical details about the Openship 4 platform architecture, schema, and features, refer to:
features/platform/PLATFORM.md
This platform documentation explains:
- KeystoneJS data models and relationships (15+ models)
- Shop and channel adapter systems
- Two-tier platform architecture (platforms vs instances)
- Order orchestration and matching workflows
- GraphQL API structure and operations
- Access control and automation features
Openship 4 is a complete rewrite providing order orchestration between shops and fulfillment channels.
- Platform Level: ShopPlatform and ChannelPlatform define integration capabilities
- Instance Level: Shop and Channel are actual connections using platform templates
Shop Order → Order → Matching → CartItem → Channel Fulfillment → Tracking → Shop Notification
Key models include:
- Shop: Order source connections (Shopify stores, WooCommerce sites)
- Channel: Fulfillment provider connections (Amazon, 3PL providers)
- Order: Orders imported from shops for processing
- CartItem: Items being fulfilled through channels
- Match: Manual product mappings between shops and channels
- Link: Automated routing rules between shops and channels
- Order management and processing
- GET MATCH and SAVE MATCH functionality
- Bulk order processing
- Status tracking and fulfillment
- Shop connection management
- Order search and import
- Webhook configuration
- Link management for automated routing
- Channel connection management
- Product search and fulfillment
- Order tracking and management
- Webhook configuration
- Product matching interface
- Manual mapping creation and management
- Match analytics and performance tracking
// Execute shop platform functions
const result = await executeShopAdapterFunction({
platform: shopPlatform,
functionName: 'searchOrdersFunction',
args: { status: 'fulfilled', limit: 50 }
});// Execute channel platform functions
const result = await executeChannelAdapterFunction({
platform: channelPlatform,
functionName: 'createPurchaseFunction',
args: { products: cartItems, shipping: address }
});addMatchToCart- Add matched products to order cartmatchOrder- Apply product matches to orderplaceOrders- Process multiple orders for fulfillmentcreateChannelPurchase- Create purchase order on channelcancelOrder- Cancel order processing
searchShopOrders- Search orders from connected shopssearchShopProducts- Search products from shopssearchChannelProducts- Search products from channelsgetMatchQuery- Get product matches for order
- Sequential: Try channels in rank order until one succeeds
- Simultaneous: Send to all matching channels simultaneously
linkOrder: Auto-create cart items via Link rulesmatchOrder: Auto-create cart items via Match databaseprocessOrder: Auto-fulfill cart items immediately
- Automatic order import from shops
- Automatic tracking updates from channels
- Real-time status synchronization
features/
├── keystone/ # Data models and GraphQL schema
├── platform/ # Admin interface components
│ ├── orders/ # Order management
│ ├── shops/ # Shop connections
│ ├── channels/ # Channel connections
│ └── matches/ # Product matching
├── integrations/ # Shop and channel adapters
└── dashboard/ # Shared admin components
When working on Openship 4:
- Read Platform Documentation: Always reference the
features/platform/PLATFORM.mdfile for technical details - Verify Implementation: Check actual code rather than making assumptions about features
- Test Workflows: Ensure end-to-end functionality works as expected
- Follow Patterns: Use established adapter patterns for integrations
- Maintain Data Isolation: Ensure user-scoped data access
canCreateShops- Create new shop connectionscanManageShops- Manage shop settingscanCreateChannels- Create new channel connectionscanManageChannels- Manage channel settingscanManageOrders- Process and manage orders
All data is user-scoped - users only see their own shops, channels, orders, and matches.
- Openship 4 is a complete platform rewrite with modern architecture
- Uses sophisticated adapter patterns for flexible integrations
- Provides comprehensive order orchestration capabilities
- Includes real-time automation and webhook processing
- Supports multi-user environments with proper data isolation
This platform enables businesses to automate order fulfillment across multiple channels while maintaining centralized control and visibility.