Skip to content

docs: sync wiki with the shipped system - #2

Merged
PhilippTheServer merged 1 commit into
mainfrom
docs/sync-wiki-with-shipped-system
Aug 26, 2026
Merged

PhilippTheServer merged 1 commit into
mainfrom
docs/sync-wiki-with-shipped-system

Conversation

@PhilippTheServer

Copy link
Copy Markdown
Contributor

Closes #1

The wiki was last updated on 2025-12-07. This brings it back in line with what is actually
running, and adds a check so the next nine months of drift are noisy rather than silent.

What was wrong

Beyond being incomplete, several pages described a system that was never built:

Page Claimed Reality
home.md MySQL PostgreSQL 17
home.md Elasticsearch / Logstash / Kibana, Nginx gateway In no compose file
Database/Architecture.md shops, categories, item_categories, item_media, attributes, item_attributes, item_events None of these tables exist. 12 tables do, with item detail in JSONB
Getting-Started.md git clone PhilippTheServer/opentaberna Four repositories
Getting-Started.md /api/v1/items /v1/items/
Getting-Started.md GET /health → {"status":"healthy","version":"0.1.0"} {"status":"ok","timestamp":...}
Getting-Started.md GET / returns the API version 404

Nothing documented the authorization model, the order lifecycle, payments, the outbox,
returns, inventory, object storage or the storefront.

What changed

Every page rewritten against the running stack. Two new pages — Authorization.md and
Orders-and-Fulfillment.md — cover subsystems the wiki had never mentioned.

The database page keeps the old normalised design under "The road not taken", labelled as
a proposal, with the trade-off it was rejected for. A proposal read as a description is how
this drift started.

Verification

tools/check_wiki.py fails when the wiki drifts from the API: an endpoint no page
mentions, a documented path the API does not serve, or an internal link to a page that
does not exist. It reads a committed openapi.snapshot.json, so CI needs nothing running.

Against the old wiki content — the state this issue is about:

$ python3 tools/check_wiki.py
Checked 6 pages against 26 API paths.

27 problem(s):

  FAIL  API serves `/health/ready`, but no wiki page mentions it
  FAIL  API serves `/health`, but no wiki page mentions it
  FAIL  API serves `/v1/admin/inventory/by-sku/{}`, but no wiki page mentions it
  FAIL  API serves `/v1/admin/orders/pick-list`, but no wiki page mentions it
  FAIL  API serves `/v1/admin/orders/{}/label`, but no wiki page mentions it
  FAIL  API serves `/v1/admin/returns/{}`, but no wiki page mentions it
  FAIL  API serves `/v1/customers/me/addresses/{}`, but no wiki page mentions it
  ... 20 more

Against this branch:

$ python3 tools/check_wiki.py
Checked 8 pages against 26 API paths.
OK — every endpoint is documented, and every documented path exists.

The snapshot was generated from a live instance of the current main of
OpenTaberna/fastapi (26 paths), with the full dev stack running. All facts in these pages
— endpoints, health payloads, table columns, constraints, config defaults, the token flow —
were read from that running system or from source, not from the previous pages.

All four Mermaid diagrams were checked to render:

$ mmdc -i <each>.mmd -o <each>.svg
Architecture_0.mmd               OK
Orders-and-Fulfillment_0.mmd     OK
home_0.mmd                       OK
home_1.mmd                       OK

CI runs the check on every push and PR (.github/workflows/check-wiki.yml). It has not run
on this branch yet — this is the first workflow in the repository.

Also here

tools/serve.py renders the wiki locally at http://localhost:8090 with Mermaid and
working internal links, so pages can be reviewed before publishing. Standard library only.

One thing left for a human

Database/database_diagram_layout.jpg is now unreferenced — it pictures the schema that was
never built. I have left it in place rather than delete it unasked. Worth removing in a
follow-up if nobody wants it.

The wiki was last updated 2025-12-07. Since then the API grew from a single
item-store service to eleven service modules, gained a background worker, a
transactional outbox, MinIO object storage and Stripe, and a storefront landed
in OpenTaberna/frontend today.

Several pages did not just omit that — they described a system that was never
built. Database/Architecture.md documented seven tables that do not exist,
home.md named MySQL and diagrammed an ELK stack, and Getting-Started.md cloned a
repository layout that was never real and documented endpoints under /api/v1
rather than /v1.

Rewritten against the running stack:

- home.md — PostgreSQL, the real components, the four repositories
- Getting-Started.md — the seven-container stack, both frontends, real ports,
  real health payloads, working token flow
- API/Architecture.md — all 26 endpoints, response envelope, error categories
- Database/Architecture.md — the 12 tables that exist, and why the normalised
  proposal it used to describe was not built
- Configuration.md — every setting, including storage, Stripe, DHL, worker
  and outbox
- Deployment.md — that docker-compose.yml ships only the API, and what else
  a production deployment therefore needs

Added Authorization.md and Orders-and-Fulfillment.md, covering two subsystems
the wiki had never documented at all.

tools/check_wiki.py fails when the wiki drifts from the API again: an endpoint
no page mentions, a documented path the API does not serve, or a broken internal
link. It reads a committed OpenAPI snapshot so CI needs nothing running.
tools/serve.py renders the wiki locally for review.

Closes #1

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YY1ekLLeFLkAU2kvdQ8Ey4
@PhilippTheServer
PhilippTheServer merged commit 8e224db into main Aug 26, 2026
1 check passed
@PhilippTheServer
PhilippTheServer deleted the docs/sync-wiki-with-shipped-system branch August 26, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wiki is nine months out of date with the shipped system

1 participant