Core Overview
WIPThe framework-agnostic upload engine core.
The core module holds the upload engine, contracts, persistence layer, and utilities. Framework-agnostic — works without React.
Exports
From @gentleduck/upload/core:
createUploadStore,createUploadClientUploadApi,UploadTransport,StrategyRegistryUploadCommand,UploadEventMap,UploadOutcomeLocalStorageAdapter,IndexedDBAdapter,MemoryAdapter- Shared utilities (
isRecord,sleep,generateId, etc.)
Submodules
| Module | Description |
|---|---|
| client/ | Configuration, plugins/hooks, and createUploadClient |
| engine/ | Reducer, scheduler, handlers, events |
| contracts/ | API and transport interfaces |
| persistence/ | Snapshot serialize/deserialize and storage adapters |
| utils/ | Shared helpers |
Design Principles
- Immutable state snapshots for predictable UI updates.
- Single event emission layer for consistent public events.
- Typed results end-to-end from backend to UI.
- Strategy-driven uploads to keep the engine protocol-agnostic.
See Engine for state machine and scheduler details.