Reorderly platform standard

One business model for Selva, Derwent, and the next customer.

A canonical data model and implementation plan that keeps raw source evidence, normalized business facts, calculated projections, and workflow actions separate.

Proposed · 19 Aug 2026
The decision: Selva becomes the reference implementation, but Grist does not become the permanent schema. Reorderly owns a shared core; Selva and Derwent add modules; tenant-specific metadata uses typed custom fields.

The data flow

External systems
Source adapters
Raw evidence
Canonical facts
Projections & workflows

R2 stores immutable raw JSON or CSV artifacts. D1 stores identities, facts, provenance, projections, and workflow records. The dashboard reads explicit projections, not provider payloads.

Shared core

OrganizationThe Reorderly customer boundary. Every business-owned row is tenant-scoped.
Source connectionAn external Xero tenant, Zoho organization, MYOB file, or future connector account.
CatalogProducts, identifiers, aliases, suppliers, and product-to-material components.
PartiesCustomers, suppliers, locations, and markets. The canonical label is country, not territory.
FactsSales lines, inventory snapshots, supply events, receipts, and user adjustments.
PlanningPolicies, demand snapshots, replenishment runs, decision traces, and order lines.
Lineage & qualityRaw artifacts, source IDs, hashes, run counts, rejected rows, and durable issues.
Custom fieldsTyped tenant metadata without changing the canonical schema for every customer.

Selva and Derwent

SharedSelva moduleDerwent module
Organizations, source connections, catalog, suppliers, facts, demand, policies, replenishment, provenanceXero SG, Zoho MY/TH, country/market, customers and AR, product-to-material consumption, transit and spoilage, kg/cartonMYOB item identity, supplier acknowledgement, purchase orders, order baskets, exports, receipts, supplier lead times
Both use the same canonical product identity and source mapping contracts.Grist fields such as territory, helper columns, and QC columns stay at the adapter/quality boundary.vendors becomes the compatibility alias for the shared suppliers entity.

What belongs where

Raw layerImmutable source payloads, content hashes, object keys, and retention metadata. Used for replay and audit.
Fact layerStable business records such as sales lines, stock snapshots, customers, and supply events.
Projection layerCustomer monthly sales, burn rates, run-out dates, stock positions, and replenishment queues.
Workflow layerReviews, overrides, replenishment runs, purchase orders, acknowledgements, and receipts.

Important rules

Implementation sequence

PhaseOutcome
1. ContractFreeze vocabulary and Zod contracts for the shared model.
2. StorageAdd additive D1 tables, indexes, lineage, raw-artifact metadata, and typed quality issues.
3. AdaptersNormalize Xero, Zoho, Grist migration data, and MYOB into the same envelope.
4. FactsBackfill catalog, customers, sales, inventory, supply events, and provenance.
5. ProjectionsRebuild customer, stock, demand, run-out, and replenishment read models.
6. ExtensionsAdd custom fields, Selva materials/spoilage, and Derwent purchasing workflows.
7. CutoverDual-read and reconcile by source, country, account, month, quantity, and value before switching production reads.
8. Starter extractionExtract stable contracts, domain primitives, policy engine, adapter SDK, provenance helpers, and UI primitives into a versioned Reorderly starter.

Vocabulary in plain language

TermPlain meaning
EntityA business thing we care about, such as a Customer or Product.
RecordOne instance of an entity, such as one customer row.
FieldOne property of a record, such as country or credit limit.
SchemaThe formal shape and constraints of stored data.
Data modelThe conceptual map of business things, relationships, and rules. A schema is its technical encoding.
FactA recorded observation or transaction, such as an invoice line or stock snapshot.
ProjectionA calculated view built from facts for fast reading.
AdapterThe translator between a provider’s fields and Reorderly’s canonical meaning.
Custom fieldA tenant-defined typed property that is not yet part of the shared core.