OctoWiki
Memory Appendix

Memory Appendix

Verbatim dump of every persistent-memory file Claude accumulated on the Octopus project.

This appendix preserves every file from Claude Code's persistent project memory, verbatim, so nothing is lost in the handover. These notes were written incrementally while working on the codebase; they capture decisions, gotchas, and conventions that are often not obvious from the code alone.

Each note carries an original category: project/investigation facts, or feedback/working-preference conventions. Treat feedback notes as "house style / rules the previous maintainer asked to be followed."

Project & investigation notes

NoteSummary
Client Portal DeployClient portal (frontend/client/, Next.js) is deployed to Cloudflare Pages, not via the systemd deploy scripts in deploy/
G2A Import IntegrationG2A Import API integration — Octopus as SERVER/sales-channel for G2A marketplace (inbound API), confirmed scope
Neocurrency Spec DriftNeoCurrency production wire shapes contradict the OpenAPI spec in several places — the spec is unreliable. Prefer json.RawMessage for fields where prod/spec dis
Octopus DocsHow nav/sidebar/prev-next works in frontend/octopus-docs (Fumadocs), and the dev-mode cache gotcha when editing meta.json
Octopus Self VendorOCTO vendor — Octopus consuming its own /api/v1 gift-card API as a federated voucher vendor
Octopus WebsiteNext.js 16 static export at apex octopuscards.io — separate app from client portal, docs, backend; deployed to Cloudflare Pages
Orchestration Test HarnessEnd-to-end orchestration test harness in test/clientapi that drives real voucher orders through vendor adapters pointed at mocky-balboa with chaos injection — R
Runa Products Singular Vs PluralResolved — Runa docs are source of truth, all endpoints are SINGULAR. Both the Go client and the mock were wrong (plural) and have been corrected to match the O
Shopify Upgrade 2026 04Octopus Shopify integration upgrade plan to API 2026-04 — locked decisions for poll/ingest/email/fulfill/cancel scope
Vendor ArchitectureOctopus has TWO distinct vendor concepts — topup vendors (suppliers) and the Grasshopper vendor (sales surface). All gift card products live under vendor.code='

Feedback & working-preference notes

NoteSummary
Api Doc FormatStrict format for every API endpoint documentation page — path, request JSON, request params table, response JSON, enums, response table, error tabs
Autoreveal AnimationUser prefers AutoReveal (timed, one-by-one float-up) over ScrollReveal for product cards and step sequences
Category In QueryWhen filtering variants by category, do it in the SQL query (WHERE clause), not in Go code loops
Cloudflare Pages Extensionless RoutesAny Next.js metadata route or route handler emitting binary content at an extensionless URL must be pinned via public/_headers — Cloudflare Pages + nosniff will
Deep Before WideUser prefers exhaustive depth on one resource over breadth across many. Especially true for testing/correctness work.
Email Design SystemConventions, palette tokens, state-to-color mappings, and email-client constraints for transactional emails (vouchers, topups, eSIMs)
Metrics DimensionsAll business metrics must include client_id and product_id attributes for Grafana drill-down
No Alert Use ToastAll user-facing notifications in views/admin/ must go through the canonical showToast(message, type) helper, never browser alert()
No Confirm Use ModalAll destructive/state-changing prompts in views/admin/ must go through the canonical confirmAction(opts) Bootstrap modal helper, never browser confirm()
No Git CommandsRead-only git commands (status, diff, log, show, blame) are fine. Never run mutating ones (add, commit, push, reset, checkout, stash, etc.).
No Running MigrationsNever run migrations yourself — write them, let the user apply
No Sequential Ids In UrlsNever expose sequential/enumerable IDs in user-facing URLs — use UUIDs instead
No Speculative Vendor PathsWhen fixing a vendor mapper bug, only handle the product types we actually receive — don't add untested branches for types we may never encounter
No Vendor In Customer FacingOctopus must appear as a monolithic, standalone platform to clients. Vendor topology — including the word "vendor" itself, brand names of suppliers (Bamboo, Til
No Webhooks In Flight SubstatusNotifications (email + webhook) only fire at terminal (status, sub_status) pairs. In-flight sub-statuses like VendorOrderPending must not trigger any customer-f
Notification Scope DisciplineWhen working on the order notification system (OrderNotifier, email/webhook fanout), keep changes strictly to notification dispatch. Don't refactor wallet refun
Og Image Per Page RoutesWhen adding /blog/[slug], /cards/[slug], or similar shareable page types to octopus-website, ensure the corresponding /og/<section>/[slug] route handler exists
Repo Test CoverageEvery new function added to database/repo/ must ship with extensive tests covering happy path, error branches, and edge cases
Secret Row Column StackClient-portal MUI theme defaults Stack to direction=row; set direction=column explicitly for vertical layouts
Ui LayoutUser prefers well-designed card UIs but gets frustrated when cards render horizontally instead of as a vertical list. Always verify layout direction.
Use Bun Not NpmFor all JS/TS package management and test running in this repo (grasshopper, client, octopus-website, mocky-balboa, octopus-docs), use bun -- never npm.
Vendor Amount DiscountEvery direct_topup vendor mapper must populate MinAmount, MaxAmount, and VendorDiscount on types.Product — these fields drive pricing, margin, and the variant U
Vendor Chaos And TestsEvery new vendor adapter (direct_topup, vouchers, esim, payouts) must add a mocky-balboa route with chaos hooks AND ship contract + service tests in the same PR

On this page