@ollie-shop/sdk
v0.2.1
Published
> **⚠️ PLANNED PACKAGE: This package is currently in the planning phase and will be implemented in the future.**
Readme
@ollie-shop/sdk
⚠️ PLANNED PACKAGE: This package is currently in the planning phase and will be implemented in the future.
A public SDK that will enable developers to create custom components for the Ollie Shop checkout experience.
Overview
The SDK will provide tools for merchants and developers to extend the standard checkout experience with custom components. These components can be registered by clients and dynamically loaded at runtime to replace default components or add new functionality at specific points in the checkout flow.
Core Concept
The Ollie Shop platform is designed with extensibility in mind. The SDK will be the primary way for developers to create custom extensions that seamlessly integrate with the checkout flow. This enables merchants to tailor the checkout experience to their specific needs without modifying the core application.
Key Features (Planned)
Component Slots System
The checkout UI will include predefined "slots" where custom components can be injected. This allows for precise placement of custom functionality within the checkout flow.
Some example slots will include:
- Header and footer areas
- Before/after cart items
- Around payment methods
- Within order summary sections
- Confirmation page elements
Dynamic Loading
Custom components will be loaded at runtime based on store configuration. The platform will:
- Identify which components to load for a specific store
- Fetch the required JavaScript and CSS resources
- Mount the components in their designated slots
- Provide access to checkout state and actions
Checkout State Access
Custom components will be able to access and interact with the checkout session data, allowing them to:
- Display information from the current checkout state
- Dispatch actions to update the checkout (add discounts, update quantities, etc.)
- React to changes in the checkout flow
Development Tools
The SDK will provide various tools to support the development of custom components:
- Component definition helpers
- Testing utilities
- Build tools for optimizing component bundles
- Development environment for testing integrations
Integration with Types
The SDK will work with the component registration system already defined in @ollie-shop/types, which provides the interface for how components are registered in the store configuration.
Use Cases
The SDK will enable various extensibility scenarios, such as:
- Loyalty program integrations
- Custom upsell components
- Store-specific branding elements
- Special checkout flows for different product types
- Integration with external systems (CRM, ERP, etc.)
Security and Best Practices
The SDK will be designed with security in mind:
- Components will run in a controlled environment with appropriate permissions
- Sensitive operations (like payment processing) will remain in the core platform
- Resource loading will follow strict content security policies
- Validation will ensure components cannot disrupt the checkout flow
License
Proprietary - All rights reserved
