docs: ecommerce-as-plugin ADR + README plugins section - #54
Conversation
|
Triage as part of Phase 5D (#104). Docs-only ( Still worth merging, with one caveat. The ADR argues shop belongs behind a plugin seam rather than in core, and that reasoning has held up: the plugin registration mechanism it anticipated now exists and is load-bearing ( The caveat is that it is still marked Status: Proposed and dated 2026-05-03, while parts of it have since shipped. Merging it as-is records a proposal, not a decision. Before merging it is worth either promoting it to Accepted with a note on what has landed, or leaving it explicitly Proposed so nobody reads it as settled. That is an editorial call about your own architecture record, so I have not rewritten it. Happy to do the status update and refresh if you want it. |
Summary
Proposes an official plugin mechanism for Khao Pad and ships the ADR for the first plugin: `@khaopad/plugin-shop` — small ecommerce for Thailand-first sites using BeamCheckout.
Why
The `codustry/bactrack-website` fork (live at bactrack.in.th) has a working, production-tested shop implementation with:
The whole thing sits cleanly beside Khao Pad's v2.0 surface — never modifies core tables, never assumes a shop exists in any core code path. That structure is exactly what a plugin should look like. Formalizing it lets:
What's in this PR
Explicitly not in this PR
The plugin mechanism itself. This PR is docs-only — an ADR to socialize the design before writing plugin infrastructure code. If reception is positive, next PR would be:
Estimated ~2 weeks focused work for both.
Test plan
🤖 Generated with Claude Code