@isaiahiroko/tilmart-ntx-apps-commerce
v0.2.12
Published
The Tilmart commerce domain (TRD §7.2). This lib is the R1 home for the catalog, cart, order, payment, fulfilment, returns, warranty, promotions and content models — built out across P1–P6.
Readme
@isaiahiroko/tilmart-ntx-apps-commerce
The Tilmart commerce domain (TRD §7.2). This lib is the R1 home for the catalog, cart, order, payment, fulfilment, returns, warranty, promotions and content models — built out across P1–P6.
Current state (post-P0.7): the Salama grocery-subscription domain (Household / Subscription / Cycle / BasketTemplate / Procurement) has been retired. What remains is the reusable skeleton the reuse ladder (TRD §3) keeps:
api/payment+api/payment/providers— the Paystack / Flutterwave hosted-checkout clients andx-paystack-signature/verif-hashsignature verification, reused near-verbatim (TRD §2.3, §10.1). ThePaymententity is stripped to its provider/amount/status shape; P4.5/P4.9 addorderId+method+PaymentAttempt.pkg/workflow/WorkflowService— the plain, non-request-scoped workflow service pattern (callable from an HTTP request, a cron, a webhook subscriber). OnlyverifyPayment(the no-unpaid-dispatch enforcement point, TRD §8.3) is carried over; P4 growsOrderWorkflow/CartWorkflow/FulfilmentWorkflowhere.api/{address,product,product-price-quote,route,delivery,referral, complaint-log}— minimal ancestor entities (TRD §2.3). Salama FK columns (householdId / cycleId / subscriptionId) are stripped; P1 (catalog,Product) and P4/P5 (Address,Delivery→Shipment,Referral,ComplaintLog) rebuild them properly.api/reports— the Excel/PDF export scaffold only (TRD §10.5). The ANA-* read models are built inlibs/adminover the domain tables (P7.4).
admin, buyer and (from R2) installer / seller depend on this lib for
entities/repositories and expose their own permissioned API surface over the
same data.
Convention (Salama's, kept): src/api/{resource}/{entities,dto,*.service,
*.controller,*.module,index}.ts per resource, one migration file per table
in src/migrations/, shared enums in src/app.config.ts, and an index.ts
barrel re-exporting everything so sibling libs can depend on it as a real
npm package.
Mounted at apps/commerce by cloud/server.
