docs: README — RecordGod is a StoreGod module; live code = STOREGOD/plugins/recordgod
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
720afcaee4
commit
79b0f7e439
118
README.md
118
README.md
@ -1,51 +1,95 @@
|
|||||||
# RecordGod
|
# RecordGod
|
||||||
|
|
||||||
**The records back-office engine — the best of WowPlatter, reborn on Postgres, outside WordPress.**
|
**The records vertical** — Discogs-native intake, canon/lore enrichment, storefront, 3D vinyl,
|
||||||
|
and the store-side API that PriceGod codes against. Records is the first and biggest **module**
|
||||||
|
of StoreGod, not a standalone product.
|
||||||
|
|
||||||
RecordGod ingests WowPlatter's *job* (inventory, import, enrichment, labels, copy, queries)
|
> **Architecture is canonical in [../PLATFORM.md](../PLATFORM.md).** If this README disagrees
|
||||||
but not WowPlatter's *code*. It runs as its own service on the VPS, calls DealGod for market
|
> with that file, that file wins. Read it first for the three surfaces (dealgod.pro dashboard /
|
||||||
value, and feeds WordPress the tidy data it likes for the storefront.
|
> store admin / storegod.pro marketing) and the three keys.
|
||||||
|
|
||||||
WowPlatter is the **ancestral founder** — still running the live shop floor, and the reference
|
---
|
||||||
spec RecordGod matches before it retires anything. Honour the founder: don't redesign what
|
|
||||||
already works, copy it.
|
|
||||||
|
|
||||||
## Start here
|
## ⚠️ Status — this repo is the origin, not the live code
|
||||||
- **[RECORDGOD_PLAN.md](RECORDGOD_PLAN.md)** — the plan, the map, the keep/drop triage, build
|
|
||||||
order, and the open decisions. Read this first.
|
|
||||||
|
|
||||||
## The family (sibling repos on this machine)
|
RecordGod started life here as its own Postgres-native back-office app (a strangler replacing the
|
||||||
| Repo | What it is | Talks to RecordGod via |
|
old WordPress plugin). It has since been **migrated into StoreGod as a plugin**. The live shop
|
||||||
|---|---|---|
|
`robotmonster.party/admin` runs the StoreGod **`storegod-new`** image, and the records code it
|
||||||
| `../dealgod` | The **market** brain — cross-store value, arbitrage. Its own product. | RecordGod *calls* it (`X-API-Key`) for value |
|
executes is **`../STOREGOD/plugins/recordgod/`** — not this repo.
|
||||||
| `../PRICEGOD` | The seller **extension** (Discogs cockpit). Successor to pliceclogs. | Calls RecordGod's `wowplatter/v1` contract |
|
|
||||||
| `../wowplatter` | The founder — WP/WooCommerce plugin running the live store. | RecordGod publishes tidy data to it |
|
|
||||||
|
|
||||||
Briefs that define the contracts already live in `../PRICEGOD/DEALGOD_BRIEF.md` and
|
- **Canonical / live code:** `../STOREGOD/plugins/recordgod/` (mounted by `core.packs` when the
|
||||||
`../PRICEGOD/WOWPLATTER_BRIEF.md`. All three still hold; RecordGod is who fulfils the
|
store's `STOREGOD_MODULES` includes records). That tree is newer and is what deploys.
|
||||||
WowPlatter side of them.
|
- **This repo:** the originating standalone app + the full docs/history vault. Recent commits
|
||||||
|
here are kept in **parity** with the StoreGod plugin (e.g. the `storegod_v1` rename), but new
|
||||||
|
feature work lands in StoreGod. Treat this as **legacy/reference** — verify against the plugin
|
||||||
|
before trusting anything here as current.
|
||||||
|
|
||||||
|
If you are doing store-app work, work in `../STOREGOD`. This repo is for archaeology, the docs in
|
||||||
|
`docs/`, and the data/migration scripts at the root.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## The name change
|
||||||
|
|
||||||
|
**"WowPlatter" is dead.** It was the WordPress founder and the original API namespace. The name
|
||||||
|
is retired in favour of **StoreGod**. The API is now **`/storegod/v1`** (canonical) with
|
||||||
|
**`/wowplatter/v1`** kept only as a **legacy alias** for old PriceGod installs — remove once
|
||||||
|
nothing hits it. See `app/storegod_v1.py`.
|
||||||
|
|
||||||
|
## Where RecordGod sits in the platform
|
||||||
|
|
||||||
|
- **DealGod** is the brain (value / identify / lore / supply / ScanGod) and the account+billing
|
||||||
|
home. RecordGod is a **client** of it — the store server holds a **StoreGod connect key**
|
||||||
|
(minted in the dealgod.pro **STOREGOD tab**) and calls DealGod's `/api/*` server-side. See
|
||||||
|
`app/dealgod.py`.
|
||||||
|
- **StoreGod** is the store software a merchant runs. RecordGod is a **module inside it**, not a
|
||||||
|
separate service.
|
||||||
|
- **Management moved.** A store is provisioned and its connect key minted in the **dealgod.pro
|
||||||
|
STOREGOD tab** — there is no separate storegod.pro admin panel. **storegod.pro is a marketing
|
||||||
|
site only.**
|
||||||
|
- **PriceGod** (the Discogs seller extension) is the main API consumer. Staff laptops carry a
|
||||||
|
staff `rg_…` token (handed out via the one-paste **`SG1.` connect code**), authenticate to the
|
||||||
|
*store*, and the store proxies value to DealGod. No DealGod key ever touches the floor.
|
||||||
|
|
||||||
|
## The store contract (`/storegod/v1`)
|
||||||
|
|
||||||
|
The seam PriceGod codes against (`app/storegod_v1.py`, `require_token` in `app/auth.py`):
|
||||||
|
|
||||||
|
| Route | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `GET /ping` | connection test + identity chip (`store`, `plan`, `name`, `role`) |
|
||||||
|
| `GET /inventory/lookup?release_id=` / `?barcode=` | "do WE have this?" — the daily driver |
|
||||||
|
| `POST /inventory/intake` | new-stock intake → enrich from the `discogs_full` mirror → stage locally; carries `est_market_value` (the DealGod target from the PriceGod overlay) |
|
||||||
|
|
||||||
|
`release_id` (Discogs release id) is the universal join key. Intake stages non-destructively
|
||||||
|
(UPSERT on SKU); live/Woo stays authoritative for sale-state (see `docs/RECORDGOD_PLAN.md` §6).
|
||||||
|
|
||||||
|
## What's in this repo
|
||||||
|
|
||||||
|
```
|
||||||
|
app/ FastAPI app (main.py) — admin, shop, intake, sales, layout, payments (Square),
|
||||||
|
storegod_v1 contract, dealgod client, 3D virtual store
|
||||||
|
schema.sql inventory / virtual-store / sales tables, release_id-keyed, store_id seam
|
||||||
|
migrate*.py one-shot MariaDB(clone)→Postgres migrators
|
||||||
|
disc_sync.py, customer_woo_sync.py, shipping_sync.py, audio_sync.py, refresh.sh
|
||||||
|
data pipelines (Discogs disc art, Woo customer/shipping sync, previews)
|
||||||
|
docs/ the planning vault — RECORDGOD_PLAN.md (charter), WOWPLATTER_*_AUDIT/DEEPDIVE,
|
||||||
|
DIG_FLIP_HANDOVER, NAVIGATOR/STOREFRONT/AI_AGENT plans, SCANGOD bridge briefs
|
||||||
|
```
|
||||||
|
|
||||||
## Run it (dev)
|
## Run it (dev)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m venv .venv && ./.venv/bin/pip install -r requirements.txt
|
python3 -m venv .venv && ./.venv/bin/pip install -r requirements.txt
|
||||||
RECORDGOD_TOKEN=dev-tok ./.venv/bin/uvicorn app.main:app --reload --port 8010
|
RECORDGOD_TOKEN=dev-tok ./.venv/bin/uvicorn app.main:app --reload --port 8010
|
||||||
./.venv/bin/python test_smoke.py # self-check — no DB/infra needed
|
./.venv/bin/python test_smoke.py # infra-free self-check
|
||||||
```
|
psql recordgod < schema.sql # Postgres schema
|
||||||
Postgres schema: `psql recordgod < schema.sql`.
|
|
||||||
|
|
||||||
Live now: `GET /wowplatter/v1/ping`, `GET /wowplatter/v1/inventory/lookup?release_id=`.
|
|
||||||
Routes 3–5 (price / labels / intake) are intentionally **404** — PRICEGOD reads that as
|
|
||||||
"pending" and degrades gracefully, so an undefined route is the correct "not built yet" signal.
|
|
||||||
|
|
||||||
## Layout
|
|
||||||
```
|
|
||||||
app/
|
|
||||||
main.py FastAPI app + /healthz
|
|
||||||
db.py async SQLAlchemy over asyncpg (twin of DealGod's db.py)
|
|
||||||
auth.py require_token — Bearer; the one place the auth scheme lives
|
|
||||||
wowplatter_v1.py the contract router (ping + lookup live)
|
|
||||||
schema.sql minimal inventory table, release_id-keyed, store_id seam
|
|
||||||
test_smoke.py infra-free self-check
|
|
||||||
```
|
```
|
||||||
|
|
||||||
_Status: founding — scaffold runs, smoke test green. 2026-06-19._
|
DB is `recordgod-db` on the VPS. Deploy of the **live** store is a StoreGod baked-image rebuild
|
||||||
|
(`../STOREGOD`, `bash deploy.sh`), **not** a deploy of this repo — see PLATFORM.md § Hosting.
|
||||||
|
|
||||||
|
## Start here
|
||||||
|
|
||||||
|
- **[docs/RECORDGOD_PLAN.md](docs/RECORDGOD_PLAN.md)** — the founding charter, triage, and build order.
|
||||||
|
- **[../PLATFORM.md](../PLATFORM.md)** — the canonical platform architecture.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user