docs: ecommerce-as-plugin ADR + README plugins section#54
Open
thunpisit wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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