diff --git a/docs/PLUGIN-LAB-PRINTEDPARTS.md b/docs/PLUGIN-LAB-PRINTEDPARTS.md index 8d56a13..00e6589 100644 --- a/docs/PLUGIN-LAB-PRINTEDPARTS.md +++ b/docs/PLUGIN-LAB-PRINTEDPARTS.md @@ -17,6 +17,24 @@ Ground rules - DB columns: lowercase concatenated (`quantityonhand`, not quantity_on_hand). - Run `bash scripts/check-naming-and-style.sh` and the test suite at every checkpoint. +- Commit once per milestone. Working on a branch is fine; so is a fork. + +Know before you start +- You are building a BUNDLED plugin inside this repo. Plugin frontend files + live in core (`frontend/src/...`), and three core files get small edits: + `frontend/src/api/index.js` (api client), the router, and + `PLUGIN_TABLE_OWNERS` in `shopdb/plugins/alembic_template.py`. That is + normal for all 12 bundled plugins - external-plugin UI packaging does not + exist yet - so do not be confused when a "plugin" touches core. +- This plugin deliberately DIVERGES from the scaffold in three places, each + a teaching point you will hit in order: (1) it is NOT an asset type, so the + scaffold's AssetType seeding gets deleted (M1); (2) its migration is a REAL + baseline that creates tables, not a stamp-only anchor (M1); (3) its kiosk + take endpoint is the product's first UNauthenticated write - read the + decision record in the proposal before building it (M4). +- Instructor option: keep a solution branch with one commit per milestone + (tag `lab-m1`..`lab-m7`); a stuck learner can `git diff lab-m3 lab-m4` to + see exactly what a milestone changes. --- @@ -71,6 +89,12 @@ Build 5. Seed the 3 settings in `on_install` (Setting.set pattern - see how other plugins seed in `on_install`; category `printedparts`). +Tip - earlier visible win: as soon as the GET list endpoint works, jump ahead +and wire just the api client + router entry + a bare `PrintedItemsList.vue` +(first two steps of M3), seed two rows by hand, and look at your parts in the +browser. Everything before that moment is invisible; seeing the table makes +the rest of the lab concrete. Then come back and finish the mutations here. + Checkpoint ``` pytest plugins/printedparts/tests/ -q # write tests as you go: