Changelog
v0.8.0 (2026-07-02)
Section titled “v0.8.0 (2026-07-02)”Retail-operations release, driven by the ordereka-fashion-pos field study. The whole @porulle/* family is versioned in lockstep — the jump from v0.1.0 reflects intermediate releases whose notes live in each package’s CHANGELOG.md.
- Store settings — org-scoped typed setting groups (
general,branding,policies) atGET/PATCH /api/settingsbehindsettings:manage, plus akernel.services.settings.read(orgId, group)runtime API that plugins and modules read from. Newstore_settingstable. See Store Settings. - Receipts & invoices — render an order as an HTML receipt, HTML invoice, or dependency-free PDF invoice (
GET /api/orders/:id/{invoice.pdf,invoice.html,receipt.html}), plusPOST .../invoice/email. Fiscal invoice numbers are allocated atomically per org and issued idempotently per order. Newinvoice_sequences,order_documentstables. See Receipts & Invoices. - Retail reports — a canned report pack at
GET /api/analytics/reports/*(daily-journal,tax-summary,inventory-aging,sell-through,reorder-needed,staff-sales) with store-timezone calendar math and prior-period deltas, behindanalytics:read. See Retail reports. - One-call variants —
POST /api/catalog/entities/:id/variants/quickand/bulkupsert option axes inline and seed a zero-stock inventory level so variants are sellable immediately. - Refund policy — line-level refunds (
refunded_quantitycolumn,order_refundsledger) with an optional per-operator daily cap (policies.refundDailyCap,403when exceeded) and an audited undo window (policies.refundUndoWindowMinutes, default 15). Endpoints under/api/orders/:id/refunds. See Refunds & Exchanges. - Order notes & timeline —
POST/GET/DELETE /api/orders/:id/notes(pinned-first) andGET /api/orders/:id/timelinemerging status history, notes, and refund events newest-first. Neworder_notestable. - Product tax classes — first-class
taxClasson entities and variants,/api/tax/classesCRUD behindtax:manage, and per-line checkout tax by class with order-level discounts pro-rated across lines. Newtax_classestable; classes take precedence over region rates when defined. See Tax Classes. - Integrator quick wins —
config.routes(app, kernel, auth)now receives the Better Auth instance;requirePermis a public export; orders and checkout accept anidempotencyKey(unique per org) so offline queues and retries replay exactly once. - Admin/operator API gaps — fulfillments with tracking, pricing-modifier CRUD, order line-item editing, cart listing + abandoned-checkout recovery, runtime shipping zones/rates + tax rates, and staff/RBAC admin REST. New scopes:
cart:manage,shipping:manage,tax:manage,staff:manage.
Plugin system
Section titled “Plugin system”PluginContext.auth— plugins now receive the Better Auth instance (when mounted bycreateServer) to mint/verify credentials.- Manifest
apiKeyScopes— plugins register named API-key scopes (withkeyExpirationbounds, in days) merged intoconfig.auth.apiKeyScopes. See Plugin Contract.
Plugins
Section titled “Plugins”@porulle/plugin-pos— PIN authentication (PUT/POST /api/pos/auth/*: set PIN, PIN login minting a short-lived per-shift API key, manager override; PBKDF2 via Web Crypto) and exchanges (POST /api/pos/exchangesrunning the return refund and replacement order in one transaction; even exchanges self-settle). See Point of Sale.@porulle/plugin-layaway(new) — partial-payment plans: reserve stock with a deposit, record installments, auto-complete to a cross-linked core order at full payment, forfeit policy hook. See Layaway.
Adapters
Section titled “Adapters”@porulle/adapter-neon(new) — Workers-grade NeonDatabaseAdapter: HTTP driver for queries, a fresh WebSocket pool per transaction, Hyperdrive-aware.
OfflineQueue— offline-first operation queue in@porulle/sdkwith pluggable persistence, idempotency-key stamping (pairs with core replay for exactly-once), FIFO drain with exponential backoff, and observable state. See Offline queue.
v0.1.0 — Alpha (2025-05-11)
Section titled “v0.1.0 — Alpha (2025-05-11)”Initial public release.
- Kernel:
createKernel/createServerfactory with modular service container - Catalog:
sellable_entitiesunified entity model — products, digital downloads, services, courses, gift cards, and custom types driven by configuration - Inventory: Per-warehouse stock tracking with optimistic locking (
versioncolumn), movement ledger, and automatic reservation at checkout - Cart: Session-based carts with price snapshot on add, promotion application, and merge on sign-in
- Checkout: Compensation-based pipeline — validate → reserve → price → tax → payment intent → order. Full rollback on failure.
- Orders: State machine (
pending → confirmed → processing → fulfilled/partially_fulfilled → refunded), fulfillment records (physical, digital download, service), and status history - Pricing: Time-bounded, quantity-tiered, customer-group prices; multiple currencies; modifier support
- Promotions: Six promotion types —
percentage_off_order,fixed_off_order,percentage_off_item,fixed_off_item,free_shipping,buy_x_get_y; usage limits; stackability rules - Search:
SearchAdapterinterface; built-in Meilisearch and PostgreSQL full-text implementations - Analytics: Semantic query compiler with built-in models for orders, line items, inventory, and customers; role-scoped query execution
- Job queue: Durable
commerce_jobstable with three runner strategies (cron endpoint, in-process polling, custom worker); exponential backoff; concurrency keys - Webhooks: HMAC-SHA256-signed delivery for 14 event types; retry with exponential backoff; delivery audit in
webhook_deliveries - Audit log: Append-only
commerce_audit_logfor all commerce events with actor tracking
Plugin system
Section titled “Plugin system”defineCommercePlugin: Config transform pattern — schema, hooks, routes, permissions, analytics models@porulle/db:defineTable,columnnamespace with auto-injectedid,organizationId,createdAt,updatedAtrouter()builder: Fluent route registration with.auth(),.permission(),.input(), OpenAPI auto-documentationcreatePluginTestApp: In-memory PGlite environment for plugin route testing
Official plugins
Section titled “Official plugins”| Plugin | Status |
|--------|--------|
| @porulle/plugin-marketplace | Alpha |
| @porulle/plugin-pos | Alpha |
| @porulle/plugin-pos-restaurant | Alpha |
| @porulle/plugin-uom | Alpha |
| @porulle/plugin-procurement | Alpha |
| @porulle/plugin-warehouse | Alpha |
| @porulle/plugin-production | Alpha |
| @porulle/plugin-notifications | Alpha |
| @porulle/plugin-scheduled-orders | Alpha |
| @porulle/plugin-reviews | Alpha |
| @porulle/plugin-appointments | Alpha |
| @porulle/plugin-gift-cards | Alpha |
Adapters
Section titled “Adapters”| Adapter | Package |
|---------|---------|
| PostgreSQL (Drizzle) | @porulle/adapter-postgres |
| AWS S3 | @porulle/adapter-s3 |
| Cloudflare R2 | @porulle/adapter-r2 |
| Local filesystem | @porulle/adapter-local-storage |
| Stripe | @porulle/adapter-stripe |
| Resend | @porulle/adapter-resend |
| AWS SES v2 | @porulle/adapter-ses |
| Meilisearch | @porulle/adapter-meilisearch |
| PostgreSQL full-text search | @porulle/adapter-pg-search |
| TaxJar | @porulle/adapter-taxjar |
| Manual / flat-rate tax | @porulle/adapter-tax-manual |
Authentication
Section titled “Authentication”- Better Auth integration with email/password, social login, and organization plugin
- Three-layer identity: auth identity (Better Auth), org membership, commerce profile (customer / vendor / staff)
- Scoped API keys:
catalog:read,orders:*,*:*, and custom scopes per plugin - Session-based customer portal (
/api/me) with per-customer data isolation
Breaking changes
Section titled “Breaking changes”None — this is the initial release.
Known limitations
Section titled “Known limitations”- Alpha: schema migrations are additive-only; no automated migration diffing for breaking column changes yet
@porulle/plugin-pos-restaurantand@porulle/plugin-productionAPIs are subject to change before stable- Analytics custom model joins are not yet supported (single-table models only)